aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX16
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus10
-rw-r--r--Documentation/ABI/removed/o2cb (renamed from Documentation/ABI/obsolete/o2cb)9
-rw-r--r--Documentation/ABI/stable/sysfs-class-backlight20
-rw-r--r--Documentation/ABI/stable/sysfs-firmware-efi-vars75
-rw-r--r--Documentation/ABI/testing/configfs-spear-pcie-gadget31
-rw-r--r--Documentation/ABI/testing/pstore41
-rw-r--r--Documentation/ABI/testing/sysfs-block64
-rw-r--r--Documentation/ABI/testing/sysfs-bus-bcma31
-rw-r--r--Documentation/ABI/testing/sysfs-bus-css2
-rw-r--r--Documentation/ABI/testing/sysfs-bus-media6
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci40
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci-devices-cciss12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd2
-rw-r--r--Documentation/ABI/testing/sysfs-class-led2
-rw-r--r--Documentation/ABI/testing/sysfs-devices-mmc21
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power20
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu34
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid10
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo53
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kone10
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus36
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus100
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra17
-rw-r--r--Documentation/ABI/testing/sysfs-driver-samsung-laptop19
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-dmi110
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-gsmi58
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-log7
-rw-r--r--Documentation/ABI/testing/sysfs-fs-ext413
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-fscaps8
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-mm-cleancache11
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-laptop2
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-wmi31
-rw-r--r--Documentation/ABI/testing/sysfs-platform-eeepc-wmi10
-rw-r--r--Documentation/ABI/testing/sysfs-platform-kim48
-rw-r--r--Documentation/ABI/testing/sysfs-power14
-rw-r--r--Documentation/ABI/testing/sysfs-ptp98
-rw-r--r--Documentation/Changes8
-rw-r--r--Documentation/CodingStyle12
-rw-r--r--Documentation/DocBook/.gitignore1
-rw-r--r--Documentation/DocBook/Makefile6
-rw-r--r--Documentation/DocBook/device-drivers.tmpl6
-rw-r--r--Documentation/DocBook/dvb/dvbapi.xml8
-rw-r--r--Documentation/DocBook/dvb/dvbproperty.xml408
-rw-r--r--Documentation/DocBook/dvb/frontend.h.xml20
-rw-r--r--Documentation/DocBook/dvb/frontend.xml2
-rw-r--r--Documentation/DocBook/genericirq.tmpl82
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl2
-rw-r--r--Documentation/DocBook/libata.tmpl10
-rw-r--r--Documentation/DocBook/media-entities.tmpl63
-rw-r--r--Documentation/DocBook/media.tmpl3
-rw-r--r--Documentation/DocBook/mtdnand.tmpl15
-rw-r--r--Documentation/DocBook/rapidio.tmpl1
-rw-r--r--Documentation/DocBook/regulator.tmpl4
-rw-r--r--Documentation/DocBook/uio-howto.tmpl2
-rw-r--r--Documentation/DocBook/usb.tmpl2
-rw-r--r--Documentation/DocBook/v4l/bayer.pdfbin0 -> 12116 bytes
-rw-r--r--Documentation/DocBook/v4l/bayer.pngbin0 -> 9725 bytes
-rw-r--r--Documentation/DocBook/v4l/common.xml4
-rw-r--r--Documentation/DocBook/v4l/compat.xml26
-rw-r--r--Documentation/DocBook/v4l/controls.xml2
-rw-r--r--Documentation/DocBook/v4l/dev-capture.xml13
-rw-r--r--Documentation/DocBook/v4l/dev-output.xml13
-rw-r--r--Documentation/DocBook/v4l/dev-subdev.xml313
-rw-r--r--Documentation/DocBook/v4l/func-mmap.xml10
-rw-r--r--Documentation/DocBook/v4l/func-munmap.xml3
-rw-r--r--Documentation/DocBook/v4l/io.xml283
-rw-r--r--Documentation/DocBook/v4l/libv4l.xml2
-rw-r--r--Documentation/DocBook/v4l/lirc_device_interface.xml2
-rw-r--r--Documentation/DocBook/v4l/media-controller.xml89
-rw-r--r--Documentation/DocBook/v4l/media-func-close.xml59
-rw-r--r--Documentation/DocBook/v4l/media-func-ioctl.xml116
-rw-r--r--Documentation/DocBook/v4l/media-func-open.xml94
-rw-r--r--Documentation/DocBook/v4l/media-ioc-device-info.xml133
-rw-r--r--Documentation/DocBook/v4l/media-ioc-enum-entities.xml308
-rw-r--r--Documentation/DocBook/v4l/media-ioc-enum-links.xml207
-rw-r--r--Documentation/DocBook/v4l/media-ioc-setup-link.xml93
-rw-r--r--Documentation/DocBook/v4l/nv12mt.gifbin0 -> 2108 bytes
-rw-r--r--Documentation/DocBook/v4l/nv12mt_example.gifbin0 -> 6858 bytes
-rw-r--r--Documentation/DocBook/v4l/pipeline.pdfbin0 -> 20276 bytes
-rw-r--r--Documentation/DocBook/v4l/pipeline.pngbin0 -> 12130 bytes
-rw-r--r--Documentation/DocBook/v4l/pixfmt-m420.xml147
-rw-r--r--Documentation/DocBook/v4l/pixfmt-nv12m.xml154
-rw-r--r--Documentation/DocBook/v4l/pixfmt-nv12mt.xml74
-rw-r--r--Documentation/DocBook/v4l/pixfmt-srggb12.xml90
-rw-r--r--Documentation/DocBook/v4l/pixfmt-y10b.xml43
-rw-r--r--Documentation/DocBook/v4l/pixfmt-y12.xml79
-rw-r--r--Documentation/DocBook/v4l/pixfmt-yuv420m.xml162
-rw-r--r--Documentation/DocBook/v4l/pixfmt.xml123
-rw-r--r--Documentation/DocBook/v4l/planar-apis.xml62
-rw-r--r--Documentation/DocBook/v4l/remote_controllers.xml2
-rw-r--r--Documentation/DocBook/v4l/subdev-formats.xml2572
-rw-r--r--Documentation/DocBook/v4l/v4l2.xml30
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml145
-rw-r--r--Documentation/DocBook/v4l/vidioc-enum-fmt.xml2
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-fmt.xml15
-rw-r--r--Documentation/DocBook/v4l/vidioc-qbuf.xml24
-rw-r--r--Documentation/DocBook/v4l/vidioc-querybuf.xml14
-rw-r--r--Documentation/DocBook/v4l/vidioc-querycap.xml18
-rw-r--r--Documentation/DocBook/v4l/vidioc-streamon.xml9
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml152
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml154
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml119
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml155
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml180
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml141
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/HOWTO2
-rw-r--r--Documentation/IRQ-affinity.txt17
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt4
-rw-r--r--Documentation/RCU/00-INDEX2
-rw-r--r--Documentation/RCU/stallwarn.txt23
-rw-r--r--Documentation/RCU/trace.txt295
-rw-r--r--Documentation/RCU/whatisRCU.txt31
-rw-r--r--Documentation/SecurityBugs2
-rw-r--r--Documentation/SubmittingDrivers2
-rw-r--r--Documentation/SubmittingPatches11
-rw-r--r--Documentation/accounting/getdelays.c38
-rw-r--r--Documentation/acpi/apei/output_format.txt25
-rw-r--r--Documentation/arm/Booting33
-rw-r--r--Documentation/arm/IXP4xx4
-rw-r--r--Documentation/arm/SH-Mobile/Makefile8
-rw-r--r--Documentation/arm/SH-Mobile/vrl4.c169
-rw-r--r--Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt29
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Suspend.txt2
-rw-r--r--Documentation/arm/Samsung/GPIO.txt2
-rw-r--r--Documentation/arm/Samsung/Overview.txt2
-rw-r--r--Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen61
-rw-r--r--Documentation/arm/Sharp-LH/CompactFlash32
-rw-r--r--Documentation/arm/Sharp-LH/IOBarrier45
-rw-r--r--Documentation/arm/Sharp-LH/KEV7A4008
-rw-r--r--Documentation/arm/Sharp-LH/LCDPanels59
-rw-r--r--Documentation/arm/Sharp-LH/LPD7A40015
-rw-r--r--Documentation/arm/Sharp-LH/LPD7A40X16
-rw-r--r--Documentation/arm/Sharp-LH/SDRAM51
-rw-r--r--Documentation/arm/Sharp-LH/VectoredInterruptController80
-rw-r--r--Documentation/atomic_ops.txt2
-rw-r--r--Documentation/block/biodoc.txt9
-rw-r--r--Documentation/blockdev/cciss.txt15
-rw-r--r--Documentation/cachetlb.txt2
-rw-r--r--Documentation/cgroups/blkio-controller.txt30
-rw-r--r--Documentation/cgroups/cgroups.txt65
-rw-r--r--Documentation/cgroups/cpusets.txt17
-rw-r--r--Documentation/cgroups/memory.txt20
-rw-r--r--Documentation/cpu-freq/governors.txt11
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/dell_rbu.txt2
-rw-r--r--Documentation/development-process/1.Intro18
-rw-r--r--Documentation/development-process/2.Process177
-rw-r--r--Documentation/development-process/3.Early-stage31
-rw-r--r--Documentation/development-process/4.Coding21
-rw-r--r--Documentation/development-process/5.Posting28
-rw-r--r--Documentation/development-process/6.Followthrough16
-rw-r--r--Documentation/development-process/7.AdvancedTopics4
-rw-r--r--Documentation/device-mapper/dm-crypt.txt2
-rw-r--r--Documentation/device-mapper/dm-flakey.txt17
-rw-r--r--Documentation/device-mapper/dm-service-time.txt2
-rw-r--r--Documentation/devicetree/00-INDEX10
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec4.txt397
-rw-r--r--Documentation/devicetree/bindings/fb/sm501fb.txt34
-rw-r--r--Documentation/devicetree/bindings/hwmon/ads1015.txt73
-rw-r--r--Documentation/devicetree/bindings/i2c/ce4100-i2c.txt93
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt9
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt2
-rwxr-xr-xDocumentation/devicetree/bindings/net/can/fsl-flexcan.txt61
-rw-r--r--Documentation/devicetree/bindings/net/can/sja1000.txt2
-rw-r--r--Documentation/devicetree/bindings/net/fsl-tsec-phy.txt54
-rw-r--r--Documentation/devicetree/bindings/open-pic.txt98
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt20
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/ifc.txt76
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt38
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic.txt253
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt9
-rw-r--r--Documentation/devicetree/bindings/powerpc/nintendo/wii.txt2
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-cmos.txt28
-rw-r--r--Documentation/devicetree/bindings/serial/altera_jtaguart.txt4
-rw-r--r--Documentation/devicetree/bindings/serial/altera_uart.txt7
-rw-r--r--Documentation/devicetree/bindings/serio/altera_ps2.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/spi_altera.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/spi_oc_tiny.txt12
-rw-r--r--Documentation/devicetree/bindings/x86/ce4100.txt38
-rw-r--r--Documentation/devicetree/bindings/x86/interrupt.txt26
-rw-r--r--Documentation/devicetree/bindings/x86/timer.txt6
-rw-r--r--Documentation/devicetree/booting-without-of.txt70
-rw-r--r--Documentation/dmaengine.txt97
-rw-r--r--Documentation/dontdiff58
-rw-r--r--Documentation/driver-model/bus.txt19
-rw-r--r--Documentation/driver-model/class.txt17
-rw-r--r--Documentation/driver-model/device.txt91
-rw-r--r--Documentation/driver-model/driver.txt18
-rw-r--r--Documentation/dvb/README.dvb-usb2
-rw-r--r--Documentation/dvb/ci.txt2
-rw-r--r--Documentation/dvb/faq.txt2
-rw-r--r--Documentation/dvb/get_dvb_firmware8
-rw-r--r--Documentation/dvb/lmedm04.txt16
-rw-r--r--Documentation/dvb/udev.txt2
-rw-r--r--Documentation/dynamic-debug-howto.txt16
-rw-r--r--Documentation/edac.txt4
-rw-r--r--Documentation/eisa.txt2
-rw-r--r--Documentation/fb/sm501.txt10
-rw-r--r--Documentation/fb/viafb.txt4
-rw-r--r--Documentation/feature-removal-schedule.txt151
-rw-r--r--Documentation/filesystems/9p.txt29
-rw-r--r--Documentation/filesystems/Locking12
-rw-r--r--Documentation/filesystems/adfs.txt18
-rw-r--r--Documentation/filesystems/autofs4-mount-control.txt2
-rw-r--r--Documentation/filesystems/caching/netfs-api.txt18
-rw-r--r--Documentation/filesystems/configfs/configfs.txt2
-rw-r--r--Documentation/filesystems/configfs/configfs_example_explicit.c6
-rw-r--r--Documentation/filesystems/configfs/configfs_example_macros.c6
-rw-r--r--Documentation/filesystems/exofs.txt10
-rw-r--r--Documentation/filesystems/ext4.txt215
-rw-r--r--Documentation/filesystems/gfs2-uevents.txt2
-rw-r--r--Documentation/filesystems/gfs2.txt2
-rw-r--r--Documentation/filesystems/nfs/idmapper.txt4
-rw-r--r--Documentation/filesystems/nfs/pnfs.txt7
-rw-r--r--Documentation/filesystems/ntfs.txt2
-rw-r--r--Documentation/filesystems/ocfs2.txt10
-rw-r--r--Documentation/filesystems/path-lookup.txt4
-rw-r--r--Documentation/filesystems/pohmelfs/network_protocol.txt2
-rw-r--r--Documentation/filesystems/porting23
-rw-r--r--Documentation/filesystems/proc.txt18
-rw-r--r--Documentation/filesystems/romfs.txt3
-rw-r--r--Documentation/filesystems/squashfs.txt30
-rw-r--r--Documentation/filesystems/sysfs.txt18
-rw-r--r--Documentation/filesystems/ubifs.txt30
-rw-r--r--Documentation/filesystems/vfs.txt66
-rw-r--r--Documentation/filesystems/xfs-delayed-logging-design.txt15
-rw-r--r--Documentation/filesystems/xfs.txt6
-rw-r--r--Documentation/flexible-arrays.txt4
-rw-r--r--Documentation/hid/hiddev.txt (renamed from Documentation/usb/hiddev.txt)0
-rw-r--r--Documentation/hid/hidraw.txt119
-rw-r--r--Documentation/hwmon/abituguru2
-rw-r--r--Documentation/hwmon/abituguru-datasheet8
-rw-r--r--Documentation/hwmon/abituguru32
-rw-r--r--Documentation/hwmon/adm102136
-rw-r--r--Documentation/hwmon/adm127560
-rw-r--r--Documentation/hwmon/ads101572
-rw-r--r--Documentation/hwmon/coretemp21
-rw-r--r--Documentation/hwmon/emc6w20142
-rw-r--r--Documentation/hwmon/f71882fg39
-rw-r--r--Documentation/hwmon/fam15h_power37
-rw-r--r--Documentation/hwmon/k10temp3
-rw-r--r--Documentation/hwmon/lineage-pem77
-rw-r--r--Documentation/hwmon/lm755
-rw-r--r--Documentation/hwmon/lm8512
-rw-r--r--Documentation/hwmon/lm9029
-rw-r--r--Documentation/hwmon/ltc415147
-rw-r--r--Documentation/hwmon/max1606462
-rw-r--r--Documentation/hwmon/max1606598
-rw-r--r--Documentation/hwmon/max3444079
-rw-r--r--Documentation/hwmon/max663949
-rw-r--r--Documentation/hwmon/max664221
-rw-r--r--Documentation/hwmon/max665021
-rw-r--r--Documentation/hwmon/max868869
-rw-r--r--Documentation/hwmon/pkgtemp36
-rw-r--r--Documentation/hwmon/pmbus197
-rw-r--r--Documentation/hwmon/sch562722
-rw-r--r--Documentation/hwmon/sht1574
-rw-r--r--Documentation/hwmon/smm6658
-rw-r--r--Documentation/hwmon/submitting-patches109
-rw-r--r--Documentation/hwmon/sysfs-interface13
-rw-r--r--Documentation/hwmon/twl4030-madc-hwmon45
-rw-r--r--Documentation/hwmon/ucd9000110
-rw-r--r--Documentation/hwmon/ucd9200112
-rw-r--r--Documentation/hwmon/w83627ehf60
-rw-r--r--Documentation/hwmon/w83781d2
-rw-r--r--Documentation/hwmon/w83791d2
-rw-r--r--Documentation/hwmon/w83795127
-rw-r--r--Documentation/hwspinlock.txt293
-rw-r--r--Documentation/i2c/busses/i2c-diolan-u2c26
-rw-r--r--Documentation/i2c/busses/i2c-i8014
-rw-r--r--Documentation/i2c/busses/i2c-parport-light2
-rw-r--r--Documentation/i2c/busses/i2c-sis96x2
-rw-r--r--Documentation/i2c/busses/i2c-taos-evm2
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/i2c/upgrading-clients18
-rw-r--r--Documentation/i2c/writing-clients2
-rw-r--r--Documentation/i2o/README2
-rw-r--r--Documentation/ia64/aliasing-test.c2
-rw-r--r--Documentation/input/elantech.txt123
-rw-r--r--Documentation/input/event-codes.txt262
-rw-r--r--Documentation/input/joystick-parport.txt2
-rw-r--r--Documentation/input/rotary-encoder.txt15
-rw-r--r--Documentation/input/walkera0701.txt2
-rw-r--r--Documentation/ioctl/ioctl-number.txt5
-rw-r--r--Documentation/iostats.txt17
-rw-r--r--Documentation/irqflags-tracing.txt2
-rw-r--r--Documentation/isdn/INTERFACE.CAPI2
-rw-r--r--Documentation/ja_JP/HOWTO129
-rw-r--r--Documentation/kbuild/kbuild.txt28
-rw-r--r--Documentation/kbuild/kconfig-language.txt32
-rw-r--r--Documentation/kbuild/kconfig.txt5
-rw-r--r--Documentation/kbuild/makefiles.txt56
-rw-r--r--Documentation/kernel-parameters.txt59
-rw-r--r--Documentation/kmemleak.txt4
-rw-r--r--Documentation/kref.txt2
-rw-r--r--Documentation/laptops/asus-laptop.txt4
-rw-r--r--Documentation/laptops/hpfall.c (renamed from Documentation/hwmon/hpfall.c)0
-rw-r--r--Documentation/laptops/sony-laptop.txt37
-rw-r--r--Documentation/leds/00-INDEX8
-rw-r--r--Documentation/leds/leds-class.txt (renamed from Documentation/leds-class.txt)1
-rw-r--r--Documentation/leds/leds-lp3944.txt (renamed from Documentation/leds-lp3944.txt)0
-rw-r--r--Documentation/lockstat.txt38
-rw-r--r--Documentation/md.txt10
-rw-r--r--Documentation/media-framework.txt353
-rw-r--r--Documentation/memory-barriers.txt58
-rw-r--r--Documentation/memory-hotplug.txt47
-rw-r--r--Documentation/mips/AU1xxx_IDE.README4
-rw-r--r--Documentation/misc-devices/ics932s4012
-rw-r--r--Documentation/misc-devices/lis3lv02d (renamed from Documentation/hwmon/lis3lv02d)4
-rw-r--r--Documentation/misc-devices/spear-pcie-gadget.txt130
-rw-r--r--Documentation/mmc/00-INDEX2
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt10
-rw-r--r--Documentation/mmc/mmc-dev-parts.txt27
-rw-r--r--Documentation/networking/3c359.txt2
-rw-r--r--Documentation/networking/README.ipw22002
-rw-r--r--Documentation/networking/batman-adv.txt27
-rw-r--r--Documentation/networking/bonding.txt73
-rw-r--r--Documentation/networking/caif/Linux-CAIF.txt2
-rw-r--r--Documentation/networking/caif/spi_porting.txt2
-rw-r--r--Documentation/networking/can.txt2
-rw-r--r--Documentation/networking/dns_resolver.txt4
-rw-r--r--Documentation/networking/ieee802154.txt2
-rw-r--r--Documentation/networking/igb.txt13
-rw-r--r--Documentation/networking/ip-sysctl.txt11
-rw-r--r--Documentation/networking/olympic.txt2
-rw-r--r--Documentation/networking/packet_mmap.txt2
-rw-r--r--Documentation/networking/phonet.txt67
-rw-r--r--Documentation/networking/s2io.txt4
-rw-r--r--Documentation/networking/tc-actions-env-rules.txt4
-rw-r--r--Documentation/power/devices.txt110
-rw-r--r--Documentation/power/notifiers.txt53
-rw-r--r--Documentation/power/opp.txt2
-rw-r--r--Documentation/power/regulator/machine.txt4
-rw-r--r--Documentation/power/runtime_pm.txt13
-rw-r--r--Documentation/power/states.txt12
-rw-r--r--Documentation/power/swsusp.txt4
-rw-r--r--Documentation/power/userland-swsusp.txt6
-rw-r--r--Documentation/powerpc/00-INDEX4
-rw-r--r--Documentation/powerpc/hvcs.txt2
-rw-r--r--Documentation/pti/pti_intel_mid.txt99
-rw-r--r--Documentation/ptp/ptp.txt89
-rw-r--r--Documentation/ptp/testptp.c381
-rw-r--r--Documentation/ptp/testptp.mk33
-rw-r--r--Documentation/rapidio/rapidio.txt173
-rw-r--r--Documentation/rapidio/sysfs.txt90
-rw-r--r--Documentation/rtc.txt29
-rw-r--r--Documentation/s390/Debugging390.txt2
-rw-r--r--Documentation/scheduler/sched-design-CFS.txt7
-rw-r--r--Documentation/scheduler/sched-domains.txt32
-rw-r--r--Documentation/scsi/ChangeLog.lpfc18
-rw-r--r--Documentation/scsi/ChangeLog.megaraid2
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas37
-rw-r--r--Documentation/scsi/ChangeLog.ncr53c8xx2
-rw-r--r--Documentation/scsi/ChangeLog.sym53c8xx2
-rw-r--r--Documentation/scsi/LICENSE.qla2xxx292
-rw-r--r--Documentation/scsi/aha152x.txt2
-rw-r--r--Documentation/scsi/aic79xx.txt12
-rw-r--r--Documentation/scsi/hpsa.txt23
-rw-r--r--Documentation/scsi/ibmmca.txt4
-rw-r--r--Documentation/scsi/scsi-changer.txt2
-rw-r--r--Documentation/scsi/scsi_eh.txt2
-rw-r--r--Documentation/scsi/scsi_fc_transport.txt2
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt14
-rw-r--r--Documentation/scsi/sym53c8xx_2.txt2
-rw-r--r--Documentation/security/00-INDEX18
-rw-r--r--Documentation/security/SELinux.txt (renamed from Documentation/SELinux.txt)0
-rw-r--r--Documentation/security/Smack.txt (renamed from Documentation/Smack.txt)0
-rw-r--r--Documentation/security/apparmor.txt (renamed from Documentation/apparmor.txt)0
-rw-r--r--Documentation/security/credentials.txt (renamed from Documentation/credentials.txt)2
-rw-r--r--Documentation/security/keys-request-key.txt (renamed from Documentation/keys-request-key.txt)13
-rw-r--r--Documentation/security/keys-trusted-encrypted.txt (renamed from Documentation/keys-trusted-encrypted.txt)0
-rw-r--r--Documentation/security/keys.txt (renamed from Documentation/keys.txt)32
-rw-r--r--Documentation/security/tomoyo.txt (renamed from Documentation/tomoyo.txt)0
-rw-r--r--Documentation/serial/moxa-smartio2
-rw-r--r--Documentation/serial/n_gsm.txt89
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt13
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt2
-rw-r--r--Documentation/sound/alsa/SB-Live-mixer.txt6
-rw-r--r--Documentation/sound/oss/AudioExcelDSP166
-rw-r--r--Documentation/sound/oss/README.OSS2
-rw-r--r--Documentation/sound/oss/README.ymfsb2
-rw-r--r--Documentation/spi/pxa2xx2
-rw-r--r--Documentation/spi/spi-lm70llp2
-rw-r--r--Documentation/spinlocks.txt24
-rw-r--r--Documentation/stable_api_nonsense.txt2
-rw-r--r--Documentation/sysctl/fs.txt24
-rw-r--r--Documentation/sysctl/kernel.txt5
-rw-r--r--Documentation/sysctl/net.txt11
-rw-r--r--Documentation/sysctl/vm.txt4
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py18
-rw-r--r--Documentation/telephony/ixj.txt2
-rw-r--r--Documentation/timers/timers-howto.txt2
-rw-r--r--Documentation/trace/ftrace-design.txt7
-rw-r--r--Documentation/trace/ftrace.txt151
-rw-r--r--Documentation/trace/kprobetrace.txt17
-rw-r--r--Documentation/trace/ring-buffer-design.txt2
-rw-r--r--Documentation/usb/callbacks.txt8
-rw-r--r--Documentation/usb/linux-cdc-acm.inf4
-rw-r--r--Documentation/usb/linux.inf6
-rw-r--r--Documentation/usb/usbmon.txt42
-rw-r--r--Documentation/vgaarbiter.txt20
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx2
-rw-r--r--Documentation/video4linux/README.ivtv3
-rw-r--r--Documentation/video4linux/README.pvrusb22
-rw-r--r--Documentation/video4linux/Zoran1
-rw-r--r--Documentation/video4linux/bttv/Insmod-options2
-rw-r--r--Documentation/video4linux/bttv/README2
-rw-r--r--Documentation/video4linux/bttv/README.freeze2
-rw-r--r--Documentation/video4linux/bttv/Sound-FAQ4
-rw-r--r--Documentation/video4linux/et61x251.txt4
-rw-r--r--Documentation/video4linux/gspca.txt11
-rw-r--r--Documentation/video4linux/omap3isp.txt278
-rw-r--r--Documentation/video4linux/pxa_camera.txt8
-rw-r--r--Documentation/video4linux/sh_mobile_ceu_camera.txt6
-rw-r--r--Documentation/video4linux/sn9c102.txt4
-rw-r--r--Documentation/video4linux/uvcvideo.txt239
-rw-r--r--Documentation/video4linux/v4l2-framework.txt269
-rw-r--r--Documentation/video4linux/w9968cf.txt2
-rw-r--r--Documentation/video4linux/zc0301.txt6
-rw-r--r--Documentation/virtual/00-INDEX10
-rw-r--r--Documentation/virtual/kvm/api.txt (renamed from Documentation/kvm/api.txt)130
-rw-r--r--Documentation/virtual/kvm/cpuid.txt (renamed from Documentation/kvm/cpuid.txt)0
-rw-r--r--Documentation/virtual/kvm/locking.txt25
-rw-r--r--Documentation/virtual/kvm/mmu.txt (renamed from Documentation/kvm/mmu.txt)2
-rw-r--r--Documentation/virtual/kvm/msr.txt (renamed from Documentation/kvm/msr.txt)0
-rw-r--r--Documentation/virtual/kvm/ppc-pv.txt (renamed from Documentation/kvm/ppc-pv.txt)2
-rw-r--r--Documentation/virtual/kvm/review-checklist.txt (renamed from Documentation/kvm/review-checklist.txt)2
-rw-r--r--Documentation/virtual/kvm/timekeeping.txt (renamed from Documentation/kvm/timekeeping.txt)2
-rw-r--r--Documentation/virtual/lguest/.gitignore (renamed from Documentation/lguest/.gitignore)0
-rw-r--r--Documentation/virtual/lguest/Makefile (renamed from Documentation/lguest/Makefile)0
-rw-r--r--Documentation/virtual/lguest/extract (renamed from Documentation/lguest/extract)0
-rw-r--r--Documentation/virtual/lguest/lguest.c (renamed from Documentation/lguest/lguest.c)0
-rw-r--r--Documentation/virtual/lguest/lguest.txt (renamed from Documentation/lguest/lguest.txt)3
-rw-r--r--Documentation/virtual/uml/UserModeLinux-HOWTO.txt (renamed from Documentation/uml/UserModeLinux-HOWTO.txt)10
-rw-r--r--Documentation/vm/active_mm.txt2
-rw-r--r--Documentation/vm/cleancache.txt278
-rw-r--r--Documentation/vm/hugetlbpage.txt2
-rw-r--r--Documentation/vm/locking2
-rw-r--r--Documentation/vm/overcommit-accounting2
-rw-r--r--Documentation/vm/page-types.c105
-rw-r--r--Documentation/vm/unevictable-lru.txt3
-rw-r--r--Documentation/w1/slaves/w1_ds24236
-rw-r--r--Documentation/w1/w1.netlink2
-rw-r--r--Documentation/watchdog/hpwdt.txt2
-rw-r--r--Documentation/workqueue.txt40
-rw-r--r--Documentation/x86/x86_64/boot-options.txt21
-rw-r--r--Documentation/zh_CN/SecurityBugs50
-rw-r--r--Documentation/zh_CN/SubmitChecklist109
-rw-r--r--Documentation/zh_CN/SubmittingPatches4
-rw-r--r--Documentation/zh_CN/email-clients.txt210
-rw-r--r--Documentation/zh_CN/magic-number.txt167
453 files changed, 17891 insertions, 2483 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 8dfc6708a25..1f89424c36a 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -192,10 +192,6 @@ kernel-docs.txt
192 - listing of various WWW + books that document kernel internals. 192 - listing of various WWW + books that document kernel internals.
193kernel-parameters.txt 193kernel-parameters.txt
194 - summary listing of command line / boot prompt args for the kernel. 194 - summary listing of command line / boot prompt args for the kernel.
195keys-request-key.txt
196 - description of the kernel key request service.
197keys.txt
198 - description of the kernel key retention service.
199kobject.txt 195kobject.txt
200 - info of the kobject infrastructure of the Linux kernel. 196 - info of the kobject infrastructure of the Linux kernel.
201kprobes.txt 197kprobes.txt
@@ -206,8 +202,8 @@ laptops/
206 - directory with laptop related info and laptop driver documentation. 202 - directory with laptop related info and laptop driver documentation.
207ldm.txt 203ldm.txt
208 - a brief description of LDM (Windows Dynamic Disks). 204 - a brief description of LDM (Windows Dynamic Disks).
209leds-class.txt 205leds/
210 - documents LED handling under Linux. 206 - directory with info about LED handling under Linux.
211local_ops.txt 207local_ops.txt
212 - semantics and behavior of local atomic operations. 208 - semantics and behavior of local atomic operations.
213lockdep-design.txt 209lockdep-design.txt
@@ -294,6 +290,8 @@ scheduler/
294 - directory with info on the scheduler. 290 - directory with info on the scheduler.
295scsi/ 291scsi/
296 - directory with info on Linux scsi support. 292 - directory with info on Linux scsi support.
293security/
294 - directory that contains security-related info
297serial/ 295serial/
298 - directory with info on the low level serial API. 296 - directory with info on the low level serial API.
299serial-console.txt 297serial-console.txt
@@ -328,10 +326,6 @@ sysrq.txt
328 - info on the magic SysRq key. 326 - info on the magic SysRq key.
329telephony/ 327telephony/
330 - directory with info on telephony (e.g. voice over IP) support. 328 - directory with info on telephony (e.g. voice over IP) support.
331time_interpolators.txt
332 - info on time interpolators.
333uml/
334 - directory with information about User Mode Linux.
335unicode.txt 329unicode.txt
336 - info on the Unicode character/font mapping used in Linux. 330 - info on the Unicode character/font mapping used in Linux.
337unshare.txt 331unshare.txt
@@ -346,8 +340,6 @@ vm/
346 - directory with info on the Linux vm code. 340 - directory with info on the Linux vm code.
347volatile-considered-harmful.txt 341volatile-considered-harmful.txt
348 - Why the "volatile" type class should not be used 342 - Why the "volatile" type class should not be used
349voyager.txt
350 - guide to running Linux on the Voyager architecture.
351w1/ 343w1/
352 - directory with documents regarding the 1-wire (w1) subsystem. 344 - directory with documents regarding the 1-wire (w1) subsystem.
353watchdog/ 345watchdog/
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
new file mode 100644
index 00000000000..c2a270b45b0
--- /dev/null
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
@@ -0,0 +1,10 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
2Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 0-4.
5 When read, this attribute returns the number of the actual
6 profile. This value is persistent, so its equivalent to the
7 profile that's active when the mouse is powered on next time.
8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately.
10 Please use actual_profile, it does the same thing.
diff --git a/Documentation/ABI/obsolete/o2cb b/Documentation/ABI/removed/o2cb
index 9c49d8e6c0c..7f5daa46509 100644
--- a/Documentation/ABI/obsolete/o2cb
+++ b/Documentation/ABI/removed/o2cb
@@ -1,11 +1,10 @@
1What: /sys/o2cb symlink 1What: /sys/o2cb symlink
2Date: Dec 2005 2Date: May 2011
3KernelVersion: 2.6.16 3KernelVersion: 2.6.40
4Contact: ocfs2-devel@oss.oracle.com 4Contact: ocfs2-devel@oss.oracle.com
5Description: This is a symlink: /sys/o2cb to /sys/fs/o2cb. The symlink will 5Description: This is a symlink: /sys/o2cb to /sys/fs/o2cb. The symlink is
6 be removed when new versions of ocfs2-tools which know to look 6 removed when new versions of ocfs2-tools which know to look
7 in /sys/fs/o2cb are sufficiently prevalent. Don't code new 7 in /sys/fs/o2cb are sufficiently prevalent. Don't code new
8 software to look here, it should try /sys/fs/o2cb instead. 8 software to look here, it should try /sys/fs/o2cb instead.
9 See Documentation/ABI/stable/o2cb for more information on usage.
10Users: ocfs2-tools. It's sufficient to mail proposed changes to 9Users: ocfs2-tools. It's sufficient to mail proposed changes to
11 ocfs2-devel@oss.oracle.com. 10 ocfs2-devel@oss.oracle.com.
diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
index 4d637e1c4ff..70302f370e7 100644
--- a/Documentation/ABI/stable/sysfs-class-backlight
+++ b/Documentation/ABI/stable/sysfs-class-backlight
@@ -34,3 +34,23 @@ Contact: Richard Purdie <rpurdie@rpsys.net>
34Description: 34Description:
35 Maximum brightness for <backlight>. 35 Maximum brightness for <backlight>.
36Users: HAL 36Users: HAL
37
38What: /sys/class/backlight/<backlight>/type
39Date: September 2010
40KernelVersion: 2.6.37
41Contact: Matthew Garrett <mjg@redhat.com>
42Description:
43 The type of interface controlled by <backlight>.
44 "firmware": The driver uses a standard firmware interface
45 "platform": The driver uses a platform-specific interface
46 "raw": The driver controls hardware registers directly
47
48 In the general case, when multiple backlight
49 interfaces are available for a single device, firmware
50 control should be preferred to platform control should
51 be preferred to raw control. Using a firmware
52 interface reduces the probability of confusion with
53 the hardware and the OS independently updating the
54 backlight state. Platform interfaces are mostly a
55 holdover from pre-standardisation of firmware
56 interfaces.
diff --git a/Documentation/ABI/stable/sysfs-firmware-efi-vars b/Documentation/ABI/stable/sysfs-firmware-efi-vars
new file mode 100644
index 00000000000..5def20b9019
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-firmware-efi-vars
@@ -0,0 +1,75 @@
1What: /sys/firmware/efi/vars
2Date: April 2004
3Contact: Matt Domsch <Matt_Domsch@dell.com>
4Description:
5 This directory exposes interfaces for interactive with
6 EFI variables. For more information on EFI variables,
7 see 'Variable Services' in the UEFI specification
8 (section 7.2 in specification version 2.3 Errata D).
9
10 In summary, EFI variables are named, and are classified
11 into separate namespaces through the use of a vendor
12 GUID. They also have an arbitrary binary value
13 associated with them.
14
15 The efivars module enumerates these variables and
16 creates a separate directory for each one found. Each
17 directory has a name of the form "<key>-<vendor guid>"
18 and contains the following files:
19
20 attributes: A read-only text file enumerating the
21 EFI variable flags. Potential values
22 include:
23
24 EFI_VARIABLE_NON_VOLATILE
25 EFI_VARIABLE_BOOTSERVICE_ACCESS
26 EFI_VARIABLE_RUNTIME_ACCESS
27 EFI_VARIABLE_HARDWARE_ERROR_RECORD
28 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
29
30 See the EFI documentation for an
31 explanation of each of these variables.
32
33 data: A read-only binary file that can be read
34 to attain the value of the EFI variable
35
36 guid: The vendor GUID of the variable. This
37 should always match the GUID in the
38 variable's name.
39
40 raw_var: A binary file that can be read to obtain
41 a structure that contains everything
42 there is to know about the variable.
43 For structure definition see "struct
44 efi_variable" in the kernel sources.
45
46 This file can also be written to in
47 order to update the value of a variable.
48 For this to work however, all fields of
49 the "struct efi_variable" passed must
50 match byte for byte with the structure
51 read out of the file, save for the value
52 portion.
53
54 **Note** the efi_variable structure
55 read/written with this file contains a
56 'long' type that may change widths
57 depending on your underlying
58 architecture.
59
60 size: As ASCII representation of the size of
61 the variable's value.
62
63
64 In addition, two other magic binary files are provided
65 in the top-level directory and are used for adding and
66 removing variables:
67
68 new_var: Takes a "struct efi_variable" and
69 instructs the EFI firmware to create a
70 new variable.
71
72 del_var: Takes a "struct efi_variable" and
73 instructs the EFI firmware to remove any
74 variable that has a matching vendor GUID
75 and variable key name.
diff --git a/Documentation/ABI/testing/configfs-spear-pcie-gadget b/Documentation/ABI/testing/configfs-spear-pcie-gadget
new file mode 100644
index 00000000000..875988146a6
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-spear-pcie-gadget
@@ -0,0 +1,31 @@
1What: /config/pcie-gadget
2Date: Feb 2011
3KernelVersion: 2.6.37
4Contact: Pratyush Anand <pratyush.anand@st.com>
5Description:
6
7 Interface is used to configure selected dual mode PCIe controller
8 as device and then program its various registers to configure it
9 as a particular device type.
10 This interfaces can be used to show spear's PCIe device capability.
11
12 Nodes are only visible when configfs is mounted. To mount configfs
13 in /config directory use:
14 # mount -t configfs none /config/
15
16 For nth PCIe Device Controller
17 /config/pcie-gadget.n/
18 link ... used to enable ltssm and read its status.
19 int_type ...used to configure and read type of supported
20 interrupt
21 no_of_msi ... used to configure number of MSI vector needed and
22 to read no of MSI granted.
23 inta ... write 1 to assert INTA and 0 to de-assert.
24 send_msi ... write MSI vector to be sent.
25 vendor_id ... used to write and read vendor id (hex)
26 device_id ... used to write and read device id (hex)
27 bar0_size ... used to write and read bar0_size
28 bar0_address ... used to write and read bar0 mapped area in hex.
29 bar0_rw_offset ... used to write and read offset of bar0 where
30 bar0_data will be written or read.
31 bar0_data ... used to write and read data at bar0_rw_offset.
diff --git a/Documentation/ABI/testing/pstore b/Documentation/ABI/testing/pstore
new file mode 100644
index 00000000000..ddf451ee2a0
--- /dev/null
+++ b/Documentation/ABI/testing/pstore
@@ -0,0 +1,41 @@
1Where: /dev/pstore/...
2Date: March 2011
3Kernel Version: 2.6.39
4Contact: tony.luck@intel.com
5Description: Generic interface to platform dependent persistent storage.
6
7 Platforms that provide a mechanism to preserve some data
8 across system reboots can register with this driver to
9 provide a generic interface to show records captured in
10 the dying moments. In the case of a panic the last part
11 of the console log is captured, but other interesting
12 data can also be saved.
13
14 # mount -t pstore -o kmsg_bytes=8000 - /dev/pstore
15
16 $ ls -l /dev/pstore
17 total 0
18 -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
19
20 Different users of this interface will result in different
21 filename prefixes. Currently two are defined:
22
23 "dmesg" - saved console log
24 "mce" - architecture dependent data from fatal h/w error
25
26 Once the information in a file has been read, removing
27 the file will signal to the underlying persistent storage
28 device that it can reclaim the space for later re-use.
29
30 $ rm /dev/pstore/dmesg-erst-1
31
32 The expectation is that all files in /dev/pstore
33 will be saved elsewhere and erased from persistent store
34 soon after boot to free up space ready for the next
35 catastrophe.
36
37 The 'kmsg_bytes' mount option changes the target amount of
38 data saved on each oops/panic. Pstore saves (possibly
39 multiple) files based on the record size of the underlying
40 persistent storage until at least this amount is reached.
41 Default is 10 Kbytes.
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
index 4873c759d53..c1eb41cb987 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -142,3 +142,67 @@ Description:
142 with the previous I/O request are enabled. When set to 2, 142 with the previous I/O request are enabled. When set to 2,
143 all merge tries are disabled. The default value is 0 - 143 all merge tries are disabled. The default value is 0 -
144 which enables all types of merge tries. 144 which enables all types of merge tries.
145
146What: /sys/block/<disk>/discard_alignment
147Date: May 2011
148Contact: Martin K. Petersen <martin.petersen@oracle.com>
149Description:
150 Devices that support discard functionality may
151 internally allocate space in units that are bigger than
152 the exported logical block size. The discard_alignment
153 parameter indicates how many bytes the beginning of the
154 device is offset from the internal allocation unit's
155 natural alignment.
156
157What: /sys/block/<disk>/<partition>/discard_alignment
158Date: May 2011
159Contact: Martin K. Petersen <martin.petersen@oracle.com>
160Description:
161 Devices that support discard functionality may
162 internally allocate space in units that are bigger than
163 the exported logical block size. The discard_alignment
164 parameter indicates how many bytes the beginning of the
165 partition is offset from the internal allocation unit's
166 natural alignment.
167
168What: /sys/block/<disk>/queue/discard_granularity
169Date: May 2011
170Contact: Martin K. Petersen <martin.petersen@oracle.com>
171Description:
172 Devices that support discard functionality may
173 internally allocate space using units that are bigger
174 than the logical block size. The discard_granularity
175 parameter indicates the size of the internal allocation
176 unit in bytes if reported by the device. Otherwise the
177 discard_granularity will be set to match the device's
178 physical block size. A discard_granularity of 0 means
179 that the device does not support discard functionality.
180
181What: /sys/block/<disk>/queue/discard_max_bytes
182Date: May 2011
183Contact: Martin K. Petersen <martin.petersen@oracle.com>
184Description:
185 Devices that support discard functionality may have
186 internal limits on the number of bytes that can be
187 trimmed or unmapped in a single operation. Some storage
188 protocols also have inherent limits on the number of
189 blocks that can be described in a single command. The
190 discard_max_bytes parameter is set by the device driver
191 to the maximum number of bytes that can be discarded in
192 a single operation. Discard requests issued to the
193 device must not exceed this limit. A discard_max_bytes
194 value of 0 means that the device does not support
195 discard functionality.
196
197What: /sys/block/<disk>/queue/discard_zeroes_data
198Date: May 2011
199Contact: Martin K. Petersen <martin.petersen@oracle.com>
200Description:
201 Devices that support discard functionality may return
202 stale or random data when a previously discarded block
203 is read back. This can cause problems if the filesystem
204 expects discarded blocks to be explicitly cleared. If a
205 device reports that it deterministically returns zeroes
206 when a discarded area is read the discard_zeroes_data
207 parameter will be set to one. Otherwise it will be 0 and
208 the result of reading a discarded area is undefined.
diff --git a/Documentation/ABI/testing/sysfs-bus-bcma b/Documentation/ABI/testing/sysfs-bus-bcma
new file mode 100644
index 00000000000..06b62badddd
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-bcma
@@ -0,0 +1,31 @@
1What: /sys/bus/bcma/devices/.../manuf
2Date: May 2011
3KernelVersion: 2.6.40
4Contact: Rafał Miłecki <zajec5@gmail.com>
5Description:
6 Each BCMA core has it's manufacturer id. See
7 include/linux/bcma/bcma.h for possible values.
8
9What: /sys/bus/bcma/devices/.../id
10Date: May 2011
11KernelVersion: 2.6.40
12Contact: Rafał Miłecki <zajec5@gmail.com>
13Description:
14 There are a few types of BCMA cores, they can be identified by
15 id field.
16
17What: /sys/bus/bcma/devices/.../rev
18Date: May 2011
19KernelVersion: 2.6.40
20Contact: Rafał Miłecki <zajec5@gmail.com>
21Description:
22 BCMA cores of the same type can still slightly differ depending
23 on their revision. Use it for detailed programming.
24
25What: /sys/bus/bcma/devices/.../class
26Date: May 2011
27KernelVersion: 2.6.40
28Contact: Rafał Miłecki <zajec5@gmail.com>
29Description:
30 Each BCMA core is identified by few fields, including class it
31 belongs to. See include/linux/bcma/bcma.h for possible values.
diff --git a/Documentation/ABI/testing/sysfs-bus-css b/Documentation/ABI/testing/sysfs-bus-css
index b585ec258a0..2979c40c10e 100644
--- a/Documentation/ABI/testing/sysfs-bus-css
+++ b/Documentation/ABI/testing/sysfs-bus-css
@@ -29,7 +29,7 @@ Contact: Cornelia Huck <cornelia.huck@de.ibm.com>
29 linux-s390@vger.kernel.org 29 linux-s390@vger.kernel.org
30Description: Contains the PIM/PAM/POM values, as reported by the 30Description: Contains the PIM/PAM/POM values, as reported by the
31 channel subsystem when last queried by the common I/O 31 channel subsystem when last queried by the common I/O
32 layer (this implies that this attribute is not neccessarily 32 layer (this implies that this attribute is not necessarily
33 in sync with the values current in the channel subsystem). 33 in sync with the values current in the channel subsystem).
34 Note: This is an I/O-subchannel specific attribute. 34 Note: This is an I/O-subchannel specific attribute.
35Users: s390-tools, HAL 35Users: s390-tools, HAL
diff --git a/Documentation/ABI/testing/sysfs-bus-media b/Documentation/ABI/testing/sysfs-bus-media
new file mode 100644
index 00000000000..7057e574154
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-media
@@ -0,0 +1,6 @@
1What: /sys/bus/media/devices/.../model
2Date: January 2011
3Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 linux-media@vger.kernel.org
5Description: Contains the device model name in UTF-8. The device version is
6 is not be appended to the model name.
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index f979d825d11..349ecf26ce1 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -74,6 +74,15 @@ Description:
74 hot-remove the PCI device and any of its children. 74 hot-remove the PCI device and any of its children.
75 Depends on CONFIG_HOTPLUG. 75 Depends on CONFIG_HOTPLUG.
76 76
77What: /sys/bus/pci/devices/.../pci_bus/.../rescan
78Date: May 2011
79Contact: Linux PCI developers <linux-pci@vger.kernel.org>
80Description:
81 Writing a non-zero value to this attribute will
82 force a rescan of the bus and all child buses,
83 and re-discover devices removed earlier from this
84 part of the device tree. Depends on CONFIG_HOTPLUG.
85
77What: /sys/bus/pci/devices/.../rescan 86What: /sys/bus/pci/devices/.../rescan
78Date: January 2009 87Date: January 2009
79Contact: Linux PCI developers <linux-pci@vger.kernel.org> 88Contact: Linux PCI developers <linux-pci@vger.kernel.org>
@@ -145,9 +154,11 @@ Date: July 2010
145Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com 154Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
146Description: 155Description:
147 Reading this attribute will provide the firmware 156 Reading this attribute will provide the firmware
148 given name(SMBIOS type 41 string) of the PCI device. 157 given name (SMBIOS type 41 string or ACPI _DSM string) of
149 The attribute will be created only if the firmware 158 the PCI device. The attribute will be created only
150 has given a name to the PCI device. 159 if the firmware has given a name to the PCI device.
160 ACPI _DSM string name will be given priority if the
161 system firmware provides SMBIOS type 41 string also.
151Users: 162Users:
152 Userspace applications interested in knowing the 163 Userspace applications interested in knowing the
153 firmware assigned name of the PCI device. 164 firmware assigned name of the PCI device.
@@ -157,12 +168,27 @@ Date: July 2010
157Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com 168Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
158Description: 169Description:
159 Reading this attribute will provide the firmware 170 Reading this attribute will provide the firmware
160 given instance(SMBIOS type 41 device type instance) 171 given instance (SMBIOS type 41 device type instance) of the
161 of the PCI device. The attribute will be created 172 PCI device. The attribute will be created only if the firmware
162 only if the firmware has given a device type instance 173 has given an instance number to the PCI device.
163 to the PCI device.
164Users: 174Users:
165 Userspace applications interested in knowing the 175 Userspace applications interested in knowing the
166 firmware assigned device type instance of the PCI 176 firmware assigned device type instance of the PCI
167 device that can help in understanding the firmware 177 device that can help in understanding the firmware
168 intended order of the PCI device. 178 intended order of the PCI device.
179
180What: /sys/bus/pci/devices/.../acpi_index
181Date: July 2010
182Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
183Description:
184 Reading this attribute will provide the firmware
185 given instance (ACPI _DSM instance number) of the PCI device.
186 The attribute will be created only if the firmware has given
187 an instance number to the PCI device. ACPI _DSM instance number
188 will be given priority if the system firmware provides SMBIOS
189 type 41 device type instance also.
190Users:
191 Userspace applications interested in knowing the
192 firmware assigned instance number of the PCI
193 device that can help in understanding the firmware
194 intended order of the PCI device.
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
index 4f29e5f1ebf..f5bb0a3bb8c 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
+++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
@@ -59,3 +59,15 @@ Kernel Version: 2.6.31
59Contact: iss_storagedev@hp.com 59Contact: iss_storagedev@hp.com
60Description: Displays the usage count (number of opens) of logical drive Y 60Description: Displays the usage count (number of opens) of logical drive Y
61 of controller X. 61 of controller X.
62
63Where: /sys/bus/pci/devices/<dev>/ccissX/resettable
64Date: February 2011
65Kernel Version: 2.6.38
66Contact: iss_storagedev@hp.com
67Description: Value of 1 indicates the controller can honor the reset_devices
68 kernel parameter. Value of 0 indicates reset_devices cannot be
69 honored. This is to allow, for example, kexec tools to be able
70 to warn the user if they designate an unresettable device as
71 a dump device, as kdump requires resetting the device in order
72 to work reliably.
73
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index 90a87e2a572..fa72ccb2282 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -1,6 +1,6 @@
1What: /sys/bus/rbd/ 1What: /sys/bus/rbd/
2Date: November 2010 2Date: November 2010
3Contact: Yehuda Sadeh <yehuda@hq.newdream.net>, 3Contact: Yehuda Sadeh <yehuda@newdream.net>,
4 Sage Weil <sage@newdream.net> 4 Sage Weil <sage@newdream.net>
5Description: 5Description:
6 6
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index edff6630c80..3646ec85d51 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -33,5 +33,5 @@ Contact: Richard Purdie <rpurdie@rpsys.net>
33Description: 33Description:
34 Invert the LED on/off state. This parameter is specific to 34 Invert the LED on/off state. This parameter is specific to
35 gpio and backlight triggers. In case of the backlight trigger, 35 gpio and backlight triggers. In case of the backlight trigger,
36 it is usefull when driving a LED which is intended to indicate 36 it is useful when driving a LED which is intended to indicate
37 a device in a standby like state. 37 a device in a standby like state.
diff --git a/Documentation/ABI/testing/sysfs-devices-mmc b/Documentation/ABI/testing/sysfs-devices-mmc
new file mode 100644
index 00000000000..5a50ab65584
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-mmc
@@ -0,0 +1,21 @@
1What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_offset
2Date: January 2011
3Contact: Chuanxiao Dong <chuanxiao.dong@intel.com>
4Description:
5 Enhanced area is a new feature defined in eMMC4.4 standard.
6 eMMC4.4 or later card can support such feature. This kind of
7 area can help to improve the card performance. If the feature
8 is enabled, this attribute will indicate the start address of
9 enhanced data area. If not, this attribute will be -EINVAL.
10 Unit Byte. Format decimal.
11
12What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_size
13Date: January 2011
14Contact: Chuanxiao Dong <chuanxiao.dong@intel.com>
15Description:
16 Enhanced area is a new feature defined in eMMC4.4 standard.
17 eMMC4.4 or later card can support such feature. This kind of
18 area can help to improve the card performance. If the feature
19 is enabled, this attribute will indicate the size of enhanced
20 data area. If not, this attribute will be -EINVAL.
21 Unit KByte. Format decimal.
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 7628cd1bc36..8ffbc25376a 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -29,9 +29,8 @@ Description:
29 "disabled" to it. 29 "disabled" to it.
30 30
31 For the devices that are not capable of generating system wakeup 31 For the devices that are not capable of generating system wakeup
32 events this file contains "\n". In that cases the user space 32 events this file is not present. In that case the device cannot
33 cannot modify the contents of this file and the device cannot be 33 be enabled to wake up the system from sleep states.
34 enabled to wake up the system.
35 34
36What: /sys/devices/.../power/control 35What: /sys/devices/.../power/control
37Date: January 2009 36Date: January 2009
@@ -85,7 +84,7 @@ Description:
85 The /sys/devices/.../wakeup_count attribute contains the number 84 The /sys/devices/.../wakeup_count attribute contains the number
86 of signaled wakeup events associated with the device. This 85 of signaled wakeup events associated with the device. This
87 attribute is read-only. If the device is not enabled to wake up 86 attribute is read-only. If the device is not enabled to wake up
88 the system from sleep states, this attribute is empty. 87 the system from sleep states, this attribute is not present.
89 88
90What: /sys/devices/.../power/wakeup_active_count 89What: /sys/devices/.../power/wakeup_active_count
91Date: September 2010 90Date: September 2010
@@ -95,7 +94,7 @@ Description:
95 number of times the processing of wakeup events associated with 94 number of times the processing of wakeup events associated with
96 the device was completed (at the kernel level). This attribute 95 the device was completed (at the kernel level). This attribute
97 is read-only. If the device is not enabled to wake up the 96 is read-only. If the device is not enabled to wake up the
98 system from sleep states, this attribute is empty. 97 system from sleep states, this attribute is not present.
99 98
100What: /sys/devices/.../power/wakeup_hit_count 99What: /sys/devices/.../power/wakeup_hit_count
101Date: September 2010 100Date: September 2010
@@ -105,7 +104,8 @@ Description:
105 number of times the processing of a wakeup event associated with 104 number of times the processing of a wakeup event associated with
106 the device might prevent the system from entering a sleep state. 105 the device might prevent the system from entering a sleep state.
107 This attribute is read-only. If the device is not enabled to 106 This attribute is read-only. If the device is not enabled to
108 wake up the system from sleep states, this attribute is empty. 107 wake up the system from sleep states, this attribute is not
108 present.
109 109
110What: /sys/devices/.../power/wakeup_active 110What: /sys/devices/.../power/wakeup_active
111Date: September 2010 111Date: September 2010
@@ -115,7 +115,7 @@ Description:
115 or 0, depending on whether or not a wakeup event associated with 115 or 0, depending on whether or not a wakeup event associated with
116 the device is being processed (1). This attribute is read-only. 116 the device is being processed (1). This attribute is read-only.
117 If the device is not enabled to wake up the system from sleep 117 If the device is not enabled to wake up the system from sleep
118 states, this attribute is empty. 118 states, this attribute is not present.
119 119
120What: /sys/devices/.../power/wakeup_total_time_ms 120What: /sys/devices/.../power/wakeup_total_time_ms
121Date: September 2010 121Date: September 2010
@@ -125,7 +125,7 @@ Description:
125 the total time of processing wakeup events associated with the 125 the total time of processing wakeup events associated with the
126 device, in milliseconds. This attribute is read-only. If the 126 device, in milliseconds. This attribute is read-only. If the
127 device is not enabled to wake up the system from sleep states, 127 device is not enabled to wake up the system from sleep states,
128 this attribute is empty. 128 this attribute is not present.
129 129
130What: /sys/devices/.../power/wakeup_max_time_ms 130What: /sys/devices/.../power/wakeup_max_time_ms
131Date: September 2010 131Date: September 2010
@@ -135,7 +135,7 @@ Description:
135 the maximum time of processing a single wakeup event associated 135 the maximum time of processing a single wakeup event associated
136 with the device, in milliseconds. This attribute is read-only. 136 with the device, in milliseconds. This attribute is read-only.
137 If the device is not enabled to wake up the system from sleep 137 If the device is not enabled to wake up the system from sleep
138 states, this attribute is empty. 138 states, this attribute is not present.
139 139
140What: /sys/devices/.../power/wakeup_last_time_ms 140What: /sys/devices/.../power/wakeup_last_time_ms
141Date: September 2010 141Date: September 2010
@@ -146,7 +146,7 @@ Description:
146 signaling the last wakeup event associated with the device, in 146 signaling the last wakeup event associated with the device, in
147 milliseconds. This attribute is read-only. If the device is 147 milliseconds. This attribute is read-only. If the device is
148 not enabled to wake up the system from sleep states, this 148 not enabled to wake up the system from sleep states, this
149 attribute is empty. 149 attribute is not present.
150 150
151What: /sys/devices/.../power/autosuspend_delay_ms 151What: /sys/devices/.../power/autosuspend_delay_ms
152Date: September 2010 152Date: September 2010
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 7564e88bfa4..e7be75b96e4 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -183,21 +183,21 @@ Description: Discover and change clock speed of CPUs
183 to learn how to control the knobs. 183 to learn how to control the knobs.
184 184
185 185
186What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X 186What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
187Date: August 2008 187Date: August 2008
188KernelVersion: 2.6.27 188KernelVersion: 2.6.27
189Contact: mark.langsdorf@amd.com 189Contact: discuss@x86-64.org
190Description: These files exist in every cpu's cache index directories. 190Description: Disable L3 cache indices
191 There are currently 2 cache_disable_# files in each 191
192 directory. Reading from these files on a supported 192 These files exist in every CPU's cache/index3 directory. Each
193 processor will return that cache disable index value 193 cache_disable_{0,1} file corresponds to one disable slot which
194 for that processor and node. Writing to one of these 194 can be used to disable a cache index. Reading from these files
195 files will cause the specificed cache index to be disabled. 195 on a processor with this functionality will return the currently
196 196 disabled index for that node. There is one L3 structure per
197 Currently, only AMD Family 10h Processors support cache index 197 node, or per internal node on MCM machines. Writing a valid
198 disable, and only for their L3 caches. See the BIOS and 198 index to one of these files will cause the specificed cache
199 Kernel Developer's Guide at 199 index to be disabled.
200 http://support.amd.com/us/Embedded_TechDocs/31116-Public-GH-BKDG_3-28_5-28-09.pdf 200
201 for formatting information and other details on the 201 All AMD processors with L3 caches provide this functionality.
202 cache index disable. 202 For details, see BKDGs at
203Users: joachim.deguara@amd.com 203 http://developer.amd.com/documentation/guides/Pages/default.aspx
diff --git a/Documentation/ABI/testing/sysfs-driver-hid b/Documentation/ABI/testing/sysfs-driver-hid
new file mode 100644
index 00000000000..b6490e14fe8
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid
@@ -0,0 +1,10 @@
1What: For USB devices : /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/report_descriptor
2 For BT devices : /sys/class/bluetooth/hci<addr>/<hid-bus>:<vendor-id>:<product-id>.<num>/report_descriptor
3 Symlink : /sys/class/hidraw/hidraw<num>/device/report_descriptor
4Date: Jan 2011
5KernelVersion: 2.0.39
6Contact: Alan Ott <alan@signal11.us>
7Description: When read, this file returns the device's raw binary HID
8 report descriptor.
9 This file cannot be written.
10Users: HIDAPI library (http://www.signal11.us/oss/hidapi)
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo b/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo
new file mode 100644
index 00000000000..55e281b0071
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo
@@ -0,0 +1,53 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/actual_profile
2Date: Januar 2011
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 1-5.
5 When read, this attribute returns the number of the actual
6 profile which is also the profile that's active on device startup.
7 When written this attribute activates the selected profile
8 immediately.
9Users: http://roccat.sourceforge.net
10
11What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/button
12Date: Januar 2011
13Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
14Description: The keyboard can store short macros with consist of 1 button with
15 several modifier keys internally.
16 When written, this file lets one set the sequence for a specific
17 button for a specific profile. Button and profile numbers are
18 included in written data. The data has to be 24 bytes long.
19 This file is writeonly.
20Users: http://roccat.sourceforge.net
21
22What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/info
23Date: Januar 2011
24Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
25Description: When read, this file returns some info about the device like the
26 installed firmware version.
27 The size of the data is 8 bytes in size.
28 This file is readonly.
29Users: http://roccat.sourceforge.net
30
31What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/key_mask
32Date: Januar 2011
33Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
34Description: The keyboard lets the user deactivate 5 certain keys like the
35 windows and application keys, to protect the user from the outcome
36 of accidentally pressing them.
37 The integer value of this attribute has bits 0-4 set depending
38 on the state of the corresponding key.
39 When read, this file returns the current state of the buttons.
40 When written, the given buttons are activated/deactivated
41 immediately.
42Users: http://roccat.sourceforge.net
43
44What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/arvo/roccatarvo<minor>/mode_key
45Date: Januar 2011
46Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
47Description: The keyboard has a condensed layout without num-lock key.
48 Instead it uses a mode-key which activates a gaming mode where
49 the assignment of the number block changes.
50 The integer value of this attribute ranges from 0 (OFF) to 1 (ON).
51 When read, this file returns the actual state of the key.
52 When written, the key is activated/deactivated immediately.
53Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
index 698b8081c47..3ca3971109b 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
@@ -16,12 +16,14 @@ Description: It is possible to switch the dpi setting of the mouse with the
16 6 3200 16 6 3200
17 17
18 This file is readonly. 18 This file is readonly.
19Users: http://roccat.sourceforge.net
19 20
20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_profile 21What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_profile
21Date: March 2010 22Date: March 2010
22Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 23Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
23Description: When read, this file returns the number of the actual profile. 24Description: When read, this file returns the number of the actual profile.
24 This file is readonly. 25 This file is readonly.
26Users: http://roccat.sourceforge.net
25 27
26What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/firmware_version 28What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/firmware_version
27Date: March 2010 29Date: March 2010
@@ -32,12 +34,13 @@ Description: When read, this file returns the raw integer version number of the
32 number the decimal point has to be shifted 2 positions to the 34 number the decimal point has to be shifted 2 positions to the
33 left. E.g. a returned value of 138 means 1.38 35 left. E.g. a returned value of 138 means 1.38
34 This file is readonly. 36 This file is readonly.
37Users: http://roccat.sourceforge.net
35 38
36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/profile[1-5] 39What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/profile[1-5]
37Date: March 2010 40Date: March 2010
38Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 41Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
39Description: The mouse can store 5 profiles which can be switched by the 42Description: The mouse can store 5 profiles which can be switched by the
40 press of a button. A profile holds informations like button 43 press of a button. A profile holds information like button
41 mappings, sensitivity, the colors of the 5 leds and light 44 mappings, sensitivity, the colors of the 5 leds and light
42 effects. 45 effects.
43 When read, these files return the respective profile. The 46 When read, these files return the respective profile. The
@@ -47,6 +50,7 @@ Description: The mouse can store 5 profiles which can be switched by the
47 The mouse will reject invalid data, whereas the profile number 50 The mouse will reject invalid data, whereas the profile number
48 stored in the profile doesn't need to fit the number of the 51 stored in the profile doesn't need to fit the number of the
49 store. 52 store.
53Users: http://roccat.sourceforge.net
50 54
51What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/settings 55What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/settings
52Date: March 2010 56Date: March 2010
@@ -57,6 +61,7 @@ Description: When read, this file returns the settings stored in the mouse.
57 When written, this file lets write settings back to the mouse. 61 When written, this file lets write settings back to the mouse.
58 The data has to be 36 bytes long. The mouse will reject invalid 62 The data has to be 36 bytes long. The mouse will reject invalid
59 data. 63 data.
64Users: http://roccat.sourceforge.net
60 65
61What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/startup_profile 66What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/startup_profile
62Date: March 2010 67Date: March 2010
@@ -66,6 +71,7 @@ Description: The integer value of this attribute ranges from 1 to 5.
66 that's active when the mouse is powered on. 71 that's active when the mouse is powered on.
67 When written, this file sets the number of the startup profile 72 When written, this file sets the number of the startup profile
68 and the mouse activates this profile immediately. 73 and the mouse activates this profile immediately.
74Users: http://roccat.sourceforge.net
69 75
70What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/tcu 76What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/tcu
71Date: March 2010 77Date: March 2010
@@ -77,6 +83,7 @@ Description: The mouse has a "Tracking Control Unit" which lets the user
77 Writing 0 in this file will switch the TCU off. 83 Writing 0 in this file will switch the TCU off.
78 Writing 1 in this file will start the calibration which takes 84 Writing 1 in this file will start the calibration which takes
79 around 6 seconds to complete and activates the TCU. 85 around 6 seconds to complete and activates the TCU.
86Users: http://roccat.sourceforge.net
80 87
81What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/weight 88What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/weight
82Date: March 2010 89Date: March 2010
@@ -96,3 +103,4 @@ Description: The mouse can be equipped with one of four supplied weights
96 4 20g 103 4 20g
97 104
98 This file is readonly. 105 This file is readonly.
106Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
index 0f9f30eb174..c1b53b8bc2a 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
@@ -1,9 +1,13 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile 1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
2Date: October 2010 2Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: When read, this file returns the number of the actual profile in 4Description: The integer value of this attribute ranges from 0-4.
5 range 0-4. 5 When read, this attribute returns the number of the actual
6 This file is readonly. 6 profile. This value is persistent, so its equivalent to the
7 profile that's active when the mouse is powered on next time.
8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately.
10Users: http://roccat.sourceforge.net
7 11
8What: /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>/firmware_version
9Date: October 2010 13Date: October 2010
@@ -14,6 +18,7 @@ Description: When read, this file returns the raw integer version number of the
14 number the decimal point has to be shifted 2 positions to the 18 number the decimal point has to be shifted 2 positions to the
15 left. E.g. a returned value of 121 means 1.21 19 left. E.g. a returned value of 121 means 1.21
16 This file is readonly. 20 This file is readonly.
21Users: http://roccat.sourceforge.net
17 22
18What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro 23What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
19Date: October 2010 24Date: October 2010
@@ -24,36 +29,39 @@ Description: The mouse can store a macro with max 500 key/button strokes
24 button for a specific profile. Button and profile numbers are 29 button for a specific profile. Button and profile numbers are
25 included in written data. The data has to be 2082 bytes long. 30 included in written data. The data has to be 2082 bytes long.
26 This file is writeonly. 31 This file is writeonly.
32Users: http://roccat.sourceforge.net
27 33
28What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons 34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons
29Date: August 2010 35Date: August 2010
30Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
31Description: The mouse can store 5 profiles which can be switched by the 37Description: The mouse can store 5 profiles which can be switched by the
32 press of a button. A profile is split in settings and buttons. 38 press of a button. A profile is split in settings and buttons.
33 profile_buttons holds informations about button layout. 39 profile_buttons holds information about button layout.
34 When written, this file lets one write the respective profile 40 When written, this file lets one write the respective profile
35 buttons back to the mouse. The data has to be 77 bytes long. 41 buttons back to the mouse. The data has to be 77 bytes long.
36 The mouse will reject invalid data. 42 The mouse will reject invalid data.
37 Which profile to write is determined by the profile number 43 Which profile to write is determined by the profile number
38 contained in the data. 44 contained in the data.
39 This file is writeonly. 45 This file is writeonly.
46Users: http://roccat.sourceforge.net
40 47
41What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons 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
42Date: August 2010 49Date: August 2010
43Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
44Description: The mouse can store 5 profiles which can be switched by the 51Description: The mouse can store 5 profiles which can be switched by the
45 press of a button. A profile is split in settings and buttons. 52 press of a button. A profile is split in settings and buttons.
46 profile_buttons holds informations about button layout. 53 profile_buttons holds information about button layout.
47 When read, these files return the respective profile buttons. 54 When read, these files return the respective profile buttons.
48 The returned data is 77 bytes in size. 55 The returned data is 77 bytes in size.
49 This file is readonly. 56 This file is readonly.
57Users: http://roccat.sourceforge.net
50 58
51What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings 59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
52Date: October 2010 60Date: October 2010
53Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 61Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
54Description: The mouse can store 5 profiles which can be switched by the 62Description: The mouse can store 5 profiles which can be switched by the
55 press of a button. A profile is split in settings and buttons. 63 press of a button. A profile is split in settings and buttons.
56 profile_settings holds informations like resolution, sensitivity 64 profile_settings holds information like resolution, sensitivity
57 and light effects. 65 and light effects.
58 When written, this file lets one write the respective profile 66 When written, this file lets one write the respective profile
59 settings back to the mouse. The data has to be 43 bytes long. 67 settings back to the mouse. The data has to be 43 bytes long.
@@ -61,17 +69,19 @@ Description: The mouse can store 5 profiles which can be switched by the
61 Which profile to write is determined by the profile number 69 Which profile to write is determined by the profile number
62 contained in the data. 70 contained in the data.
63 This file is writeonly. 71 This file is writeonly.
72Users: http://roccat.sourceforge.net
64 73
65What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings 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
66Date: August 2010 75Date: August 2010
67Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 76Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
68Description: The mouse can store 5 profiles which can be switched by the 77Description: The mouse can store 5 profiles which can be switched by the
69 press of a button. A profile is split in settings and buttons. 78 press of a button. A profile is split in settings and buttons.
70 profile_settings holds informations like resolution, sensitivity 79 profile_settings holds information like resolution, sensitivity
71 and light effects. 80 and light effects.
72 When read, these files return the respective profile settings. 81 When read, these files return the respective profile settings.
73 The returned data is 43 bytes in size. 82 The returned data is 43 bytes in size.
74 This file is readonly. 83 This file is readonly.
84Users: http://roccat.sourceforge.net
75 85
76What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor 86What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
77Date: October 2010 87Date: October 2010
@@ -80,15 +90,7 @@ Description: The mouse has a tracking- and a distance-control-unit. These
80 can be activated/deactivated and the lift-off distance can be 90 can be activated/deactivated and the lift-off distance can be
81 set. The data has to be 6 bytes long. 91 set. The data has to be 6 bytes long.
82 This file is writeonly. 92 This file is writeonly.
83 93Users: http://roccat.sourceforge.net
84What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
85Date: October 2010
86Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
87Description: The integer value of this attribute ranges from 0-4.
88 When read, this attribute returns the number of the profile
89 that's active when the mouse is powered on.
90 When written, this file sets the number of the startup profile
91 and the mouse activates this profile immediately.
92 94
93What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu 95What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
94Date: October 2010 96Date: October 2010
@@ -97,6 +99,7 @@ Description: When written a calibration process for the tracking control unit
97 can be initiated/cancelled. 99 can be initiated/cancelled.
98 The data has to be 3 bytes long. 100 The data has to be 3 bytes long.
99 This file is writeonly. 101 This file is writeonly.
102Users: http://roccat.sourceforge.net
100 103
101What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image 104What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
102Date: October 2010 105Date: October 2010
@@ -106,3 +109,4 @@ Description: When read the mouse returns a 30x30 pixel image of the
106 calibration process initiated with tcu. 109 calibration process initiated with tcu.
107 The returned data is 1028 bytes in size. 110 The returned data is 1028 bytes in size.
108 This file is readonly. 111 This file is readonly.
112Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
new file mode 100644
index 00000000000..20f937c9d84
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
@@ -0,0 +1,100 @@
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
11Date: January 2011
12Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
13Description: The integer value of this attribute ranges from 0-4.
14 When read, this attribute returns the number of the active
15 profile.
16 When written, the mouse activates this profile immediately.
17 The profile that's active when powered down is the same that's
18 active when the mouse is powered on.
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_x
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 x direction.
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
49
50What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons
51Date: January 2011
52Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
53Description: The mouse can store 5 profiles which can be switched by the
54 press of a button. A profile is split in settings and buttons.
55 profile_buttons holds information about button layout.
56 When written, this file lets one write the respective profile
57 buttons back to the mouse. The data has to be 23 bytes long.
58 The mouse will reject invalid data.
59 Which profile to write is determined by the profile number
60 contained in the data.
61 This file is writeonly.
62Users: http://roccat.sourceforge.net
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
74
75What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
76Date: January 2011
77Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
78Description: The mouse can store 5 profiles which can be switched by the
79 press of a button. A profile is split in settings and buttons.
80 profile_settings holds information like resolution, sensitivity
81 and light effects.
82 When written, this file lets one write the respective profile
83 settings back to the mouse. The data has to be 16 bytes long.
84 The mouse will reject invalid data.
85 Which profile to write is determined by the profile number
86 contained in the data.
87 This file is writeonly.
88Users: http://roccat.sourceforge.net
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
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
index 1c37b823f14..3f8de50e4ff 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -13,6 +13,7 @@ Description: It is possible to switch the cpi setting of the mouse with the
13 4 1600 13 4 1600
14 14
15 This file is readonly. 15 This file is readonly.
16Users: http://roccat.sourceforge.net
16 17
17What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile 18What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile
18Date: August 2010 19Date: August 2010
@@ -20,6 +21,7 @@ Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
20Description: When read, this file returns the number of the actual profile in 21Description: When read, this file returns the number of the actual profile in
21 range 0-4. 22 range 0-4.
22 This file is readonly. 23 This file is readonly.
24Users: http://roccat.sourceforge.net
23 25
24What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version 26What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version
25Date: August 2010 27Date: August 2010
@@ -30,13 +32,14 @@ Description: When read, this file returns the raw integer version number of the
30 number the decimal point has to be shifted 2 positions to the 32 number the decimal point has to be shifted 2 positions to the
31 left. E.g. a returned value of 138 means 1.38 33 left. E.g. a returned value of 138 means 1.38
32 This file is readonly. 34 This file is readonly.
35Users: http://roccat.sourceforge.net
33 36
34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings 37What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings
35Date: August 2010 38Date: August 2010
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 39Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the 40Description: The mouse can store 5 profiles which can be switched by the
38 press of a button. A profile is split in settings and buttons. 41 press of a button. A profile is split in settings and buttons.
39 profile_settings holds informations like resolution, sensitivity 42 profile_settings holds information like resolution, sensitivity
40 and light effects. 43 and light effects.
41 When written, this file lets one write the respective profile 44 When written, this file lets one write the respective profile
42 settings back to the mouse. The data has to be 13 bytes long. 45 settings back to the mouse. The data has to be 13 bytes long.
@@ -44,40 +47,44 @@ Description: The mouse can store 5 profiles which can be switched by the
44 Which profile to write is determined by the profile number 47 Which profile to write is determined by the profile number
45 contained in the data. 48 contained in the data.
46 This file is writeonly. 49 This file is writeonly.
50Users: http://roccat.sourceforge.net
47 51
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings 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
49Date: August 2010 53Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 54Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the 55Description: 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. 56 press of a button. A profile is split in settings and buttons.
53 profile_settings holds informations like resolution, sensitivity 57 profile_settings holds information like resolution, sensitivity
54 and light effects. 58 and light effects.
55 When read, these files return the respective profile settings. 59 When read, these files return the respective profile settings.
56 The returned data is 13 bytes in size. 60 The returned data is 13 bytes in size.
57 This file is readonly. 61 This file is readonly.
62Users: http://roccat.sourceforge.net
58 63
59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons 64What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons
60Date: August 2010 65Date: August 2010
61Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 66Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
62Description: The mouse can store 5 profiles which can be switched by the 67Description: The mouse can store 5 profiles which can be switched by the
63 press of a button. A profile is split in settings and buttons. 68 press of a button. A profile is split in settings and buttons.
64 profile_buttons holds informations about button layout. 69 profile_buttons holds information about button layout.
65 When written, this file lets one write the respective profile 70 When written, this file lets one write the respective profile
66 buttons back to the mouse. The data has to be 19 bytes long. 71 buttons back to the mouse. The data has to be 19 bytes long.
67 The mouse will reject invalid data. 72 The mouse will reject invalid data.
68 Which profile to write is determined by the profile number 73 Which profile to write is determined by the profile number
69 contained in the data. 74 contained in the data.
70 This file is writeonly. 75 This file is writeonly.
76Users: http://roccat.sourceforge.net
71 77
72What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons 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
73Date: August 2010 79Date: August 2010
74Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 80Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
75Description: The mouse can store 5 profiles which can be switched by the 81Description: The mouse can store 5 profiles which can be switched by the
76 press of a button. A profile is split in settings and buttons. 82 press of a button. A profile is split in settings and buttons.
77 profile_buttons holds informations about button layout. 83 profile_buttons holds information about button layout.
78 When read, these files return the respective profile buttons. 84 When read, these files return the respective profile buttons.
79 The returned data is 19 bytes in size. 85 The returned data is 19 bytes in size.
80 This file is readonly. 86 This file is readonly.
87Users: http://roccat.sourceforge.net
81 88
82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile 89What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile
83Date: August 2010 90Date: August 2010
@@ -86,6 +93,7 @@ Description: The integer value of this attribute ranges from 0-4.
86 When read, this attribute returns the number of the profile 93 When read, this attribute returns the number of the profile
87 that's active when the mouse is powered on. 94 that's active when the mouse is powered on.
88 This file is readonly. 95 This file is readonly.
96Users: http://roccat.sourceforge.net
89 97
90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings 98What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings
91Date: August 2010 99Date: August 2010
@@ -96,3 +104,4 @@ Description: When read, this file returns the settings stored in the mouse.
96 When written, this file lets write settings back to the mouse. 104 When written, this file lets write settings back to the mouse.
97 The data has to be 3 bytes long. The mouse will reject invalid 105 The data has to be 3 bytes long. The mouse will reject invalid
98 data. 106 data.
107Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-samsung-laptop b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
new file mode 100644
index 00000000000..0a810231aad
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
@@ -0,0 +1,19 @@
1What: /sys/devices/platform/samsung/performance_level
2Date: January 1, 2010
3KernelVersion: 2.6.33
4Contact: Greg Kroah-Hartman <gregkh@suse.de>
5Description: Some Samsung laptops have different "performance levels"
6 that are can be modified by a function key, and by this
7 sysfs file. These values don't always make a whole lot
8 of sense, but some users like to modify them to keep
9 their fans quiet at all costs. Reading from this file
10 will show the current performance level. Writing to the
11 file can change this value.
12 Valid options:
13 "silent"
14 "normal"
15 "overclock"
16 Note that not all laptops support all of these options.
17 Specifically, not all support the "overclock" option,
18 and it's still unknown if this value even changes
19 anything, other than making the user feel a bit better.
diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi b/Documentation/ABI/testing/sysfs-firmware-dmi
new file mode 100644
index 00000000000..c78f9ab01e5
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-dmi
@@ -0,0 +1,110 @@
1What: /sys/firmware/dmi/
2Date: February 2011
3Contact: Mike Waychison <mikew@google.com>
4Description:
5 Many machines' firmware (x86 and ia64) export DMI /
6 SMBIOS tables to the operating system. Getting at this
7 information is often valuable to userland, especially in
8 cases where there are OEM extensions used.
9
10 The kernel itself does not rely on the majority of the
11 information in these tables being correct. It equally
12 cannot ensure that the data as exported to userland is
13 without error either.
14
15 DMI is structured as a large table of entries, where
16 each entry has a common header indicating the type and
17 length of the entry, as well as a firmware-provided
18 'handle' that is supposed to be unique amongst all
19 entries.
20
21 Some entries are required by the specification, but many
22 others are optional. In general though, users should
23 never expect to find a specific entry type on their
24 system unless they know for certain what their firmware
25 is doing. Machine to machine experiences will vary.
26
27 Multiple entries of the same type are allowed. In order
28 to handle these duplicate entry types, each entry is
29 assigned by the operating system an 'instance', which is
30 derived from an entry type's ordinal position. That is
31 to say, if there are 'N' multiple entries with the same type
32 'T' in the DMI tables (adjacent or spread apart, it
33 doesn't matter), they will be represented in sysfs as
34 entries "T-0" through "T-(N-1)":
35
36 Example entry directories:
37
38 /sys/firmware/dmi/entries/17-0
39 /sys/firmware/dmi/entries/17-1
40 /sys/firmware/dmi/entries/17-2
41 /sys/firmware/dmi/entries/17-3
42 ...
43
44 Instance numbers are used in lieu of the firmware
45 assigned entry handles as the kernel itself makes no
46 guarantees that handles as exported are unique, and
47 there are likely firmware images that get this wrong in
48 the wild.
49
50 Each DMI entry in sysfs has the common header values
51 exported as attributes:
52
53 handle : The 16bit 'handle' that is assigned to this
54 entry by the firmware. This handle may be
55 referred to by other entries.
56 length : The length of the entry, as presented in the
57 entry itself. Note that this is _not the
58 total count of bytes associated with the
59 entry_. This value represents the length of
60 the "formatted" portion of the entry. This
61 "formatted" region is sometimes followed by
62 the "unformatted" region composed of nul
63 terminated strings, with termination signalled
64 by a two nul characters in series.
65 raw : The raw bytes of the entry. This includes the
66 "formatted" portion of the entry, the
67 "unformatted" strings portion of the entry,
68 and the two terminating nul characters.
69 type : The type of the entry. This value is the same
70 as found in the directory name. It indicates
71 how the rest of the entry should be interpreted.
72 instance: The instance ordinal of the entry for the
73 given type. This value is the same as found
74 in the parent directory name.
75 position: The ordinal position (zero-based) of the entry
76 within the entirety of the DMI entry table.
77
78 === Entry Specialization ===
79
80 Some entry types may have other information available in
81 sysfs. Not all types are specialized.
82
83 --- Type 15 - System Event Log ---
84
85 This entry allows the firmware to export a log of
86 events the system has taken. This information is
87 typically backed by nvram, but the implementation
88 details are abstracted by this table. This entry's data
89 is exported in the directory:
90
91 /sys/firmware/dmi/entries/15-0/system_event_log
92
93 and has the following attributes (documented in the
94 SMBIOS / DMI specification under "System Event Log (Type 15)":
95
96 area_length
97 header_start_offset
98 data_start_offset
99 access_method
100 status
101 change_token
102 access_method_address
103 header_format
104 per_log_type_descriptor_length
105 type_descriptors_supported_count
106
107 As well, the kernel exports the binary attribute:
108
109 raw_event_log : The raw binary bits of the event log
110 as described by the DMI entry.
diff --git a/Documentation/ABI/testing/sysfs-firmware-gsmi b/Documentation/ABI/testing/sysfs-firmware-gsmi
new file mode 100644
index 00000000000..0faa0aaf4b6
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-gsmi
@@ -0,0 +1,58 @@
1What: /sys/firmware/gsmi
2Date: March 2011
3Contact: Mike Waychison <mikew@google.com>
4Description:
5 Some servers used internally at Google have firmware
6 that provides callback functionality via explicit SMI
7 triggers. Some of the callbacks are similar to those
8 provided by the EFI runtime services page, but due to
9 historical reasons this different entry-point has been
10 used.
11
12 The gsmi driver implements the kernel's abstraction for
13 these firmware callbacks. Currently, this functionality
14 is limited to handling the system event log and getting
15 access to EFI-style variables stored in nvram.
16
17 Layout:
18
19 /sys/firmware/gsmi/vars:
20
21 This directory has the same layout (and
22 underlying implementation as /sys/firmware/efi/vars.
23 See Documentation/ABI/*/sysfs-firmware-efi-vars
24 for more information on how to interact with
25 this structure.
26
27 /sys/firmware/gsmi/append_to_eventlog - write-only:
28
29 This file takes a binary blob and passes it onto
30 the firmware to be timestamped and appended to
31 the system eventlog. The binary format is
32 interpreted by the firmware and may change from
33 platform to platform. The only kernel-enforced
34 requirement is that the blob be prefixed with a
35 32bit host-endian type used as part of the
36 firmware call.
37
38 /sys/firmware/gsmi/clear_config - write-only:
39
40 Writing any value to this file will cause the
41 entire firmware configuration to be reset to
42 "factory defaults". Callers should assume that
43 a reboot is required for the configuration to be
44 cleared.
45
46 /sys/firmware/gsmi/clear_eventlog - write-only:
47
48 This file is used to clear out a portion/the
49 whole of the system event log. Values written
50 should be values between 1 and 100 inclusive (in
51 ASCII) representing the fraction of the log to
52 clear. Not all platforms support fractional
53 clearing though, and this writes to this file
54 will error out if the firmware doesn't like your
55 submitted fraction.
56
57 Callers should assume that a reboot is needed
58 for this operation to complete.
diff --git a/Documentation/ABI/testing/sysfs-firmware-log b/Documentation/ABI/testing/sysfs-firmware-log
new file mode 100644
index 00000000000..9b58e7c5365
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-log
@@ -0,0 +1,7 @@
1What: /sys/firmware/log
2Date: February 2011
3Contact: Mike Waychison <mikew@google.com>
4Description:
5 The /sys/firmware/log is a binary file that represents a
6 read-only copy of the firmware's log if one is
7 available.
diff --git a/Documentation/ABI/testing/sysfs-fs-ext4 b/Documentation/ABI/testing/sysfs-fs-ext4
index 5fb709997d9..f22ac0872ae 100644
--- a/Documentation/ABI/testing/sysfs-fs-ext4
+++ b/Documentation/ABI/testing/sysfs-fs-ext4
@@ -48,7 +48,7 @@ Description:
48 will have its blocks allocated out of its own unique 48 will have its blocks allocated out of its own unique
49 preallocation pool. 49 preallocation pool.
50 50
51What: /sys/fs/ext4/<disk>/inode_readahead 51What: /sys/fs/ext4/<disk>/inode_readahead_blks
52Date: March 2008 52Date: March 2008
53Contact: "Theodore Ts'o" <tytso@mit.edu> 53Contact: "Theodore Ts'o" <tytso@mit.edu>
54Description: 54Description:
@@ -85,7 +85,14 @@ Date: June 2008
85Contact: "Theodore Ts'o" <tytso@mit.edu> 85Contact: "Theodore Ts'o" <tytso@mit.edu>
86Description: 86Description:
87 Tuning parameter which (if non-zero) controls the goal 87 Tuning parameter which (if non-zero) controls the goal
88 inode used by the inode allocator in p0reference to 88 inode used by the inode allocator in preference to
89 all other allocation hueristics. This is intended for 89 all other allocation heuristics. This is intended for
90 debugging use only, and should be 0 on production 90 debugging use only, and should be 0 on production
91 systems. 91 systems.
92
93What: /sys/fs/ext4/<disk>/max_writeback_mb_bump
94Date: September 2009
95Contact: "Theodore Ts'o" <tytso@mit.edu>
96Description:
97 The maximum number of megabytes the writeback code will
98 try to write out before move on to another inode.
diff --git a/Documentation/ABI/testing/sysfs-kernel-fscaps b/Documentation/ABI/testing/sysfs-kernel-fscaps
new file mode 100644
index 00000000000..50a3033b5e1
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-fscaps
@@ -0,0 +1,8 @@
1What: /sys/kernel/fscaps
2Date: February 2011
3KernelVersion: 2.6.38
4Contact: Ludwig Nussel <ludwig.nussel@suse.de>
5Description
6 Shows whether file system capabilities are honored
7 when executing a binary
8
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-cleancache b/Documentation/ABI/testing/sysfs-kernel-mm-cleancache
new file mode 100644
index 00000000000..662ae646ea1
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-cleancache
@@ -0,0 +1,11 @@
1What: /sys/kernel/mm/cleancache/
2Date: April 2011
3Contact: Dan Magenheimer <dan.magenheimer@oracle.com>
4Description:
5 /sys/kernel/mm/cleancache/ contains a number of files which
6 record a count of various cleancache operations
7 (sum across all filesystems):
8 succ_gets
9 failed_gets
10 puts
11 flushes
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop
index 41ff8ae4dee..cd9d667c3da 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-laptop
+++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop
@@ -27,7 +27,7 @@ KernelVersion: 2.6.20
27Contact: "Corentin Chary" <corentincj@iksaif.net> 27Contact: "Corentin Chary" <corentincj@iksaif.net>
28Description: 28Description:
29 Some models like the W1N have a LED display that can be 29 Some models like the W1N have a LED display that can be
30 used to display several informations. 30 used to display several items of information.
31 To control the LED display, use the following : 31 To control the LED display, use the following :
32 echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ 32 echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
33 where T control the 3 letters display, and DDD the 3 digits display. 33 where T control the 3 letters display, and DDD the 3 digits display.
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-wmi b/Documentation/ABI/testing/sysfs-platform-asus-wmi
new file mode 100644
index 00000000000..2e7df91620d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-asus-wmi
@@ -0,0 +1,31 @@
1What: /sys/devices/platform/<platform>/cpufv
2Date: Oct 2010
3KernelVersion: 2.6.37
4Contact: "Corentin Chary" <corentincj@iksaif.net>
5Description:
6 Change CPU clock configuration (write-only).
7 There are three available clock configuration:
8 * 0 -> Super Performance Mode
9 * 1 -> High Performance Mode
10 * 2 -> Power Saving Mode
11
12What: /sys/devices/platform/<platform>/camera
13Date: Jan 2010
14KernelVersion: 2.6.39
15Contact: "Corentin Chary" <corentincj@iksaif.net>
16Description:
17 Control the camera. 1 means on, 0 means off.
18
19What: /sys/devices/platform/<platform>/cardr
20Date: Jan 2010
21KernelVersion: 2.6.39
22Contact: "Corentin Chary" <corentincj@iksaif.net>
23Description:
24 Control the card reader. 1 means on, 0 means off.
25
26What: /sys/devices/platform/<platform>/touchpad
27Date: Jan 2010
28KernelVersion: 2.6.39
29Contact: "Corentin Chary" <corentincj@iksaif.net>
30Description:
31 Control the card touchpad. 1 means on, 0 means off.
diff --git a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
deleted file mode 100644
index e4b5fef5fad..00000000000
--- a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
+++ /dev/null
@@ -1,10 +0,0 @@
1What: /sys/devices/platform/eeepc-wmi/cpufv
2Date: Oct 2010
3KernelVersion: 2.6.37
4Contact: "Corentin Chary" <corentincj@iksaif.net>
5Description:
6 Change CPU clock configuration (write-only).
7 There are three available clock configuration:
8 * 0 -> Super Performance Mode
9 * 1 -> High Performance Mode
10 * 2 -> Power Saving Mode
diff --git a/Documentation/ABI/testing/sysfs-platform-kim b/Documentation/ABI/testing/sysfs-platform-kim
new file mode 100644
index 00000000000..c1653271872
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-kim
@@ -0,0 +1,48 @@
1What: /sys/devices/platform/kim/dev_name
2Date: January 2010
3KernelVersion: 2.6.38
4Contact: "Pavan Savoy" <pavan_savoy@ti.com>
5Description:
6 Name of the UART device at which the WL128x chip
7 is connected. example: "/dev/ttyS0".
8 The device name flows down to architecture specific board
9 initialization file from the SFI/ATAGS bootloader
10 firmware. The name exposed is read from the user-space
11 dameon and opens the device when install is requested.
12
13What: /sys/devices/platform/kim/baud_rate
14Date: January 2010
15KernelVersion: 2.6.38
16Contact: "Pavan Savoy" <pavan_savoy@ti.com>
17Description:
18 The maximum reliable baud-rate the host can support.
19 Different platforms tend to have different high-speed
20 UART configurations, so the baud-rate needs to be set
21 locally and also sent across to the WL128x via a HCI-VS
22 command. The entry is read and made use by the user-space
23 daemon when the ldisc install is requested.
24
25What: /sys/devices/platform/kim/flow_cntrl
26Date: January 2010
27KernelVersion: 2.6.38
28Contact: "Pavan Savoy" <pavan_savoy@ti.com>
29Description:
30 The WL128x makes use of flow control mechanism, and this
31 entry most often should be 1, the host's UART is required
32 to have the capability of flow-control, or else this
33 entry can be made use of for exceptions.
34
35What: /sys/devices/platform/kim/install
36Date: January 2010
37KernelVersion: 2.6.38
38Contact: "Pavan Savoy" <pavan_savoy@ti.com>
39Description:
40 When one of the protocols Bluetooth, FM or GPS wants to make
41 use of the shared UART transport, it registers to the shared
42 transport driver, which will signal the user-space for opening,
43 configuring baud and install line discipline via this sysfs
44 entry. This entry would be polled upon by the user-space
45 daemon managing the UART, and is notified about the change
46 by the sysfs_notify. The value would be '1' when UART needs
47 to be opened/ldisc installed, and would be '0' when UART
48 is no more required and needs to be closed.
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index 194ca446ac2..b464d12761b 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -158,3 +158,17 @@ Description:
158 successful, will make the kernel abort a subsequent transition 158 successful, will make the kernel abort a subsequent transition
159 to a sleep state if any wakeup events are reported after the 159 to a sleep state if any wakeup events are reported after the
160 write has returned. 160 write has returned.
161
162What: /sys/power/reserved_size
163Date: May 2011
164Contact: Rafael J. Wysocki <rjw@sisk.pl>
165Description:
166 The /sys/power/reserved_size file allows user space to control
167 the amount of memory reserved for allocations made by device
168 drivers during the "device freeze" stage of hibernation. It can
169 be written a string representing a non-negative integer that
170 will be used as the amount of memory to reserve for allocations
171 made by device drivers' "freeze" callbacks, in bytes.
172
173 Reading from this file will display the current value, which is
174 set to 1 MB by default.
diff --git a/Documentation/ABI/testing/sysfs-ptp b/Documentation/ABI/testing/sysfs-ptp
new file mode 100644
index 00000000000..d40d2b55050
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-ptp
@@ -0,0 +1,98 @@
1What: /sys/class/ptp/
2Date: September 2010
3Contact: Richard Cochran <richardcochran@gmail.com>
4Description:
5 This directory contains files and directories
6 providing a standardized interface to the ancillary
7 features of PTP hardware clocks.
8
9What: /sys/class/ptp/ptpN/
10Date: September 2010
11Contact: Richard Cochran <richardcochran@gmail.com>
12Description:
13 This directory contains the attributes of the Nth PTP
14 hardware clock registered into the PTP class driver
15 subsystem.
16
17What: /sys/class/ptp/ptpN/clock_name
18Date: September 2010
19Contact: Richard Cochran <richardcochran@gmail.com>
20Description:
21 This file contains the name of the PTP hardware clock
22 as a human readable string.
23
24What: /sys/class/ptp/ptpN/max_adjustment
25Date: September 2010
26Contact: Richard Cochran <richardcochran@gmail.com>
27Description:
28 This file contains the PTP hardware clock's maximum
29 frequency adjustment value (a positive integer) in
30 parts per billion.
31
32What: /sys/class/ptp/ptpN/n_alarms
33Date: September 2010
34Contact: Richard Cochran <richardcochran@gmail.com>
35Description:
36 This file contains the number of periodic or one shot
37 alarms offer by the PTP hardware clock.
38
39What: /sys/class/ptp/ptpN/n_external_timestamps
40Date: September 2010
41Contact: Richard Cochran <richardcochran@gmail.com>
42Description:
43 This file contains the number of external timestamp
44 channels offered by the PTP hardware clock.
45
46What: /sys/class/ptp/ptpN/n_periodic_outputs
47Date: September 2010
48Contact: Richard Cochran <richardcochran@gmail.com>
49Description:
50 This file contains the number of programmable periodic
51 output channels offered by the PTP hardware clock.
52
53What: /sys/class/ptp/ptpN/pps_avaiable
54Date: September 2010
55Contact: Richard Cochran <richardcochran@gmail.com>
56Description:
57 This file indicates whether the PTP hardware clock
58 supports a Pulse Per Second to the host CPU. Reading
59 "1" means that the PPS is supported, while "0" means
60 not supported.
61
62What: /sys/class/ptp/ptpN/extts_enable
63Date: September 2010
64Contact: Richard Cochran <richardcochran@gmail.com>
65Description:
66 This write-only file enables or disables external
67 timestamps. To enable external timestamps, write the
68 channel index followed by a "1" into the file.
69 To disable external timestamps, write the channel
70 index followed by a "0" into the file.
71
72What: /sys/class/ptp/ptpN/fifo
73Date: September 2010
74Contact: Richard Cochran <richardcochran@gmail.com>
75Description:
76 This file provides timestamps on external events, in
77 the form of three integers: channel index, seconds,
78 and nanoseconds.
79
80What: /sys/class/ptp/ptpN/period
81Date: September 2010
82Contact: Richard Cochran <richardcochran@gmail.com>
83Description:
84 This write-only file enables or disables periodic
85 outputs. To enable a periodic output, write five
86 integers into the file: channel index, start time
87 seconds, start time nanoseconds, period seconds, and
88 period nanoseconds. To disable a periodic output, set
89 all the seconds and nanoseconds values to zero.
90
91What: /sys/class/ptp/ptpN/pps_enable
92Date: September 2010
93Contact: Richard Cochran <richardcochran@gmail.com>
94Description:
95 This write-only file enables or disables delivery of
96 PPS events to the Linux PPS subsystem. To enable PPS
97 events, write a "1" into the file. To disable events,
98 write a "0" into the file.
diff --git a/Documentation/Changes b/Documentation/Changes
index 4fb88f15f2e..5f4828a034e 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -35,7 +35,7 @@ o util-linux 2.10o # fdformat --version
35o module-init-tools 0.9.10 # depmod -V 35o module-init-tools 0.9.10 # depmod -V
36o e2fsprogs 1.41.4 # e2fsck -V 36o e2fsprogs 1.41.4 # e2fsck -V
37o jfsutils 1.1.3 # fsck.jfs -V 37o jfsutils 1.1.3 # fsck.jfs -V
38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs 38o reiserfsprogs 3.6.3 # reiserfsck -V
39o xfsprogs 2.6.0 # xfs_db -V 39o xfsprogs 2.6.0 # xfs_db -V
40o squashfs-tools 4.0 # mksquashfs -version 40o squashfs-tools 4.0 # mksquashfs -version
41o btrfs-progs 0.18 # btrfsck 41o btrfs-progs 0.18 # btrfsck
@@ -46,9 +46,9 @@ o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
46o nfs-utils 1.0.5 # showmount --version 46o nfs-utils 1.0.5 # showmount --version
47o procps 3.2.0 # ps --version 47o procps 3.2.0 # ps --version
48o oprofile 0.9 # oprofiled --version 48o oprofile 0.9 # oprofiled --version
49o udev 081 # udevinfo -V 49o udev 081 # udevd --version
50o grub 0.93 # grub --version 50o grub 0.93 # grub --version || grub-install --version
51o mcelog 0.6 51o mcelog 0.6 # mcelog --version
52o iptables 1.4.2 # iptables -V 52o iptables 1.4.2 # iptables -V
53 53
54 54
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 8bb37237ebd..58b0bf91783 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -168,6 +168,13 @@ Do not unnecessarily use braces where a single statement will do.
168if (condition) 168if (condition)
169 action(); 169 action();
170 170
171and
172
173if (condition)
174 do_this();
175else
176 do_that();
177
171This does not apply if one branch of a conditional statement is a single 178This does not apply if one branch of a conditional statement is a single
172statement. Use braces in both branches. 179statement. Use braces in both branches.
173 180
@@ -659,7 +666,7 @@ There are a number of driver model diagnostic macros in <linux/device.h>
659which you should use to make sure messages are matched to the right device 666which you should use to make sure messages are matched to the right device
660and driver, and are tagged with the right level: dev_err(), dev_warn(), 667and driver, and are tagged with the right level: dev_err(), dev_warn(),
661dev_info(), and so forth. For messages that aren't associated with a 668dev_info(), and so forth. For messages that aren't associated with a
662particular device, <linux/kernel.h> defines pr_debug() and pr_info(). 669particular device, <linux/printk.h> defines pr_debug() and pr_info().
663 670
664Coming up with good debugging messages can be quite a challenge; and once 671Coming up with good debugging messages can be quite a challenge; and once
665you have them, they can be a huge help for remote troubleshooting. Such 672you have them, they can be a huge help for remote troubleshooting. Such
@@ -819,6 +826,3 @@ language C, URL: http://www.open-std.org/JTC1/SC22/WG14/
819Kernel CodingStyle, by greg@kroah.com at OLS 2002: 826Kernel CodingStyle, by greg@kroah.com at OLS 2002:
820http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ 827http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
821 828
822--
823Last updated on 2007-July-13.
824
diff --git a/Documentation/DocBook/.gitignore b/Documentation/DocBook/.gitignore
index c6def352fe3..679034cbd68 100644
--- a/Documentation/DocBook/.gitignore
+++ b/Documentation/DocBook/.gitignore
@@ -8,3 +8,4 @@
8*.dvi 8*.dvi
9*.log 9*.log
10*.out 10*.out
11media/
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 8b6e00a7103..3cebfa0d161 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -53,7 +53,9 @@ MAN := $(patsubst %.xml, %.9, $(BOOKS))
53mandocs: $(MAN) 53mandocs: $(MAN)
54 54
55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ 55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
56 cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/ 56 cp $(srctree)/Documentation/DocBook/dvb/*.png \
57 $(srctree)/Documentation/DocBook/v4l/*.gif \
58 $(objtree)/Documentation/DocBook/media/
57 59
58xmldoclinks: 60xmldoclinks:
59ifneq ($(objtree),$(srctree)) 61ifneq ($(objtree),$(srctree))
@@ -71,7 +73,7 @@ installmandocs: mandocs
71### 73###
72#External programs used 74#External programs used
73KERNELDOC = $(srctree)/scripts/kernel-doc 75KERNELDOC = $(srctree)/scripts/kernel-doc
74DOCPROC = $(objtree)/scripts/basic/docproc 76DOCPROC = $(objtree)/scripts/docproc
75 77
76XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl 78XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl
77XMLTOFLAGS += --skip-validation 79XMLTOFLAGS += --skip-validation
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 36f63d4a0a0..b638e50cf8f 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -96,10 +96,10 @@ X!Iinclude/linux/kobject.h
96 96
97 <chapter id="devdrivers"> 97 <chapter id="devdrivers">
98 <title>Device drivers infrastructure</title> 98 <title>Device drivers infrastructure</title>
99 <sect1><title>The Basic Device Driver-Model Structures </title>
100!Iinclude/linux/device.h
101 </sect1>
99 <sect1><title>Device Drivers Base</title> 102 <sect1><title>Device Drivers Base</title>
100<!--
101X!Iinclude/linux/device.h
102-->
103!Edrivers/base/driver.c 103!Edrivers/base/driver.c
104!Edrivers/base/core.c 104!Edrivers/base/core.c
105!Edrivers/base/class.c 105!Edrivers/base/class.c
diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml
index ad8678d4891..9fad86ce7f5 100644
--- a/Documentation/DocBook/dvb/dvbapi.xml
+++ b/Documentation/DocBook/dvb/dvbapi.xml
@@ -35,6 +35,14 @@
35<revhistory> 35<revhistory>
36<!-- Put document revisions here, newest first. --> 36<!-- Put document revisions here, newest first. -->
37<revision> 37<revision>
38 <revnumber>2.0.4</revnumber>
39 <date>2011-05-06</date>
40 <authorinitials>mcc</authorinitials>
41 <revremark>
42 Add more information about DVB APIv5, better describing the frontend GET/SET props ioctl's.
43 </revremark>
44</revision>
45<revision>
38 <revnumber>2.0.3</revnumber> 46 <revnumber>2.0.3</revnumber>
39 <date>2010-07-03</date> 47 <date>2010-07-03</date>
40 <authorinitials>mcc</authorinitials> 48 <authorinitials>mcc</authorinitials>
diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
index 5f57c7ccd4b..b5365f61d69 100644
--- a/Documentation/DocBook/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/dvb/dvbproperty.xml
@@ -1,6 +1,330 @@
1<section id="FE_GET_PROPERTY"> 1<section id="FE_GET_SET_PROPERTY">
2<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title> 2<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title>
3 3
4<programlisting>
5/* Reserved fields should be set to 0 */
6struct dtv_property {
7 __u32 cmd;
8 union {
9 __u32 data;
10 struct {
11 __u8 data[32];
12 __u32 len;
13 __u32 reserved1[3];
14 void *reserved2;
15 } buffer;
16 } u;
17 int result;
18} __attribute__ ((packed));
19
20/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
21#define DTV_IOCTL_MAX_MSGS 64
22
23struct dtv_properties {
24 __u32 num;
25 struct dtv_property *props;
26};
27</programlisting>
28
29<section id="FE_GET_PROPERTY">
30<title>FE_GET_PROPERTY</title>
31<para>DESCRIPTION
32</para>
33<informaltable><tgroup cols="1"><tbody><row><entry
34 align="char">
35<para>This ioctl call returns one or more frontend properties. This call only
36 requires read-only access to the device.</para>
37</entry>
38 </row></tbody></tgroup></informaltable>
39<para>SYNOPSIS
40</para>
41<informaltable><tgroup cols="1"><tbody><row><entry
42 align="char">
43<para>int ioctl(int fd, int request = <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>,
44 dtv_properties &#x22C6;props);</para>
45</entry>
46 </row></tbody></tgroup></informaltable>
47<para>PARAMETERS
48</para>
49<informaltable><tgroup cols="2"><tbody><row><entry align="char">
50<para>int fd</para>
51</entry><entry
52 align="char">
53<para>File descriptor returned by a previous call to open().</para>
54</entry>
55 </row><row><entry
56 align="char">
57<para>int num</para>
58</entry><entry
59 align="char">
60<para>Equals <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> for this command.</para>
61</entry>
62 </row><row><entry
63 align="char">
64<para>struct dtv_property *props</para>
65</entry><entry
66 align="char">
67<para>Points to the location where the front-end property commands are stored.</para>
68</entry>
69 </row></tbody></tgroup></informaltable>
70<para>ERRORS</para>
71<informaltable><tgroup cols="2"><tbody><row>
72 <entry align="char"><para>EINVAL</para></entry>
73 <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>
74 </row><row>
75 <entry align="char"><para>ENOMEM</para></entry>
76 <entry align="char"><para>Out of memory.</para></entry>
77 </row><row>
78 <entry align="char"><para>EFAULT</para></entry>
79 <entry align="char"><para>Failure while copying data from/to userspace.</para></entry>
80 </row><row>
81 <entry align="char"><para>EOPNOTSUPP</para></entry>
82 <entry align="char"><para>Property type not supported.</para></entry>
83 </row></tbody></tgroup></informaltable>
84</section>
85
86<section id="FE_SET_PROPERTY">
87<title>FE_SET_PROPERTY</title>
88<para>DESCRIPTION
89</para>
90<informaltable><tgroup cols="1"><tbody><row><entry
91 align="char">
92<para>This ioctl call sets one or more frontend properties. This call only
93 requires read-only access to the device.</para>
94</entry>
95 </row></tbody></tgroup></informaltable>
96<para>SYNOPSIS
97</para>
98<informaltable><tgroup cols="1"><tbody><row><entry
99 align="char">
100<para>int ioctl(int fd, int request = <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,
101 dtv_properties &#x22C6;props);</para>
102</entry>
103 </row></tbody></tgroup></informaltable>
104<para>PARAMETERS
105</para>
106<informaltable><tgroup cols="2"><tbody><row><entry align="char">
107<para>int fd</para>
108</entry><entry
109 align="char">
110<para>File descriptor returned by a previous call to open().</para>
111</entry>
112 </row><row><entry
113 align="char">
114<para>int num</para>
115</entry><entry
116 align="char">
117<para>Equals <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link> for this command.</para>
118</entry>
119 </row><row><entry
120 align="char">
121<para>struct dtv_property *props</para>
122</entry><entry
123 align="char">
124<para>Points to the location where the front-end property commands are stored.</para>
125</entry>
126 </row></tbody></tgroup></informaltable>
127<para>ERRORS
128</para>
129<informaltable><tgroup cols="2"><tbody><row>
130 <entry align="char"><para>EINVAL</para></entry>
131 <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>
132 </row><row>
133 <entry align="char"><para>ENOMEM</para></entry>
134 <entry align="char"><para>Out of memory.</para></entry>
135 </row><row>
136 <entry align="char"><para>EFAULT</para></entry>
137 <entry align="char"><para>Failure while copying data from/to userspace.</para></entry>
138 </row><row>
139 <entry align="char"><para>EOPNOTSUPP</para></entry>
140 <entry align="char"><para>Property type not supported.</para></entry>
141 </row></tbody></tgroup></informaltable>
142</section>
143
144<section>
145 <title>Property types</title>
146<para>
147On <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>/<link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,
148the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to
149get/set up to 64 properties. The actual meaning of each property is described on the next sections.
150</para>
151
152<para>The available frontend property types are:</para>
153<programlisting>
154#define DTV_UNDEFINED 0
155#define DTV_TUNE 1
156#define DTV_CLEAR 2
157#define DTV_FREQUENCY 3
158#define DTV_MODULATION 4
159#define DTV_BANDWIDTH_HZ 5
160#define DTV_INVERSION 6
161#define DTV_DISEQC_MASTER 7
162#define DTV_SYMBOL_RATE 8
163#define DTV_INNER_FEC 9
164#define DTV_VOLTAGE 10
165#define DTV_TONE 11
166#define DTV_PILOT 12
167#define DTV_ROLLOFF 13
168#define DTV_DISEQC_SLAVE_REPLY 14
169#define DTV_FE_CAPABILITY_COUNT 15
170#define DTV_FE_CAPABILITY 16
171#define DTV_DELIVERY_SYSTEM 17
172#define DTV_ISDBT_PARTIAL_RECEPTION 18
173#define DTV_ISDBT_SOUND_BROADCASTING 19
174#define DTV_ISDBT_SB_SUBCHANNEL_ID 20
175#define DTV_ISDBT_SB_SEGMENT_IDX 21
176#define DTV_ISDBT_SB_SEGMENT_COUNT 22
177#define DTV_ISDBT_LAYERA_FEC 23
178#define DTV_ISDBT_LAYERA_MODULATION 24
179#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
180#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
181#define DTV_ISDBT_LAYERB_FEC 27
182#define DTV_ISDBT_LAYERB_MODULATION 28
183#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
184#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
185#define DTV_ISDBT_LAYERC_FEC 31
186#define DTV_ISDBT_LAYERC_MODULATION 32
187#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
188#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
189#define DTV_API_VERSION 35
190#define DTV_CODE_RATE_HP 36
191#define DTV_CODE_RATE_LP 37
192#define DTV_GUARD_INTERVAL 38
193#define DTV_TRANSMISSION_MODE 39
194#define DTV_HIERARCHY 40
195#define DTV_ISDBT_LAYER_ENABLED 41
196#define DTV_ISDBS_TS_ID 42
197</programlisting>
198</section>
199
200<section id="fe_property_common">
201 <title>Parameters that are common to all Digital TV standards</title>
202 <section id="DTV_FREQUENCY">
203 <title><constant>DTV_FREQUENCY</constant></title>
204
205 <para>Central frequency of the channel, in HZ.</para>
206
207 <para>Notes:</para>
208 <para>1)For ISDB-T, the channels are usually transmitted with an offset of 143kHz.
209 E.g. a valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of
210 the channel which is 6MHz.</para>
211
212 <para>2)As in ISDB-Tsb the channel consists of only one or three segments the
213 frequency step is 429kHz, 3*429 respectively. As for ISDB-T the
214 central frequency of the channel is expected.</para>
215 </section>
216
217 <section id="DTV_BANDWIDTH_HZ">
218 <title><constant>DTV_BANDWIDTH_HZ</constant></title>
219
220 <para>Bandwidth for the channel, in HZ.</para>
221
222 <para>Possible values:
223 <constant>1712000</constant>,
224 <constant>5000000</constant>,
225 <constant>6000000</constant>,
226 <constant>7000000</constant>,
227 <constant>8000000</constant>,
228 <constant>10000000</constant>.
229 </para>
230
231 <para>Notes:</para>
232
233 <para>1) For ISDB-T it should be always 6000000Hz (6MHz)</para>
234 <para>2) For ISDB-Tsb it can vary depending on the number of connected segments</para>
235 <para>3) Bandwidth doesn't apply for DVB-C transmissions, as the bandwidth
236 for DVB-C depends on the symbol rate</para>
237 <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from
238 other parameters (DTV_ISDBT_SB_SEGMENT_IDX,
239 DTV_ISDBT_SB_SEGMENT_COUNT).</para>
240 <para>5) DVB-T supports 6, 7 and 8MHz.</para>
241 <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para>
242 </section>
243
244 <section id="DTV_DELIVERY_SYSTEM">
245 <title><constant>DTV_DELIVERY_SYSTEM</constant></title>
246
247 <para>Specifies the type of Delivery system</para>
248
249 <para>Possible values: </para>
250<programlisting>
251typedef enum fe_delivery_system {
252 SYS_UNDEFINED,
253 SYS_DVBC_ANNEX_AC,
254 SYS_DVBC_ANNEX_B,
255 SYS_DVBT,
256 SYS_DSS,
257 SYS_DVBS,
258 SYS_DVBS2,
259 SYS_DVBH,
260 SYS_ISDBT,
261 SYS_ISDBS,
262 SYS_ISDBC,
263 SYS_ATSC,
264 SYS_ATSCMH,
265 SYS_DMBTH,
266 SYS_CMMB,
267 SYS_DAB,
268 SYS_DVBT2,
269} fe_delivery_system_t;
270</programlisting>
271
272 </section>
273
274 <section id="DTV_TRANSMISSION_MODE">
275 <title><constant>DTV_TRANSMISSION_MODE</constant></title>
276
277 <para>Specifies the number of carriers used by the standard</para>
278
279 <para>Possible values are:</para>
280<programlisting>
281typedef enum fe_transmit_mode {
282 TRANSMISSION_MODE_2K,
283 TRANSMISSION_MODE_8K,
284 TRANSMISSION_MODE_AUTO,
285 TRANSMISSION_MODE_4K,
286 TRANSMISSION_MODE_1K,
287 TRANSMISSION_MODE_16K,
288 TRANSMISSION_MODE_32K,
289} fe_transmit_mode_t;
290</programlisting>
291
292 <para>Notes:</para>
293 <para>1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called
294 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>
295
296 <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the
297 hardware will try to find the correct FFT-size (if capable) and will
298 use TMCC to fill in the missing parameters.</para>
299 <para>3) DVB-T specifies 2K and 8K as valid sizes.</para>
300 <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>
301 </section>
302
303 <section id="DTV_GUARD_INTERVAL">
304 <title><constant>DTV_GUARD_INTERVAL</constant></title>
305
306 <para>Possible values are:</para>
307<programlisting>
308typedef enum fe_guard_interval {
309 GUARD_INTERVAL_1_32,
310 GUARD_INTERVAL_1_16,
311 GUARD_INTERVAL_1_8,
312 GUARD_INTERVAL_1_4,
313 GUARD_INTERVAL_AUTO,
314 GUARD_INTERVAL_1_128,
315 GUARD_INTERVAL_19_128,
316 GUARD_INTERVAL_19_256,
317} fe_guard_interval_t;
318</programlisting>
319
320 <para>Notes:</para>
321 <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will
322 try to find the correct guard interval (if capable) and will use TMCC to fill
323 in the missing parameters.</para>
324 <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para>
325 </section>
326</section>
327
4<section id="isdbt"> 328<section id="isdbt">
5 <title>ISDB-T frontend</title> 329 <title>ISDB-T frontend</title>
6 <para>This section describes shortly what are the possible parameters in the Linux 330 <para>This section describes shortly what are the possible parameters in the Linux
@@ -32,73 +356,6 @@
32 356
33 <para>Parameters used by ISDB-T and ISDB-Tsb.</para> 357 <para>Parameters used by ISDB-T and ISDB-Tsb.</para>
34 358
35 <section id="isdbt-parms">
36 <title>Parameters that are common with DVB-T and ATSC</title>
37
38 <section id="isdbt-freq">
39 <title><constant>DTV_FREQUENCY</constant></title>
40
41 <para>Central frequency of the channel.</para>
42
43 <para>For ISDB-T the channels are usally transmitted with an offset of 143kHz. E.g. a
44 valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of
45 the channel which is 6MHz.</para>
46
47 <para>As in ISDB-Tsb the channel consists of only one or three segments the
48 frequency step is 429kHz, 3*429 respectively. As for ISDB-T the
49 central frequency of the channel is expected.</para>
50 </section>
51
52 <section id="isdbt-bw">
53 <title><constant>DTV_BANDWIDTH_HZ</constant> (optional)</title>
54
55 <para>Possible values:</para>
56
57 <para>For ISDB-T it should be always 6000000Hz (6MHz)</para>
58 <para>For ISDB-Tsb it can vary depending on the number of connected segments</para>
59
60 <para>Note: Hardware specific values might be given here, but standard
61 applications should not bother to set a value to this field as
62 standard demods are ignoring it anyway.</para>
63
64 <para>Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from
65 other parameters (DTV_ISDBT_SB_SEGMENT_IDX,
66 DTV_ISDBT_SB_SEGMENT_COUNT).</para>
67 </section>
68
69 <section id="isdbt-delivery-sys">
70 <title><constant>DTV_DELIVERY_SYSTEM</constant></title>
71
72 <para>Possible values: <constant>SYS_ISDBT</constant></para>
73 </section>
74
75 <section id="isdbt-tx-mode">
76 <title><constant>DTV_TRANSMISSION_MODE</constant></title>
77
78 <para>ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called
79 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>
80
81 <para>Possible values: <constant>TRANSMISSION_MODE_2K</constant>, <constant>TRANSMISSION_MODE_8K</constant>,
82 <constant>TRANSMISSION_MODE_AUTO</constant>, <constant>TRANSMISSION_MODE_4K</constant></para>
83
84 <para>If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the
85 hardware will try to find the correct FFT-size (if capable) and will
86 use TMCC to fill in the missing parameters.</para>
87
88 <para><constant>TRANSMISSION_MODE_4K</constant> is added at the same time as the other new parameters.</para>
89 </section>
90
91 <section id="isdbt-guard-interval">
92 <title><constant>DTV_GUARD_INTERVAL</constant></title>
93
94 <para>Possible values: <constant>GUARD_INTERVAL_1_32</constant>, <constant>GUARD_INTERVAL_1_16</constant>, <constant>GUARD_INTERVAL_1_8</constant>,
95 <constant>GUARD_INTERVAL_1_4</constant>, <constant>GUARD_INTERVAL_AUTO</constant></para>
96
97 <para>If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will
98 try to find the correct guard interval (if capable) and will use TMCC to fill
99 in the missing parameters.</para>
100 </section>
101 </section>
102 <section id="isdbt-new-parms"> 359 <section id="isdbt-new-parms">
103 <title>ISDB-T only parameters</title> 360 <title>ISDB-T only parameters</title>
104 361
@@ -314,5 +571,20 @@
314 </section> 571 </section>
315 </section> 572 </section>
316 </section> 573 </section>
574 <section id="dvbt2-params">
575 <title>DVB-T2 parameters</title>
576
577 <para>This section covers parameters that apply only to the DVB-T2 delivery method. DVB-T2
578 support is currently in the early stages development so expect this section to grow
579 and become more detailed with time.</para>
580
581 <section id="dvbt2-plp-id">
582 <title><constant>DTV_DVBT2_PLP_ID</constant></title>
583
584 <para>DVB-T2 supports Physical Layer Pipes (PLP) to allow transmission of
585 many data types via a single multiplex. The API will soon support this
586 at which point this section will be expanded.</para>
587 </section>
588 </section>
317</section> 589</section>
318</section> 590</section>
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
index d08e0d40141..d792f789ad3 100644
--- a/Documentation/DocBook/dvb/frontend.h.xml
+++ b/Documentation/DocBook/dvb/frontend.h.xml
@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode {
176 TRANSMISSION_MODE_2K, 176 TRANSMISSION_MODE_2K,
177 TRANSMISSION_MODE_8K, 177 TRANSMISSION_MODE_8K,
178 TRANSMISSION_MODE_AUTO, 178 TRANSMISSION_MODE_AUTO,
179 TRANSMISSION_MODE_4K 179 TRANSMISSION_MODE_4K,
180 TRANSMISSION_MODE_1K,
181 TRANSMISSION_MODE_16K,
182 TRANSMISSION_MODE_32K,
180} fe_transmit_mode_t; 183} fe_transmit_mode_t;
181 184
182typedef enum fe_bandwidth { 185typedef enum fe_bandwidth {
183 BANDWIDTH_8_MHZ, 186 BANDWIDTH_8_MHZ,
184 BANDWIDTH_7_MHZ, 187 BANDWIDTH_7_MHZ,
185 BANDWIDTH_6_MHZ, 188 BANDWIDTH_6_MHZ,
186 BANDWIDTH_AUTO 189 BANDWIDTH_AUTO,
190 BANDWIDTH_5_MHZ,
191 BANDWIDTH_10_MHZ,
192 BANDWIDTH_1_712_MHZ,
187} fe_bandwidth_t; 193} fe_bandwidth_t;
188 194
189 195
@@ -192,7 +198,10 @@ typedef enum fe_guard_interval {
192 GUARD_INTERVAL_1_16, 198 GUARD_INTERVAL_1_16,
193 GUARD_INTERVAL_1_8, 199 GUARD_INTERVAL_1_8,
194 GUARD_INTERVAL_1_4, 200 GUARD_INTERVAL_1_4,
195 GUARD_INTERVAL_AUTO 201 GUARD_INTERVAL_AUTO,
202 GUARD_INTERVAL_1_128,
203 GUARD_INTERVAL_19_128,
204 GUARD_INTERVAL_19_256,
196} fe_guard_interval_t; 205} fe_guard_interval_t;
197 206
198 207
@@ -306,7 +315,9 @@ struct dvb_frontend_event {
306 315
307#define DTV_ISDBS_TS_ID 42 316#define DTV_ISDBS_TS_ID 42
308 317
309#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID 318#define DTV_DVBT2_PLP_ID 43
319
320#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID
310 321
311typedef enum fe_pilot { 322typedef enum fe_pilot {
312 PILOT_ON, 323 PILOT_ON,
@@ -338,6 +349,7 @@ typedef enum fe_delivery_system {
338 SYS_DMBTH, 349 SYS_DMBTH,
339 SYS_CMMB, 350 SYS_CMMB,
340 SYS_DAB, 351 SYS_DAB,
352 SYS_DVBT2,
341} fe_delivery_system_t; 353} fe_delivery_system_t;
342 354
343struct dtv_cmds_h { 355struct dtv_cmds_h {
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml
index 78d756de590..60c6976fb31 100644
--- a/Documentation/DocBook/dvb/frontend.xml
+++ b/Documentation/DocBook/dvb/frontend.xml
@@ -139,7 +139,7 @@ consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
139<section id="frontend_sec_tone"> 139<section id="frontend_sec_tone">
140<title>SEC continuous tone</title> 140<title>SEC continuous tone</title>
141 141
142<para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the 142<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
143high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to 143high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
144be switched consistently to the DiSEqC commands as described in the DiSEqC 144be switched consistently to the DiSEqC commands as described in the DiSEqC
145spec.</para> 145spec.</para>
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index fb10fd08c05..b3422341d65 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -191,8 +191,8 @@
191 <para> 191 <para>
192 Whenever an interrupt triggers, the lowlevel arch code calls into 192 Whenever an interrupt triggers, the lowlevel arch code calls into
193 the generic interrupt code by calling desc->handle_irq(). 193 the generic interrupt code by calling desc->handle_irq().
194 This highlevel IRQ handling function only uses desc->chip primitives 194 This highlevel IRQ handling function only uses desc->irq_data.chip
195 referenced by the assigned chip descriptor structure. 195 primitives referenced by the assigned chip descriptor structure.
196 </para> 196 </para>
197 </sect1> 197 </sect1>
198 <sect1 id="Highlevel_Driver_API"> 198 <sect1 id="Highlevel_Driver_API">
@@ -206,11 +206,11 @@
206 <listitem><para>enable_irq()</para></listitem> 206 <listitem><para>enable_irq()</para></listitem>
207 <listitem><para>disable_irq_nosync() (SMP only)</para></listitem> 207 <listitem><para>disable_irq_nosync() (SMP only)</para></listitem>
208 <listitem><para>synchronize_irq() (SMP only)</para></listitem> 208 <listitem><para>synchronize_irq() (SMP only)</para></listitem>
209 <listitem><para>set_irq_type()</para></listitem> 209 <listitem><para>irq_set_irq_type()</para></listitem>
210 <listitem><para>set_irq_wake()</para></listitem> 210 <listitem><para>irq_set_irq_wake()</para></listitem>
211 <listitem><para>set_irq_data()</para></listitem> 211 <listitem><para>irq_set_handler_data()</para></listitem>
212 <listitem><para>set_irq_chip()</para></listitem> 212 <listitem><para>irq_set_chip()</para></listitem>
213 <listitem><para>set_irq_chip_data()</para></listitem> 213 <listitem><para>irq_set_chip_data()</para></listitem>
214 </itemizedlist> 214 </itemizedlist>
215 See the autogenerated function documentation for details. 215 See the autogenerated function documentation for details.
216 </para> 216 </para>
@@ -225,6 +225,8 @@
225 <listitem><para>handle_fasteoi_irq</para></listitem> 225 <listitem><para>handle_fasteoi_irq</para></listitem>
226 <listitem><para>handle_simple_irq</para></listitem> 226 <listitem><para>handle_simple_irq</para></listitem>
227 <listitem><para>handle_percpu_irq</para></listitem> 227 <listitem><para>handle_percpu_irq</para></listitem>
228 <listitem><para>handle_edge_eoi_irq</para></listitem>
229 <listitem><para>handle_bad_irq</para></listitem>
228 </itemizedlist> 230 </itemizedlist>
229 The interrupt flow handlers (either predefined or architecture 231 The interrupt flow handlers (either predefined or architecture
230 specific) are assigned to specific interrupts by the architecture 232 specific) are assigned to specific interrupts by the architecture
@@ -241,13 +243,13 @@
241 <programlisting> 243 <programlisting>
242default_enable(struct irq_data *data) 244default_enable(struct irq_data *data)
243{ 245{
244 desc->chip->irq_unmask(data); 246 desc->irq_data.chip->irq_unmask(data);
245} 247}
246 248
247default_disable(struct irq_data *data) 249default_disable(struct irq_data *data)
248{ 250{
249 if (!delay_disable(data)) 251 if (!delay_disable(data))
250 desc->chip->irq_mask(data); 252 desc->irq_data.chip->irq_mask(data);
251} 253}
252 254
253default_ack(struct irq_data *data) 255default_ack(struct irq_data *data)
@@ -284,9 +286,9 @@ noop(struct irq_data *data))
284 <para> 286 <para>
285 The following control flow is implemented (simplified excerpt): 287 The following control flow is implemented (simplified excerpt):
286 <programlisting> 288 <programlisting>
287desc->chip->irq_mask(); 289desc->irq_data.chip->irq_mask_ack();
288handle_IRQ_event(desc->action); 290handle_irq_event(desc->action);
289desc->chip->irq_unmask(); 291desc->irq_data.chip->irq_unmask();
290 </programlisting> 292 </programlisting>
291 </para> 293 </para>
292 </sect3> 294 </sect3>
@@ -300,8 +302,8 @@ desc->chip->irq_unmask();
300 <para> 302 <para>
301 The following control flow is implemented (simplified excerpt): 303 The following control flow is implemented (simplified excerpt):
302 <programlisting> 304 <programlisting>
303handle_IRQ_event(desc->action); 305handle_irq_event(desc->action);
304desc->chip->irq_eoi(); 306desc->irq_data.chip->irq_eoi();
305 </programlisting> 307 </programlisting>
306 </para> 308 </para>
307 </sect3> 309 </sect3>
@@ -315,17 +317,17 @@ desc->chip->irq_eoi();
315 The following control flow is implemented (simplified excerpt): 317 The following control flow is implemented (simplified excerpt):
316 <programlisting> 318 <programlisting>
317if (desc->status &amp; running) { 319if (desc->status &amp; running) {
318 desc->chip->irq_mask(); 320 desc->irq_data.chip->irq_mask_ack();
319 desc->status |= pending | masked; 321 desc->status |= pending | masked;
320 return; 322 return;
321} 323}
322desc->chip->irq_ack(); 324desc->irq_data.chip->irq_ack();
323desc->status |= running; 325desc->status |= running;
324do { 326do {
325 if (desc->status &amp; masked) 327 if (desc->status &amp; masked)
326 desc->chip->irq_unmask(); 328 desc->irq_data.chip->irq_unmask();
327 desc->status &amp;= ~pending; 329 desc->status &amp;= ~pending;
328 handle_IRQ_event(desc->action); 330 handle_irq_event(desc->action);
329} while (status &amp; pending); 331} while (status &amp; pending);
330desc->status &amp;= ~running; 332desc->status &amp;= ~running;
331 </programlisting> 333 </programlisting>
@@ -344,7 +346,7 @@ desc->status &amp;= ~running;
344 <para> 346 <para>
345 The following control flow is implemented (simplified excerpt): 347 The following control flow is implemented (simplified excerpt):
346 <programlisting> 348 <programlisting>
347handle_IRQ_event(desc->action); 349handle_irq_event(desc->action);
348 </programlisting> 350 </programlisting>
349 </para> 351 </para>
350 </sect3> 352 </sect3>
@@ -362,12 +364,29 @@ handle_IRQ_event(desc->action);
362 <para> 364 <para>
363 The following control flow is implemented (simplified excerpt): 365 The following control flow is implemented (simplified excerpt):
364 <programlisting> 366 <programlisting>
365handle_IRQ_event(desc->action); 367if (desc->irq_data.chip->irq_ack)
366if (desc->chip->irq_eoi) 368 desc->irq_data.chip->irq_ack();
367 desc->chip->irq_eoi(); 369handle_irq_event(desc->action);
370if (desc->irq_data.chip->irq_eoi)
371 desc->irq_data.chip->irq_eoi();
368 </programlisting> 372 </programlisting>
369 </para> 373 </para>
370 </sect3> 374 </sect3>
375 <sect3 id="EOI_Edge_IRQ_flow_handler">
376 <title>EOI Edge IRQ flow handler</title>
377 <para>
378 handle_edge_eoi_irq provides an abnomination of the edge
379 handler which is solely used to tame a badly wreckaged
380 irq controller on powerpc/cell.
381 </para>
382 </sect3>
383 <sect3 id="BAD_IRQ_flow_handler">
384 <title>Bad IRQ flow handler</title>
385 <para>
386 handle_bad_irq is used for spurious interrupts which
387 have no real handler assigned..
388 </para>
389 </sect3>
371 </sect2> 390 </sect2>
372 <sect2 id="Quirks_and_optimizations"> 391 <sect2 id="Quirks_and_optimizations">
373 <title>Quirks and optimizations</title> 392 <title>Quirks and optimizations</title>
@@ -410,6 +429,7 @@ if (desc->chip->irq_eoi)
410 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem> 429 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem>
411 <listitem><para>irq_mask()</para></listitem> 430 <listitem><para>irq_mask()</para></listitem>
412 <listitem><para>irq_unmask()</para></listitem> 431 <listitem><para>irq_unmask()</para></listitem>
432 <listitem><para>irq_eoi() - Optional, required for eoi flow handlers</para></listitem>
413 <listitem><para>irq_retrigger() - Optional</para></listitem> 433 <listitem><para>irq_retrigger() - Optional</para></listitem>
414 <listitem><para>irq_set_type() - Optional</para></listitem> 434 <listitem><para>irq_set_type() - Optional</para></listitem>
415 <listitem><para>irq_set_wake() - Optional</para></listitem> 435 <listitem><para>irq_set_wake() - Optional</para></listitem>
@@ -424,32 +444,24 @@ if (desc->chip->irq_eoi)
424 <chapter id="doirq"> 444 <chapter id="doirq">
425 <title>__do_IRQ entry point</title> 445 <title>__do_IRQ entry point</title>
426 <para> 446 <para>
427 The original implementation __do_IRQ() is an alternative entry 447 The original implementation __do_IRQ() was an alternative entry
428 point for all types of interrupts. 448 point for all types of interrupts. It not longer exists.
429 </para> 449 </para>
430 <para> 450 <para>
431 This handler turned out to be not suitable for all 451 This handler turned out to be not suitable for all
432 interrupt hardware and was therefore reimplemented with split 452 interrupt hardware and was therefore reimplemented with split
433 functionality for egde/level/simple/percpu interrupts. This is not 453 functionality for edge/level/simple/percpu interrupts. This is not
434 only a functional optimization. It also shortens code paths for 454 only a functional optimization. It also shortens code paths for
435 interrupts. 455 interrupts.
436 </para> 456 </para>
437 <para>
438 To make use of the split implementation, replace the call to
439 __do_IRQ by a call to desc->handle_irq() and associate
440 the appropriate handler function to desc->handle_irq().
441 In most cases the generic handler implementations should
442 be sufficient.
443 </para>
444 </chapter> 457 </chapter>
445 458
446 <chapter id="locking"> 459 <chapter id="locking">
447 <title>Locking on SMP</title> 460 <title>Locking on SMP</title>
448 <para> 461 <para>
449 The locking of chip registers is up to the architecture that 462 The locking of chip registers is up to the architecture that
450 defines the chip primitives. There is a chip->lock field that can be used 463 defines the chip primitives. The per-irq structure is
451 for serialization, but the generic layer does not touch it. The per-irq 464 protected via desc->lock, by the generic layer.
452 structure is protected via desc->lock, by the generic layer.
453 </para> 465 </para>
454 </chapter> 466 </chapter>
455 <chapter id="structs"> 467 <chapter id="structs">
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index f66f4df1869..67e7ab41c0a 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1763,7 +1763,7 @@ as it would be on UP.
1763There is a furthur optimization possible here: remember our original 1763There is a furthur optimization possible here: remember our original
1764cache code, where there were no reference counts and the caller simply 1764cache code, where there were no reference counts and the caller simply
1765held the lock whenever using the object? This is still possible: if 1765held the lock whenever using the object? This is still possible: if
1766you hold the lock, noone can delete the object, so you don't need to 1766you hold the lock, no one can delete the object, so you don't need to
1767get and put the reference count. 1767get and put the reference count.
1768</para> 1768</para>
1769 1769
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index 8c5411cfeaf..cdd1bb9aac0 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -1032,7 +1032,7 @@ and other resources, etc.
1032 <listitem> 1032 <listitem>
1033 <para> 1033 <para>
1034 This is indicated by ICRC bit in the ERROR register and 1034 This is indicated by ICRC bit in the ERROR register and
1035 means that corruption occurred during data transfer. Upto 1035 means that corruption occurred during data transfer. Up to
1036 ATA/ATAPI-7, the standard specifies that this bit is only 1036 ATA/ATAPI-7, the standard specifies that this bit is only
1037 applicable to UDMA transfers but ATA/ATAPI-8 draft revision 1037 applicable to UDMA transfers but ATA/ATAPI-8 draft revision
1038 1f says that the bit may be applicable to multiword DMA and 1038 1f says that the bit may be applicable to multiword DMA and
@@ -1045,10 +1045,10 @@ and other resources, etc.
1045 <term>ABRT error during data transfer or on completion</term> 1045 <term>ABRT error during data transfer or on completion</term>
1046 <listitem> 1046 <listitem>
1047 <para> 1047 <para>
1048 Upto ATA/ATAPI-7, the standard specifies that ABRT could be 1048 Up to ATA/ATAPI-7, the standard specifies that ABRT could be
1049 set on ICRC errors and on cases where a device is not able 1049 set on ICRC errors and on cases where a device is not able
1050 to complete a command. Combined with the fact that MWDMA 1050 to complete a command. Combined with the fact that MWDMA
1051 and PIO transfer errors aren't allowed to use ICRC bit upto 1051 and PIO transfer errors aren't allowed to use ICRC bit up to
1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could 1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could
1053 indicate tranfer errors. 1053 indicate tranfer errors.
1054 </para> 1054 </para>
@@ -1122,7 +1122,7 @@ and other resources, etc.
1122 <para> 1122 <para>
1123 Depending on commands, not all STATUS/ERROR bits are 1123 Depending on commands, not all STATUS/ERROR bits are
1124 applicable. These non-applicable bits are marked with 1124 applicable. These non-applicable bits are marked with
1125 &quot;na&quot; in the output descriptions but upto ATA/ATAPI-7 1125 &quot;na&quot; in the output descriptions but up to ATA/ATAPI-7
1126 no definition of &quot;na&quot; can be found. However, 1126 no definition of &quot;na&quot; can be found. However,
1127 ATA/ATAPI-8 draft revision 1f describes &quot;N/A&quot; as 1127 ATA/ATAPI-8 draft revision 1f describes &quot;N/A&quot; as
1128 follows. 1128 follows.
@@ -1507,7 +1507,7 @@ and other resources, etc.
1507 1507
1508 <listitem> 1508 <listitem>
1509 <para> 1509 <para>
1510 CHS set up with INITIALIZE DEVICE PARAMETERS (seldomly used) 1510 CHS set up with INITIALIZE DEVICE PARAMETERS (seldom used)
1511 </para> 1511 </para>
1512 </listitem> 1512 </listitem>
1513 1513
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index be34dcbe0d9..e5fe09430fd 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -11,6 +11,10 @@
11<!ENTITY func-select "<link linkend='func-select'><function>select()</function></link>"> 11<!ENTITY func-select "<link linkend='func-select'><function>select()</function></link>">
12<!ENTITY func-write "<link linkend='func-write'><function>write()</function></link>"> 12<!ENTITY func-write "<link linkend='func-write'><function>write()</function></link>">
13 13
14<!ENTITY media-func-close "<link linkend='media-func-close'><function>close()</function></link>">
15<!ENTITY media-func-ioctl "<link linkend='media-func-ioctl'><function>ioctl()</function></link>">
16<!ENTITY media-func-open "<link linkend='media-func-open'><function>open()</function></link>">
17
14<!-- Ioctls --> 18<!-- Ioctls -->
15<!ENTITY VIDIOC-CROPCAP "<link linkend='vidioc-cropcap'><constant>VIDIOC_CROPCAP</constant></link>"> 19<!ENTITY VIDIOC-CROPCAP "<link linkend='vidioc-cropcap'><constant>VIDIOC_CROPCAP</constant></link>">
16<!ENTITY VIDIOC-DBG-G-CHIP-IDENT "<link linkend='vidioc-dbg-g-chip-ident'><constant>VIDIOC_DBG_G_CHIP_IDENT</constant></link>"> 20<!ENTITY VIDIOC-DBG-G-CHIP-IDENT "<link linkend='vidioc-dbg-g-chip-ident'><constant>VIDIOC_DBG_G_CHIP_IDENT</constant></link>">
@@ -82,11 +86,24 @@
82<!ENTITY VIDIOC-S-PRIORITY "<link linkend='vidioc-g-priority'><constant>VIDIOC_S_PRIORITY</constant></link>"> 86<!ENTITY VIDIOC-S-PRIORITY "<link linkend='vidioc-g-priority'><constant>VIDIOC_S_PRIORITY</constant></link>">
83<!ENTITY VIDIOC-S-STD "<link linkend='vidioc-g-std'><constant>VIDIOC_S_STD</constant></link>"> 87<!ENTITY VIDIOC-S-STD "<link linkend='vidioc-g-std'><constant>VIDIOC_S_STD</constant></link>">
84<!ENTITY VIDIOC-S-TUNER "<link linkend='vidioc-g-tuner'><constant>VIDIOC_S_TUNER</constant></link>"> 88<!ENTITY VIDIOC-S-TUNER "<link linkend='vidioc-g-tuner'><constant>VIDIOC_S_TUNER</constant></link>">
89<!ENTITY VIDIOC-SUBDEV-ENUM-FRAME-SIZE "<link linkend='vidioc-subdev-enum-frame-size'><constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant></link>">
90<!ENTITY VIDIOC-SUBDEV-ENUM-MBUS-CODE "<link linkend='vidioc-subdev-enum-mbus-code'><constant>VIDIOC_SUBDEV_ENUM_MBUS_CODE</constant></link>">
91<!ENTITY VIDIOC-SUBDEV-G-CROP "<link linkend='vidioc-subdev-g-crop'><constant>VIDIOC_SUBDEV_G_CROP</constant></link>">
92<!ENTITY VIDIOC-SUBDEV-G-FMT "<link linkend='vidioc-subdev-g-fmt'><constant>VIDIOC_SUBDEV_G_FMT</constant></link>">
93<!ENTITY VIDIOC-SUBDEV-G-FRAME-INTERVAL "<link linkend='vidioc-subdev-g-frame-interval'><constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant></link>">
94<!ENTITY VIDIOC-SUBDEV-S-CROP "<link linkend='vidioc-subdev-g-crop'><constant>VIDIOC_SUBDEV_S_CROP</constant></link>">
95<!ENTITY VIDIOC-SUBDEV-S-FMT "<link linkend='vidioc-subdev-g-fmt'><constant>VIDIOC_SUBDEV_S_FMT</constant></link>">
96<!ENTITY VIDIOC-SUBDEV-S-FRAME-INTERVAL "<link linkend='vidioc-subdev-g-frame-interval'><constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant></link>">
85<!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>"> 97<!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>">
86<!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>"> 98<!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>">
87<!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>"> 99<!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>">
88<!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>"> 100<!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>">
89 101
102<!ENTITY MEDIA-IOC-DEVICE-INFO "<link linkend='media-ioc-device-info'><constant>MEDIA_IOC_DEVICE_INFO</constant></link>">
103<!ENTITY MEDIA-IOC-ENUM-ENTITIES "<link linkend='media-ioc-enum-entities'><constant>MEDIA_IOC_ENUM_ENTITIES</constant></link>">
104<!ENTITY MEDIA-IOC-ENUM-LINKS "<link linkend='media-ioc-enum-links'><constant>MEDIA_IOC_ENUM_LINKS</constant></link>">
105<!ENTITY MEDIA-IOC-SETUP-LINK "<link linkend='media-ioc-setup-link'><constant>MEDIA_IOC_SETUP_LINK</constant></link>">
106
90<!-- Types --> 107<!-- Types -->
91<!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>"> 108<!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>">
92 109
@@ -98,6 +115,7 @@
98<!ENTITY v4l2-field "enum&nbsp;<link linkend='v4l2-field'>v4l2_field</link>"> 115<!ENTITY v4l2-field "enum&nbsp;<link linkend='v4l2-field'>v4l2_field</link>">
99<!ENTITY v4l2-frmivaltypes "enum&nbsp;<link linkend='v4l2-frmivaltypes'>v4l2_frmivaltypes</link>"> 116<!ENTITY v4l2-frmivaltypes "enum&nbsp;<link linkend='v4l2-frmivaltypes'>v4l2_frmivaltypes</link>">
100<!ENTITY v4l2-frmsizetypes "enum&nbsp;<link linkend='v4l2-frmsizetypes'>v4l2_frmsizetypes</link>"> 117<!ENTITY v4l2-frmsizetypes "enum&nbsp;<link linkend='v4l2-frmsizetypes'>v4l2_frmsizetypes</link>">
118<!ENTITY v4l2-mbus-pixelcode "enum&nbsp;<link linkend='v4l2-mbus-pixelcode'>v4l2_mbus_pixelcode</link>">
101<!ENTITY v4l2-memory "enum&nbsp;<link linkend='v4l2-memory'>v4l2_memory</link>"> 119<!ENTITY v4l2-memory "enum&nbsp;<link linkend='v4l2-memory'>v4l2_memory</link>">
102<!ENTITY v4l2-mpeg-audio-ac3-bitrate "enum&nbsp;<link linkend='v4l2-mpeg-audio-ac3-bitrate'>v4l2_mpeg_audio_ac3_bitrate</link>"> 120<!ENTITY v4l2-mpeg-audio-ac3-bitrate "enum&nbsp;<link linkend='v4l2-mpeg-audio-ac3-bitrate'>v4l2_mpeg_audio_ac3_bitrate</link>">
103<!ENTITY v4l2-mpeg-audio-crc "enum&nbsp;<link linkend='v4l2-mpeg-audio-crc'>v4l2_mpeg_audio_crc</link>"> 121<!ENTITY v4l2-mpeg-audio-crc "enum&nbsp;<link linkend='v4l2-mpeg-audio-crc'>v4l2_mpeg_audio_crc</link>">
@@ -121,6 +139,7 @@
121<!ENTITY v4l2-mpeg-video-encoding "enum&nbsp;<link linkend='v4l2-mpeg-video-encoding'>v4l2_mpeg_video_encoding</link>"> 139<!ENTITY v4l2-mpeg-video-encoding "enum&nbsp;<link linkend='v4l2-mpeg-video-encoding'>v4l2_mpeg_video_encoding</link>">
122<!ENTITY v4l2-power-line-frequency "enum&nbsp;<link linkend='v4l2-power-line-frequency'>v4l2_power_line_frequency</link>"> 140<!ENTITY v4l2-power-line-frequency "enum&nbsp;<link linkend='v4l2-power-line-frequency'>v4l2_power_line_frequency</link>">
123<!ENTITY v4l2-priority "enum&nbsp;<link linkend='v4l2-priority'>v4l2_priority</link>"> 141<!ENTITY v4l2-priority "enum&nbsp;<link linkend='v4l2-priority'>v4l2_priority</link>">
142<!ENTITY v4l2-subdev-format-whence "enum&nbsp;<link linkend='v4l2-subdev-format-whence'>v4l2_subdev_format_whence</link>">
124<!ENTITY v4l2-tuner-type "enum&nbsp;<link linkend='v4l2-tuner-type'>v4l2_tuner_type</link>"> 143<!ENTITY v4l2-tuner-type "enum&nbsp;<link linkend='v4l2-tuner-type'>v4l2_tuner_type</link>">
125<!ENTITY v4l2-preemphasis "enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link>"> 144<!ENTITY v4l2-preemphasis "enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link>">
126 145
@@ -129,6 +148,7 @@
129<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>"> 148<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>">
130<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>"> 149<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>">
131<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>"> 150<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>">
151<!ENTITY v4l2-plane "struct&nbsp;<link linkend='v4l2-plane'>v4l2_plane</link>">
132<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>"> 152<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>">
133<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> 153<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>">
134<!ENTITY v4l2-clip "struct&nbsp;<link linkend='v4l2-clip'>v4l2_clip</link>"> 154<!ENTITY v4l2-clip "struct&nbsp;<link linkend='v4l2-clip'>v4l2_clip</link>">
@@ -162,11 +182,14 @@
162<!ENTITY v4l2-hw-freq-seek "struct&nbsp;<link linkend='v4l2-hw-freq-seek'>v4l2_hw_freq_seek</link>"> 182<!ENTITY v4l2-hw-freq-seek "struct&nbsp;<link linkend='v4l2-hw-freq-seek'>v4l2_hw_freq_seek</link>">
163<!ENTITY v4l2-input "struct&nbsp;<link linkend='v4l2-input'>v4l2_input</link>"> 183<!ENTITY v4l2-input "struct&nbsp;<link linkend='v4l2-input'>v4l2_input</link>">
164<!ENTITY v4l2-jpegcompression "struct&nbsp;<link linkend='v4l2-jpegcompression'>v4l2_jpegcompression</link>"> 184<!ENTITY v4l2-jpegcompression "struct&nbsp;<link linkend='v4l2-jpegcompression'>v4l2_jpegcompression</link>">
185<!ENTITY v4l2-mbus-framefmt "struct&nbsp;<link linkend='v4l2-mbus-framefmt'>v4l2_mbus_framefmt</link>">
165<!ENTITY v4l2-modulator "struct&nbsp;<link linkend='v4l2-modulator'>v4l2_modulator</link>"> 186<!ENTITY v4l2-modulator "struct&nbsp;<link linkend='v4l2-modulator'>v4l2_modulator</link>">
166<!ENTITY v4l2-mpeg-vbi-fmt-ivtv "struct&nbsp;<link linkend='v4l2-mpeg-vbi-fmt-ivtv'>v4l2_mpeg_vbi_fmt_ivtv</link>"> 187<!ENTITY v4l2-mpeg-vbi-fmt-ivtv "struct&nbsp;<link linkend='v4l2-mpeg-vbi-fmt-ivtv'>v4l2_mpeg_vbi_fmt_ivtv</link>">
167<!ENTITY v4l2-output "struct&nbsp;<link linkend='v4l2-output'>v4l2_output</link>"> 188<!ENTITY v4l2-output "struct&nbsp;<link linkend='v4l2-output'>v4l2_output</link>">
168<!ENTITY v4l2-outputparm "struct&nbsp;<link linkend='v4l2-outputparm'>v4l2_outputparm</link>"> 189<!ENTITY v4l2-outputparm "struct&nbsp;<link linkend='v4l2-outputparm'>v4l2_outputparm</link>">
169<!ENTITY v4l2-pix-format "struct&nbsp;<link linkend='v4l2-pix-format'>v4l2_pix_format</link>"> 190<!ENTITY v4l2-pix-format "struct&nbsp;<link linkend='v4l2-pix-format'>v4l2_pix_format</link>">
191<!ENTITY v4l2-pix-format-mplane "struct&nbsp;<link linkend='v4l2-pix-format-mplane'>v4l2_pix_format_mplane</link>">
192<!ENTITY v4l2-plane-pix-format "struct&nbsp;<link linkend='v4l2-plane-pix-format'>v4l2_plane_pix_format</link>">
170<!ENTITY v4l2-queryctrl "struct&nbsp;<link linkend='v4l2-queryctrl'>v4l2_queryctrl</link>"> 193<!ENTITY v4l2-queryctrl "struct&nbsp;<link linkend='v4l2-queryctrl'>v4l2_queryctrl</link>">
171<!ENTITY v4l2-querymenu "struct&nbsp;<link linkend='v4l2-querymenu'>v4l2_querymenu</link>"> 194<!ENTITY v4l2-querymenu "struct&nbsp;<link linkend='v4l2-querymenu'>v4l2_querymenu</link>">
172<!ENTITY v4l2-rect "struct&nbsp;<link linkend='v4l2-rect'>v4l2_rect</link>"> 195<!ENTITY v4l2-rect "struct&nbsp;<link linkend='v4l2-rect'>v4l2_rect</link>">
@@ -174,6 +197,12 @@
174<!ENTITY v4l2-sliced-vbi-cap "struct&nbsp;<link linkend='v4l2-sliced-vbi-cap'>v4l2_sliced_vbi_cap</link>"> 197<!ENTITY v4l2-sliced-vbi-cap "struct&nbsp;<link linkend='v4l2-sliced-vbi-cap'>v4l2_sliced_vbi_cap</link>">
175<!ENTITY v4l2-sliced-vbi-data "struct&nbsp;<link linkend='v4l2-sliced-vbi-data'>v4l2_sliced_vbi_data</link>"> 198<!ENTITY v4l2-sliced-vbi-data "struct&nbsp;<link linkend='v4l2-sliced-vbi-data'>v4l2_sliced_vbi_data</link>">
176<!ENTITY v4l2-sliced-vbi-format "struct&nbsp;<link linkend='v4l2-sliced-vbi-format'>v4l2_sliced_vbi_format</link>"> 199<!ENTITY v4l2-sliced-vbi-format "struct&nbsp;<link linkend='v4l2-sliced-vbi-format'>v4l2_sliced_vbi_format</link>">
200<!ENTITY v4l2-subdev-frame-interval "struct&nbsp;<link linkend='v4l2-subdev-frame-interval'>v4l2_subdev_frame_interval</link>">
201<!ENTITY v4l2-subdev-frame-interval-enum "struct&nbsp;<link linkend='v4l2-subdev-frame-interval-enum'>v4l2_subdev_frame_interval_enum</link>">
202<!ENTITY v4l2-subdev-frame-size-enum "struct&nbsp;<link linkend='v4l2-subdev-frame-size-enum'>v4l2_subdev_frame_size_enum</link>">
203<!ENTITY v4l2-subdev-crop "struct&nbsp;<link linkend='v4l2-subdev-crop'>v4l2_subdev_crop</link>">
204<!ENTITY v4l2-subdev-format "struct&nbsp;<link linkend='v4l2-subdev-format'>v4l2_subdev_format</link>">
205<!ENTITY v4l2-subdev-mbus-code-enum "struct&nbsp;<link linkend='v4l2-subdev-mbus-code-enum'>v4l2_subdev_mbus_code_enum</link>">
177<!ENTITY v4l2-standard "struct&nbsp;<link linkend='v4l2-standard'>v4l2_standard</link>"> 206<!ENTITY v4l2-standard "struct&nbsp;<link linkend='v4l2-standard'>v4l2_standard</link>">
178<!ENTITY v4l2-streamparm "struct&nbsp;<link linkend='v4l2-streamparm'>v4l2_streamparm</link>"> 207<!ENTITY v4l2-streamparm "struct&nbsp;<link linkend='v4l2-streamparm'>v4l2_streamparm</link>">
179<!ENTITY v4l2-timecode "struct&nbsp;<link linkend='v4l2-timecode'>v4l2_timecode</link>"> 208<!ENTITY v4l2-timecode "struct&nbsp;<link linkend='v4l2-timecode'>v4l2_timecode</link>">
@@ -181,6 +210,12 @@
181<!ENTITY v4l2-vbi-format "struct&nbsp;<link linkend='v4l2-vbi-format'>v4l2_vbi_format</link>"> 210<!ENTITY v4l2-vbi-format "struct&nbsp;<link linkend='v4l2-vbi-format'>v4l2_vbi_format</link>">
182<!ENTITY v4l2-window "struct&nbsp;<link linkend='v4l2-window'>v4l2_window</link>"> 211<!ENTITY v4l2-window "struct&nbsp;<link linkend='v4l2-window'>v4l2_window</link>">
183 212
213<!ENTITY media-device-info "struct&nbsp;<link linkend='media-device-info'>media_device_info</link>">
214<!ENTITY media-entity-desc "struct&nbsp;<link linkend='media-entity-desc'>media_entity_desc</link>">
215<!ENTITY media-links-enum "struct&nbsp;<link linkend='media-links-enum'>media_links_enum</link>">
216<!ENTITY media-pad-desc "struct&nbsp;<link linkend='media-pad-desc'>media_pad_desc</link>">
217<!ENTITY media-link-desc "struct&nbsp;<link linkend='media-link-desc'>media_link_desc</link>">
218
184<!-- Error Codes --> 219<!-- Error Codes -->
185<!ENTITY EACCES "<errorcode>EACCES</errorcode> error code"> 220<!ENTITY EACCES "<errorcode>EACCES</errorcode> error code">
186<!ENTITY EAGAIN "<errorcode>EAGAIN</errorcode> error code"> 221<!ENTITY EAGAIN "<errorcode>EAGAIN</errorcode> error code">
@@ -197,11 +232,13 @@
197<!ENTITY ENXIO "<errorcode>ENXIO</errorcode> error code"> 232<!ENTITY ENXIO "<errorcode>ENXIO</errorcode> error code">
198<!ENTITY EMFILE "<errorcode>EMFILE</errorcode> error code"> 233<!ENTITY EMFILE "<errorcode>EMFILE</errorcode> error code">
199<!ENTITY EPERM "<errorcode>EPERM</errorcode> error code"> 234<!ENTITY EPERM "<errorcode>EPERM</errorcode> error code">
235<!ENTITY EPIPE "<errorcode>EPIPE</errorcode> error code">
200<!ENTITY ERANGE "<errorcode>ERANGE</errorcode> error code"> 236<!ENTITY ERANGE "<errorcode>ERANGE</errorcode> error code">
201 237
202<!-- Subsections --> 238<!-- Subsections -->
203<!ENTITY sub-biblio SYSTEM "v4l/biblio.xml"> 239<!ENTITY sub-biblio SYSTEM "v4l/biblio.xml">
204<!ENTITY sub-common SYSTEM "v4l/common.xml"> 240<!ENTITY sub-common SYSTEM "v4l/common.xml">
241<!ENTITY sub-planar-apis SYSTEM "v4l/planar-apis.xml">
205<!ENTITY sub-compat SYSTEM "v4l/compat.xml"> 242<!ENTITY sub-compat SYSTEM "v4l/compat.xml">
206<!ENTITY sub-controls SYSTEM "v4l/controls.xml"> 243<!ENTITY sub-controls SYSTEM "v4l/controls.xml">
207<!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml"> 244<!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml">
@@ -215,6 +252,7 @@
215<!ENTITY sub-dev-raw-vbi SYSTEM "v4l/dev-raw-vbi.xml"> 252<!ENTITY sub-dev-raw-vbi SYSTEM "v4l/dev-raw-vbi.xml">
216<!ENTITY sub-dev-rds SYSTEM "v4l/dev-rds.xml"> 253<!ENTITY sub-dev-rds SYSTEM "v4l/dev-rds.xml">
217<!ENTITY sub-dev-sliced-vbi SYSTEM "v4l/dev-sliced-vbi.xml"> 254<!ENTITY sub-dev-sliced-vbi SYSTEM "v4l/dev-sliced-vbi.xml">
255<!ENTITY sub-dev-subdev SYSTEM "v4l/dev-subdev.xml">
218<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml"> 256<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml">
219<!ENTITY sub-driver SYSTEM "v4l/driver.xml"> 257<!ENTITY sub-driver SYSTEM "v4l/driver.xml">
220<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml"> 258<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml">
@@ -232,7 +270,10 @@
232<!ENTITY sub-write SYSTEM "v4l/func-write.xml"> 270<!ENTITY sub-write SYSTEM "v4l/func-write.xml">
233<!ENTITY sub-io SYSTEM "v4l/io.xml"> 271<!ENTITY sub-io SYSTEM "v4l/io.xml">
234<!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> 272<!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml">
273<!ENTITY sub-m420 SYSTEM "v4l/pixfmt-m420.xml">
235<!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> 274<!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml">
275<!ENTITY sub-nv12m SYSTEM "v4l/pixfmt-nv12m.xml">
276<!ENTITY sub-nv12mt SYSTEM "v4l/pixfmt-nv12mt.xml">
236<!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> 277<!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml">
237<!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> 278<!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml">
238<!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> 279<!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml">
@@ -247,12 +288,16 @@
247<!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> 288<!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml">
248<!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> 289<!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml">
249<!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> 290<!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml">
291<!ENTITY sub-yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml">
250<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 292<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
251<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 293<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
252<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 294<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
253<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml"> 295<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
296<!ENTITY sub-srggb12 SYSTEM "v4l/pixfmt-srggb12.xml">
254<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml"> 297<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
255<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml"> 298<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml">
299<!ENTITY sub-y12 SYSTEM "v4l/pixfmt-y12.xml">
300<!ENTITY sub-y10b SYSTEM "v4l/pixfmt-y10b.xml">
256<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> 301<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml">
257<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> 302<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml">
258<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> 303<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
@@ -298,6 +343,13 @@
298<!ENTITY sub-reqbufs SYSTEM "v4l/vidioc-reqbufs.xml"> 343<!ENTITY sub-reqbufs SYSTEM "v4l/vidioc-reqbufs.xml">
299<!ENTITY sub-s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml"> 344<!ENTITY sub-s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml">
300<!ENTITY sub-streamon SYSTEM "v4l/vidioc-streamon.xml"> 345<!ENTITY sub-streamon SYSTEM "v4l/vidioc-streamon.xml">
346<!ENTITY sub-subdev-enum-frame-interval SYSTEM "v4l/vidioc-subdev-enum-frame-interval.xml">
347<!ENTITY sub-subdev-enum-frame-size SYSTEM "v4l/vidioc-subdev-enum-frame-size.xml">
348<!ENTITY sub-subdev-enum-mbus-code SYSTEM "v4l/vidioc-subdev-enum-mbus-code.xml">
349<!ENTITY sub-subdev-formats SYSTEM "v4l/subdev-formats.xml">
350<!ENTITY sub-subdev-g-crop SYSTEM "v4l/vidioc-subdev-g-crop.xml">
351<!ENTITY sub-subdev-g-fmt SYSTEM "v4l/vidioc-subdev-g-fmt.xml">
352<!ENTITY sub-subdev-g-frame-interval SYSTEM "v4l/vidioc-subdev-g-frame-interval.xml">
301<!ENTITY sub-capture-c SYSTEM "v4l/capture.c.xml"> 353<!ENTITY sub-capture-c SYSTEM "v4l/capture.c.xml">
302<!ENTITY sub-keytable-c SYSTEM "v4l/keytable.c.xml"> 354<!ENTITY sub-keytable-c SYSTEM "v4l/keytable.c.xml">
303<!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml"> 355<!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml">
@@ -321,6 +373,15 @@
321<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> 373<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl">
322<!ENTITY sub-media-indices SYSTEM "media-indices.tmpl"> 374<!ENTITY sub-media-indices SYSTEM "media-indices.tmpl">
323 375
376<!ENTITY sub-media-controller SYSTEM "v4l/media-controller.xml">
377<!ENTITY sub-media-func-open SYSTEM "v4l/media-func-open.xml">
378<!ENTITY sub-media-func-close SYSTEM "v4l/media-func-close.xml">
379<!ENTITY sub-media-func-ioctl SYSTEM "v4l/media-func-ioctl.xml">
380<!ENTITY sub-media-ioc-device-info SYSTEM "v4l/media-ioc-device-info.xml">
381<!ENTITY sub-media-ioc-enum-entities SYSTEM "v4l/media-ioc-enum-entities.xml">
382<!ENTITY sub-media-ioc-enum-links SYSTEM "v4l/media-ioc-enum-links.xml">
383<!ENTITY sub-media-ioc-setup-link SYSTEM "v4l/media-ioc-setup-link.xml">
384
324<!-- Function Reference --> 385<!-- Function Reference -->
325<!ENTITY close SYSTEM "v4l/func-close.xml"> 386<!ENTITY close SYSTEM "v4l/func-close.xml">
326<!ENTITY ioctl SYSTEM "v4l/func-ioctl.xml"> 387<!ENTITY ioctl SYSTEM "v4l/func-ioctl.xml">
@@ -333,6 +394,7 @@
333<!ENTITY write SYSTEM "v4l/func-write.xml"> 394<!ENTITY write SYSTEM "v4l/func-write.xml">
334<!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml"> 395<!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml">
335<!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml"> 396<!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml">
397<!ENTITY nv12m SYSTEM "v4l/pixfmt-nv12m.xml">
336<!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml"> 398<!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml">
337<!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> 399<!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml">
338<!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> 400<!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml">
@@ -347,6 +409,7 @@
347<!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> 409<!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml">
348<!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> 410<!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml">
349<!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> 411<!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml">
412<!ENTITY yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml">
350<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 413<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
351<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 414<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
352<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 415<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
diff --git a/Documentation/DocBook/media.tmpl b/Documentation/DocBook/media.tmpl
index a99088aae1a..88f2cc680cc 100644
--- a/Documentation/DocBook/media.tmpl
+++ b/Documentation/DocBook/media.tmpl
@@ -106,6 +106,9 @@ Foundation. A copy of the license is included in the chapter entitled
106&sub-remote_controllers; 106&sub-remote_controllers;
107</chapter> 107</chapter>
108</part> 108</part>
109<part id="media_common">
110&sub-media-controller;
111</part>
109 112
110&sub-fdl-appendix; 113&sub-fdl-appendix;
111 114
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 620eb3f6a90..17910e2052a 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -189,8 +189,7 @@ static void __iomem *baseaddr;
189 <title>Partition defines</title> 189 <title>Partition defines</title>
190 <para> 190 <para>
191 If you want to divide your device into partitions, then 191 If you want to divide your device into partitions, then
192 enable the configuration switch CONFIG_MTD_PARTITIONS and define 192 define a partitioning scheme suitable to your board.
193 a partitioning scheme suitable to your board.
194 </para> 193 </para>
195 <programlisting> 194 <programlisting>
196#define NUM_PARTITIONS 2 195#define NUM_PARTITIONS 2
@@ -485,7 +484,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
485 Reed-Solomon library. 484 Reed-Solomon library.
486 </para> 485 </para>
487 <para> 486 <para>
488 The ECC bytes must be placed immidiately after the data 487 The ECC bytes must be placed immediately after the data
489 bytes in order to make the syndrome generator work. This 488 bytes in order to make the syndrome generator work. This
490 is contrary to the usual layout used by software ECC. The 489 is contrary to the usual layout used by software ECC. The
491 separation of data and out of band area is not longer 490 separation of data and out of band area is not longer
@@ -629,7 +628,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
629 holds the bad block table. Store a pointer to the pattern 628 holds the bad block table. Store a pointer to the pattern
630 in the pattern field. Further the length of the pattern has to be 629 in the pattern field. Further the length of the pattern has to be
631 stored in len and the offset in the spare area must be given 630 stored in len and the offset in the spare area must be given
632 in the offs member of the nand_bbt_descr stucture. For mirrored 631 in the offs member of the nand_bbt_descr structure. For mirrored
633 bad block tables different patterns are mandatory.</para></listitem> 632 bad block tables different patterns are mandatory.</para></listitem>
634 <listitem><para>Table creation</para> 633 <listitem><para>Table creation</para>
635 <para>Set the option NAND_BBT_CREATE to enable the table creation 634 <para>Set the option NAND_BBT_CREATE to enable the table creation
@@ -648,7 +647,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
648 <listitem><para>Table version control</para> 647 <listitem><para>Table version control</para>
649 <para>Set the option NAND_BBT_VERSION to enable the table version control. 648 <para>Set the option NAND_BBT_VERSION to enable the table version control.
650 It's highly recommended to enable this for mirrored tables with write 649 It's highly recommended to enable this for mirrored tables with write
651 support. It makes sure that the risk of loosing the bad block 650 support. It makes sure that the risk of losing the bad block
652 table information is reduced to the loss of the information about the 651 table information is reduced to the loss of the information about the
653 one worn out block which should be marked bad. The version is stored in 652 one worn out block which should be marked bad. The version is stored in
654 4 consecutive bytes in the spare area of the device. The position of 653 4 consecutive bytes in the spare area of the device. The position of
@@ -1060,19 +1059,19 @@ data in this page</entry>
1060<row> 1059<row>
1061<entry>0x3D</entry> 1060<entry>0x3D</entry>
1062<entry>ECC byte 21</entry> 1061<entry>ECC byte 21</entry>
1063<entry>Error correction code byte 0 of the eigth 256 Bytes of data 1062<entry>Error correction code byte 0 of the eighth 256 Bytes of data
1064in this page</entry> 1063in this page</entry>
1065</row> 1064</row>
1066<row> 1065<row>
1067<entry>0x3E</entry> 1066<entry>0x3E</entry>
1068<entry>ECC byte 22</entry> 1067<entry>ECC byte 22</entry>
1069<entry>Error correction code byte 1 of the eigth 256 Bytes of data 1068<entry>Error correction code byte 1 of the eighth 256 Bytes of data
1070in this page</entry> 1069in this page</entry>
1071</row> 1070</row>
1072<row> 1071<row>
1073<entry>0x3F</entry> 1072<entry>0x3F</entry>
1074<entry>ECC byte 23</entry> 1073<entry>ECC byte 23</entry>
1075<entry>Error correction code byte 2 of the eigth 256 Bytes of data 1074<entry>Error correction code byte 2 of the eighth 256 Bytes of data
1076in this page</entry> 1075in this page</entry>
1077</row> 1076</row>
1078</tbody></tgroup></informaltable> 1077</tbody></tgroup></informaltable>
diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl
index 54eb26b5737..50479360d84 100644
--- a/Documentation/DocBook/rapidio.tmpl
+++ b/Documentation/DocBook/rapidio.tmpl
@@ -133,7 +133,6 @@
133!Idrivers/rapidio/rio-sysfs.c 133!Idrivers/rapidio/rio-sysfs.c
134 </sect1> 134 </sect1>
135 <sect1 id="PPC32_support"><title>PPC32 support</title> 135 <sect1 id="PPC32_support"><title>PPC32 support</title>
136!Earch/powerpc/sysdev/fsl_rio.c
137!Iarch/powerpc/sysdev/fsl_rio.c 136!Iarch/powerpc/sysdev/fsl_rio.c
138 </sect1> 137 </sect1>
139 </chapter> 138 </chapter>
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
index 53f4f8d3b81..346e552fa2c 100644
--- a/Documentation/DocBook/regulator.tmpl
+++ b/Documentation/DocBook/regulator.tmpl
@@ -267,8 +267,8 @@
267 <sect1 id="machine-constraint"> 267 <sect1 id="machine-constraint">
268 <title>Constraints</title> 268 <title>Constraints</title>
269 <para> 269 <para>
270 As well as definining the connections the machine interface 270 As well as defining the connections the machine interface
271 also provides constraints definining the operations that 271 also provides constraints defining the operations that
272 clients are allowed to perform and the parameters that may be 272 clients are allowed to perform and the parameters that may be
273 set. This is required since generally regulator devices will 273 set. This is required since generally regulator devices will
274 offer more flexibility than it is safe to use on a given 274 offer more flexibility than it is safe to use on a given
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index b4665b9c40b..7c4b514d62b 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -797,7 +797,7 @@ framework to set up sysfs files for this region. Simply leave it alone.
797 perform some initialization. After that, your hardware 797 perform some initialization. After that, your hardware
798 starts working and will generate an interrupt as soon 798 starts working and will generate an interrupt as soon
799 as it's finished, has some data available, or needs your 799 as it's finished, has some data available, or needs your
800 attention because an error occured. 800 attention because an error occurred.
801 </para> 801 </para>
802 <para> 802 <para>
803 <filename>/dev/uioX</filename> is a read-only file. A 803 <filename>/dev/uioX</filename> is a read-only file. A
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index af293606fbe..8d57c1888dc 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -690,7 +690,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
690 </para><para> 690 </para><para>
691 This request lets kernel drivers talk to user mode code 691 This request lets kernel drivers talk to user mode code
692 through filesystem operations even when they don't create 692 through filesystem operations even when they don't create
693 a charactor or block special device. 693 a character or block special device.
694 It's also been used to do things like ask devices what 694 It's also been used to do things like ask devices what
695 device special file should be used. 695 device special file should be used.
696 Two pre-defined ioctls are used 696 Two pre-defined ioctls are used
diff --git a/Documentation/DocBook/v4l/bayer.pdf b/Documentation/DocBook/v4l/bayer.pdf
new file mode 100644
index 00000000000..905e60e6cd4
--- /dev/null
+++ b/Documentation/DocBook/v4l/bayer.pdf
Binary files differ
diff --git a/Documentation/DocBook/v4l/bayer.png b/Documentation/DocBook/v4l/bayer.png
new file mode 100644
index 00000000000..9b15fb22e81
--- /dev/null
+++ b/Documentation/DocBook/v4l/bayer.png
Binary files differ
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml
index cea23e1c4fc..9028721438d 100644
--- a/Documentation/DocBook/v4l/common.xml
+++ b/Documentation/DocBook/v4l/common.xml
@@ -100,7 +100,7 @@ linux-kernel@vger.kernel.org, 2002-11-20. --></para>
100 100
101 <para>By convention system administrators create various 101 <para>By convention system administrators create various
102character device special files with these major and minor numbers in 102character device special files with these major and minor numbers in
103the <filename>/dev</filename> directory. The names recomended for the 103the <filename>/dev</filename> directory. The names recommended for the
104different V4L2 device types are listed in <xref linkend="devices" />. 104different V4L2 device types are listed in <xref linkend="devices" />.
105</para> 105</para>
106 106
@@ -846,6 +846,8 @@ conversion routine or library for integration into applications.</para>
846 </section> 846 </section>
847 </section> 847 </section>
848 848
849 &sub-planar-apis;
850
849 <section id="crop"> 851 <section id="crop">
850 <title>Image Cropping, Insertion and Scaling</title> 852 <title>Image Cropping, Insertion and Scaling</title>
851 853
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml
index c9ce61d981f..9f7cd4f2579 100644
--- a/Documentation/DocBook/v4l/compat.xml
+++ b/Documentation/DocBook/v4l/compat.xml
@@ -1711,8 +1711,8 @@ ioctl would enumerate the available audio inputs. An ioctl to
1711determine the current audio input, if more than one combines with the 1711determine the current audio input, if more than one combines with the
1712current video input, did not exist. So 1712current video input, did not exist. So
1713<constant>VIDIOC_G_AUDIO</constant> was renamed to 1713<constant>VIDIOC_G_AUDIO</constant> was renamed to
1714<constant>VIDIOC_G_AUDIO_OLD</constant>, this ioctl will be removed in 1714<constant>VIDIOC_G_AUDIO_OLD</constant>, this ioctl was removed on
1715the future. The &VIDIOC-ENUMAUDIO; ioctl was added to enumerate 1715Kernel 2.6.39. The &VIDIOC-ENUMAUDIO; ioctl was added to enumerate
1716audio inputs, while &VIDIOC-G-AUDIO; now reports the current audio 1716audio inputs, while &VIDIOC-G-AUDIO; now reports the current audio
1717input.</para> 1717input.</para>
1718 <para>The same changes were made to &VIDIOC-G-AUDOUT; and 1718 <para>The same changes were made to &VIDIOC-G-AUDOUT; and
@@ -1726,7 +1726,7 @@ must be updated to successfully compile again.</para>
1726 <para>The &VIDIOC-OVERLAY; ioctl was incorrectly defined with 1726 <para>The &VIDIOC-OVERLAY; ioctl was incorrectly defined with
1727write-read parameter. It was changed to write-only, while the write-read 1727write-read parameter. It was changed to write-only, while the write-read
1728version was renamed to <constant>VIDIOC_OVERLAY_OLD</constant>. The old 1728version was renamed to <constant>VIDIOC_OVERLAY_OLD</constant>. The old
1729ioctl will be removed in the future. Until further the "videodev" 1729ioctl was removed on Kernel 2.6.39. Until further the "videodev"
1730kernel module will automatically translate to the new version, so drivers 1730kernel module will automatically translate to the new version, so drivers
1731must be recompiled, but not applications.</para> 1731must be recompiled, but not applications.</para>
1732 </listitem> 1732 </listitem>
@@ -1744,7 +1744,7 @@ surface can be seen.</para>
1744defined with write-only parameter, inconsistent with other ioctls 1744defined with write-only parameter, inconsistent with other ioctls
1745modifying their argument. They were changed to write-read, while a 1745modifying their argument. They were changed to write-read, while a
1746<constant>_OLD</constant> suffix was added to the write-only versions. 1746<constant>_OLD</constant> suffix was added to the write-only versions.
1747The old ioctls will be removed in the future. Drivers and 1747The old ioctls were removed on Kernel 2.6.39. Drivers and
1748applications assuming a constant parameter need an update.</para> 1748applications assuming a constant parameter need an update.</para>
1749 </listitem> 1749 </listitem>
1750 </orderedlist> 1750 </orderedlist>
@@ -1815,8 +1815,8 @@ yet to be addressed, for details see <xref
1815 <para>The &VIDIOC-CROPCAP; ioctl was incorrectly defined 1815 <para>The &VIDIOC-CROPCAP; ioctl was incorrectly defined
1816with read-only parameter. It is now defined as write-read ioctl, while 1816with read-only parameter. It is now defined as write-read ioctl, while
1817the read-only version was renamed to 1817the read-only version was renamed to
1818<constant>VIDIOC_CROPCAP_OLD</constant>. The old ioctl will be removed 1818<constant>VIDIOC_CROPCAP_OLD</constant>. The old ioctl was removed
1819in the future.</para> 1819on Kernel 2.6.39.</para>
1820 </listitem> 1820 </listitem>
1821 </orderedlist> 1821 </orderedlist>
1822 </section> 1822 </section>
@@ -2353,6 +2353,20 @@ that used it. It was originally scheduled for removal in 2.6.35.
2353 </listitem> 2353 </listitem>
2354 </orderedlist> 2354 </orderedlist>
2355 </section> 2355 </section>
2356 <section>
2357 <title>V4L2 in Linux 2.6.39</title>
2358 <orderedlist>
2359 <listitem>
2360 <para>The old VIDIOC_*_OLD symbols and V4L1 support were removed.</para>
2361 </listitem>
2362 <listitem>
2363 <para>Multi-planar API added. Does not affect the compatibility of
2364 current drivers and applications. See
2365 <link linkend="planar-apis">multi-planar API</link>
2366 for details.</para>
2367 </listitem>
2368 </orderedlist>
2369 </section>
2356 2370
2357 <section id="other"> 2371 <section id="other">
2358 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2372 <title>Relation of V4L2 to other Linux multimedia APIs</title>
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index 2fae3e87ce7..a920ee80f64 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -1243,7 +1243,7 @@ values are:</entry>
1243 </row><row><entry spanname="descr">Mutes the audio when 1243 </row><row><entry spanname="descr">Mutes the audio when
1244capturing. This is not done by muting audio hardware, which can still 1244capturing. This is not done by muting audio hardware, which can still
1245produce a slight hiss, but in the encoder itself, guaranteeing a fixed 1245produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1246and reproducable audio bitstream. 0 = unmuted, 1 = muted.</entry> 1246and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1247 </row> 1247 </row>
1248 <row><entry></entry></row> 1248 <row><entry></entry></row>
1249 <row id="v4l2-mpeg-video-encoding"> 1249 <row id="v4l2-mpeg-video-encoding">
diff --git a/Documentation/DocBook/v4l/dev-capture.xml b/Documentation/DocBook/v4l/dev-capture.xml
index 32807e43f17..2237c661f26 100644
--- a/Documentation/DocBook/v4l/dev-capture.xml
+++ b/Documentation/DocBook/v4l/dev-capture.xml
@@ -18,7 +18,8 @@ files are used for video output devices.</para>
18 <title>Querying Capabilities</title> 18 <title>Querying Capabilities</title>
19 19
20 <para>Devices supporting the video capture interface set the 20 <para>Devices supporting the video capture interface set the
21<constant>V4L2_CAP_VIDEO_CAPTURE</constant> flag in the 21<constant>V4L2_CAP_VIDEO_CAPTURE</constant> or
22<constant>V4L2_CAP_VIDEO_CAPTURE_MPLANE</constant> flag in the
22<structfield>capabilities</structfield> field of &v4l2-capability; 23<structfield>capabilities</structfield> field of &v4l2-capability;
23returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions 24returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions
24they may also support the <link linkend="overlay">video overlay</link> 25they may also support the <link linkend="overlay">video overlay</link>
@@ -64,9 +65,11 @@ linkend="crop" />.</para>
64 65
65 <para>To query the current image format applications set the 66 <para>To query the current image format applications set the
66<structfield>type</structfield> field of a &v4l2-format; to 67<structfield>type</structfield> field of a &v4l2-format; to
67<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> and call the 68<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> or
69<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant> and call the
68&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill 70&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill
69the &v4l2-pix-format; <structfield>pix</structfield> member of the 71the &v4l2-pix-format; <structfield>pix</structfield> or the
72&v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member of the
70<structfield>fmt</structfield> union.</para> 73<structfield>fmt</structfield> union.</para>
71 74
72 <para>To request different parameters applications set the 75 <para>To request different parameters applications set the
@@ -84,8 +87,8 @@ adjust the parameters and finally return the actual parameters as
84without disabling I/O or possibly time consuming hardware 87without disabling I/O or possibly time consuming hardware
85preparations.</para> 88preparations.</para>
86 89
87 <para>The contents of &v4l2-pix-format; are discussed in <xref 90 <para>The contents of &v4l2-pix-format; and &v4l2-pix-format-mplane;
88linkend="pixfmt" />. See also the specification of the 91are discussed in <xref linkend="pixfmt" />. See also the specification of the
89<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant> 92<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant>
90and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video 93and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video
91capture devices must implement both the 94capture devices must implement both the
diff --git a/Documentation/DocBook/v4l/dev-output.xml b/Documentation/DocBook/v4l/dev-output.xml
index 63c3c20e5a7..919e22c5385 100644
--- a/Documentation/DocBook/v4l/dev-output.xml
+++ b/Documentation/DocBook/v4l/dev-output.xml
@@ -17,7 +17,8 @@ files are used for video capture devices.</para>
17 <title>Querying Capabilities</title> 17 <title>Querying Capabilities</title>
18 18
19 <para>Devices supporting the video output interface set the 19 <para>Devices supporting the video output interface set the
20<constant>V4L2_CAP_VIDEO_OUTPUT</constant> flag in the 20<constant>V4L2_CAP_VIDEO_OUTPUT</constant> or
21<constant>V4L2_CAP_VIDEO_OUTPUT_MPLANE</constant> flag in the
21<structfield>capabilities</structfield> field of &v4l2-capability; 22<structfield>capabilities</structfield> field of &v4l2-capability;
22returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions 23returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions
23they may also support the <link linkend="raw-vbi">raw VBI 24they may also support the <link linkend="raw-vbi">raw VBI
@@ -60,9 +61,11 @@ linkend="crop" />.</para>
60 61
61 <para>To query the current image format applications set the 62 <para>To query the current image format applications set the
62<structfield>type</structfield> field of a &v4l2-format; to 63<structfield>type</structfield> field of a &v4l2-format; to
63<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> and call the 64<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> or
65<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant> and call the
64&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill 66&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill
65the &v4l2-pix-format; <structfield>pix</structfield> member of the 67the &v4l2-pix-format; <structfield>pix</structfield> or the
68&v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member of the
66<structfield>fmt</structfield> union.</para> 69<structfield>fmt</structfield> union.</para>
67 70
68 <para>To request different parameters applications set the 71 <para>To request different parameters applications set the
@@ -80,8 +83,8 @@ adjust the parameters and finally return the actual parameters as
80without disabling I/O or possibly time consuming hardware 83without disabling I/O or possibly time consuming hardware
81preparations.</para> 84preparations.</para>
82 85
83 <para>The contents of &v4l2-pix-format; are discussed in <xref 86 <para>The contents of &v4l2-pix-format; and &v4l2-pix-format-mplane;
84linkend="pixfmt" />. See also the specification of the 87are discussed in <xref linkend="pixfmt" />. See also the specification of the
85<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant> 88<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant>
86and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video 89and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video
87output devices must implement both the 90output devices must implement both the
diff --git a/Documentation/DocBook/v4l/dev-subdev.xml b/Documentation/DocBook/v4l/dev-subdev.xml
new file mode 100644
index 00000000000..05c8fefcbcb
--- /dev/null
+++ b/Documentation/DocBook/v4l/dev-subdev.xml
@@ -0,0 +1,313 @@
1 <title>Sub-device Interface</title>
2
3 <note>
4 <title>Experimental</title>
5 <para>This is an <link linkend="experimental">experimental</link>
6 interface and may change in the future.</para>
7 </note>
8
9 <para>The complex nature of V4L2 devices, where hardware is often made of
10 several integrated circuits that need to interact with each other in a
11 controlled way, leads to complex V4L2 drivers. The drivers usually reflect
12 the hardware model in software, and model the different hardware components
13 as software blocks called sub-devices.</para>
14
15 <para>V4L2 sub-devices are usually kernel-only objects. If the V4L2 driver
16 implements the media device API, they will automatically inherit from media
17 entities. Applications will be able to enumerate the sub-devices and discover
18 the hardware topology using the media entities, pads and links enumeration
19 API.</para>
20
21 <para>In addition to make sub-devices discoverable, drivers can also choose
22 to make them directly configurable by applications. When both the sub-device
23 driver and the V4L2 device driver support this, sub-devices will feature a
24 character device node on which ioctls can be called to
25 <itemizedlist>
26 <listitem><para>query, read and write sub-devices controls</para></listitem>
27 <listitem><para>subscribe and unsubscribe to events and retrieve them</para></listitem>
28 <listitem><para>negotiate image formats on individual pads</para></listitem>
29 </itemizedlist>
30 </para>
31
32 <para>Sub-device character device nodes, conventionally named
33 <filename>/dev/v4l-subdev*</filename>, use major number 81.</para>
34
35 <section>
36 <title>Controls</title>
37 <para>Most V4L2 controls are implemented by sub-device hardware. Drivers
38 usually merge all controls and expose them through video device nodes.
39 Applications can control all sub-devices through a single interface.</para>
40
41 <para>Complex devices sometimes implement the same control in different
42 pieces of hardware. This situation is common in embedded platforms, where
43 both sensors and image processing hardware implement identical functions,
44 such as contrast adjustment, white balance or faulty pixels correction. As
45 the V4L2 controls API doesn't support several identical controls in a single
46 device, all but one of the identical controls are hidden.</para>
47
48 <para>Applications can access those hidden controls through the sub-device
49 node with the V4L2 control API described in <xref linkend="control" />. The
50 ioctls behave identically as when issued on V4L2 device nodes, with the
51 exception that they deal only with controls implemented in the sub-device.
52 </para>
53
54 <para>Depending on the driver, those controls might also be exposed through
55 one (or several) V4L2 device nodes.</para>
56 </section>
57
58 <section>
59 <title>Events</title>
60 <para>V4L2 sub-devices can notify applications of events as described in
61 <xref linkend="event" />. The API behaves identically as when used on V4L2
62 device nodes, with the exception that it only deals with events generated by
63 the sub-device. Depending on the driver, those events might also be reported
64 on one (or several) V4L2 device nodes.</para>
65 </section>
66
67 <section id="pad-level-formats">
68 <title>Pad-level Formats</title>
69
70 <warning><para>Pad-level formats are only applicable to very complex device that
71 need to expose low-level format configuration to user space. Generic V4L2
72 applications do <emphasis>not</emphasis> need to use the API described in
73 this section.</para></warning>
74
75 <note><para>For the purpose of this section, the term
76 <wordasword>format</wordasword> means the combination of media bus data
77 format, frame width and frame height.</para></note>
78
79 <para>Image formats are typically negotiated on video capture and output
80 devices using the <link linkend="crop">cropping and scaling</link> ioctls.
81 The driver is responsible for configuring every block in the video pipeline
82 according to the requested format at the pipeline input and/or
83 output.</para>
84
85 <para>For complex devices, such as often found in embedded systems,
86 identical image sizes at the output of a pipeline can be achieved using
87 different hardware configurations. One such example is shown on
88 <xref linkend="pipeline-scaling" />, where
89 image scaling can be performed on both the video sensor and the host image
90 processing hardware.</para>
91
92 <figure id="pipeline-scaling">
93 <title>Image Format Negotiation on Pipelines</title>
94 <mediaobject>
95 <imageobject>
96 <imagedata fileref="pipeline.pdf" format="PS" />
97 </imageobject>
98 <imageobject>
99 <imagedata fileref="pipeline.png" format="PNG" />
100 </imageobject>
101 <textobject>
102 <phrase>High quality and high speed pipeline configuration</phrase>
103 </textobject>
104 </mediaobject>
105 </figure>
106
107 <para>The sensor scaler is usually of less quality than the host scaler, but
108 scaling on the sensor is required to achieve higher frame rates. Depending
109 on the use case (quality vs. speed), the pipeline must be configured
110 differently. Applications need to configure the formats at every point in
111 the pipeline explicitly.</para>
112
113 <para>Drivers that implement the <link linkend="media-controller-intro">media
114 API</link> can expose pad-level image format configuration to applications.
115 When they do, applications can use the &VIDIOC-SUBDEV-G-FMT; and
116 &VIDIOC-SUBDEV-S-FMT; ioctls. to negotiate formats on a per-pad basis.</para>
117
118 <para>Applications are responsible for configuring coherent parameters on
119 the whole pipeline and making sure that connected pads have compatible
120 formats. The pipeline is checked for formats mismatch at &VIDIOC-STREAMON;
121 time, and an &EPIPE; is then returned if the configuration is
122 invalid.</para>
123
124 <para>Pad-level image format configuration support can be tested by calling
125 the &VIDIOC-SUBDEV-G-FMT; ioctl on pad 0. If the driver returns an &EINVAL;
126 pad-level format configuration is not supported by the sub-device.</para>
127
128 <section>
129 <title>Format Negotiation</title>
130
131 <para>Acceptable formats on pads can (and usually do) depend on a number
132 of external parameters, such as formats on other pads, active links, or
133 even controls. Finding a combination of formats on all pads in a video
134 pipeline, acceptable to both application and driver, can't rely on formats
135 enumeration only. A format negotiation mechanism is required.</para>
136
137 <para>Central to the format negotiation mechanism are the get/set format
138 operations. When called with the <structfield>which</structfield> argument
139 set to <constant>V4L2_SUBDEV_FORMAT_TRY</constant>, the
140 &VIDIOC-SUBDEV-G-FMT; and &VIDIOC-SUBDEV-S-FMT; ioctls operate on a set of
141 formats parameters that are not connected to the hardware configuration.
142 Modifying those 'try' formats leaves the device state untouched (this
143 applies to both the software state stored in the driver and the hardware
144 state stored in the device itself).</para>
145
146 <para>While not kept as part of the device state, try formats are stored
147 in the sub-device file handles. A &VIDIOC-SUBDEV-G-FMT; call will return
148 the last try format set <emphasis>on the same sub-device file
149 handle</emphasis>. Several applications querying the same sub-device at
150 the same time will thus not interact with each other.</para>
151
152 <para>To find out whether a particular format is supported by the device,
153 applications use the &VIDIOC-SUBDEV-S-FMT; ioctl. Drivers verify and, if
154 needed, change the requested <structfield>format</structfield> based on
155 device requirements and return the possibly modified value. Applications
156 can then choose to try a different format or accept the returned value and
157 continue.</para>
158
159 <para>Formats returned by the driver during a negotiation iteration are
160 guaranteed to be supported by the device. In particular, drivers guarantee
161 that a returned format will not be further changed if passed to an
162 &VIDIOC-SUBDEV-S-FMT; call as-is (as long as external parameters, such as
163 formats on other pads or links' configuration are not changed).</para>
164
165 <para>Drivers automatically propagate formats inside sub-devices. When a
166 try or active format is set on a pad, corresponding formats on other pads
167 of the same sub-device can be modified by the driver. Drivers are free to
168 modify formats as required by the device. However, they should comply with
169 the following rules when possible:
170 <itemizedlist>
171 <listitem><para>Formats should be propagated from sink pads to source pads.
172 Modifying a format on a source pad should not modify the format on any
173 sink pad.</para></listitem>
174 <listitem><para>Sub-devices that scale frames using variable scaling factors
175 should reset the scale factors to default values when sink pads formats
176 are modified. If the 1:1 scaling ratio is supported, this means that
177 source pads formats should be reset to the sink pads formats.</para></listitem>
178 </itemizedlist>
179 </para>
180
181 <para>Formats are not propagated across links, as that would involve
182 propagating them from one sub-device file handle to another. Applications
183 must then take care to configure both ends of every link explicitly with
184 compatible formats. Identical formats on the two ends of a link are
185 guaranteed to be compatible. Drivers are free to accept different formats
186 matching device requirements as being compatible.</para>
187
188 <para><xref linkend="sample-pipeline-config" />
189 shows a sample configuration sequence for the pipeline described in
190 <xref linkend="pipeline-scaling" /> (table
191 columns list entity names and pad numbers).</para>
192
193 <table pgwide="0" frame="none" id="sample-pipeline-config">
194 <title>Sample Pipeline Configuration</title>
195 <tgroup cols="3">
196 <colspec colname="what"/>
197 <colspec colname="sensor-0" />
198 <colspec colname="frontend-0" />
199 <colspec colname="frontend-1" />
200 <colspec colname="scaler-0" />
201 <colspec colname="scaler-1" />
202 <thead>
203 <row>
204 <entry></entry>
205 <entry>Sensor/0</entry>
206 <entry>Frontend/0</entry>
207 <entry>Frontend/1</entry>
208 <entry>Scaler/0</entry>
209 <entry>Scaler/1</entry>
210 </row>
211 </thead>
212 <tbody valign="top">
213 <row>
214 <entry>Initial state</entry>
215 <entry>2048x1536</entry>
216 <entry>-</entry>
217 <entry>-</entry>
218 <entry>-</entry>
219 <entry>-</entry>
220 </row>
221 <row>
222 <entry>Configure frontend input</entry>
223 <entry>2048x1536</entry>
224 <entry><emphasis>2048x1536</emphasis></entry>
225 <entry><emphasis>2046x1534</emphasis></entry>
226 <entry>-</entry>
227 <entry>-</entry>
228 </row>
229 <row>
230 <entry>Configure scaler input</entry>
231 <entry>2048x1536</entry>
232 <entry>2048x1536</entry>
233 <entry>2046x1534</entry>
234 <entry><emphasis>2046x1534</emphasis></entry>
235 <entry><emphasis>2046x1534</emphasis></entry>
236 </row>
237 <row>
238 <entry>Configure scaler output</entry>
239 <entry>2048x1536</entry>
240 <entry>2048x1536</entry>
241 <entry>2046x1534</entry>
242 <entry>2046x1534</entry>
243 <entry><emphasis>1280x960</emphasis></entry>
244 </row>
245 </tbody>
246 </tgroup>
247 </table>
248
249 <para>
250 <orderedlist>
251 <listitem><para>Initial state. The sensor output is set to its native 3MP
252 resolution. Resolutions on the host frontend and scaler input and output
253 pads are undefined.</para></listitem>
254 <listitem><para>The application configures the frontend input pad resolution to
255 2048x1536. The driver propagates the format to the frontend output pad.
256 Note that the propagated output format can be different, as in this case,
257 than the input format, as the hardware might need to crop pixels (for
258 instance when converting a Bayer filter pattern to RGB or YUV).</para></listitem>
259 <listitem><para>The application configures the scaler input pad resolution to
260 2046x1534 to match the frontend output resolution. The driver propagates
261 the format to the scaler output pad.</para></listitem>
262 <listitem><para>The application configures the scaler output pad resolution to
263 1280x960.</para></listitem>
264 </orderedlist>
265 </para>
266
267 <para>When satisfied with the try results, applications can set the active
268 formats by setting the <structfield>which</structfield> argument to
269 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. Active formats are changed
270 exactly as try formats by drivers. To avoid modifying the hardware state
271 during format negotiation, applications should negotiate try formats first
272 and then modify the active settings using the try formats returned during
273 the last negotiation iteration. This guarantees that the active format
274 will be applied as-is by the driver without being modified.
275 </para>
276 </section>
277
278 <section>
279 <title>Cropping and scaling</title>
280
281 <para>Many sub-devices support cropping frames on their input or output
282 pads (or possible even on both). Cropping is used to select the area of
283 interest in an image, typically on a video sensor or video decoder. It can
284 also be used as part of digital zoom implementations to select the area of
285 the image that will be scaled up.</para>
286
287 <para>Crop settings are defined by a crop rectangle and represented in a
288 &v4l2-rect; by the coordinates of the top left corner and the rectangle
289 size. Both the coordinates and sizes are expressed in pixels.</para>
290
291 <para>The crop rectangle is retrieved and set using the
292 &VIDIOC-SUBDEV-G-CROP; and &VIDIOC-SUBDEV-S-CROP; ioctls. Like for pad
293 formats, drivers store try and active crop rectangles. The format
294 negotiation mechanism applies to crop settings as well.</para>
295
296 <para>On input pads, cropping is applied relatively to the current pad
297 format. The pad format represents the image size as received by the
298 sub-device from the previous block in the pipeline, and the crop rectangle
299 represents the sub-image that will be transmitted further inside the
300 sub-device for processing. The crop rectangle be entirely containted
301 inside the input image size.</para>
302
303 <para>Input crop rectangle are reset to their default value when the input
304 image format is modified. Drivers should use the input image size as the
305 crop rectangle default value, but hardware requirements may prevent this.
306 </para>
307
308 <para>Cropping behaviour on output pads is not defined.</para>
309
310 </section>
311 </section>
312
313 &sub-subdev-formats;
diff --git a/Documentation/DocBook/v4l/func-mmap.xml b/Documentation/DocBook/v4l/func-mmap.xml
index 2e2fc3933ae..786732b64bb 100644
--- a/Documentation/DocBook/v4l/func-mmap.xml
+++ b/Documentation/DocBook/v4l/func-mmap.xml
@@ -45,7 +45,10 @@ just specify a <constant>NULL</constant> pointer here.</para>
45 <listitem> 45 <listitem>
46 <para>Length of the memory area to map. This must be the 46 <para>Length of the memory area to map. This must be the
47same value as returned by the driver in the &v4l2-buffer; 47same value as returned by the driver in the &v4l2-buffer;
48<structfield>length</structfield> field.</para> 48<structfield>length</structfield> field for the
49single-planar API, and the same value as returned by the driver
50in the &v4l2-plane; <structfield>length</structfield> field for the
51multi-planar API.</para>
49 </listitem> 52 </listitem>
50 </varlistentry> 53 </varlistentry>
51 <varlistentry> 54 <varlistentry>
@@ -106,7 +109,10 @@ flag.</para>
106 <listitem> 109 <listitem>
107 <para>Offset of the buffer in device memory. This must be the 110 <para>Offset of the buffer in device memory. This must be the
108same value as returned by the driver in the &v4l2-buffer; 111same value as returned by the driver in the &v4l2-buffer;
109<structfield>m</structfield> union <structfield>offset</structfield> field.</para> 112<structfield>m</structfield> union <structfield>offset</structfield> field for
113the single-planar API, and the same value as returned by the driver
114in the &v4l2-plane; <structfield>m</structfield> union
115<structfield>mem_offset</structfield> field for the multi-planar API.</para>
110 </listitem> 116 </listitem>
111 </varlistentry> 117 </varlistentry>
112 </variablelist> 118 </variablelist>
diff --git a/Documentation/DocBook/v4l/func-munmap.xml b/Documentation/DocBook/v4l/func-munmap.xml
index 502ed49323b..e2c4190f9bb 100644
--- a/Documentation/DocBook/v4l/func-munmap.xml
+++ b/Documentation/DocBook/v4l/func-munmap.xml
@@ -37,7 +37,8 @@
37 <para>Length of the mapped buffer. This must be the same 37 <para>Length of the mapped buffer. This must be the same
38value as given to <function>mmap()</function> and returned by the 38value as given to <function>mmap()</function> and returned by the
39driver in the &v4l2-buffer; <structfield>length</structfield> 39driver in the &v4l2-buffer; <structfield>length</structfield>
40field.</para> 40field for the single-planar API and in the &v4l2-plane;
41<structfield>length</structfield> field for the multi-planar API.</para>
41 </listitem> 42 </listitem>
42 </varlistentry> 43 </varlistentry>
43 </variablelist> 44 </variablelist>
diff --git a/Documentation/DocBook/v4l/io.xml b/Documentation/DocBook/v4l/io.xml
index d424886beda..227e7ac45a0 100644
--- a/Documentation/DocBook/v4l/io.xml
+++ b/Documentation/DocBook/v4l/io.xml
@@ -121,18 +121,22 @@ mapped.</para>
121 <para>Before applications can access the buffers they must map 121 <para>Before applications can access the buffers they must map
122them into their address space with the &func-mmap; function. The 122them into their address space with the &func-mmap; function. The
123location of the buffers in device memory can be determined with the 123location of the buffers in device memory can be determined with the
124&VIDIOC-QUERYBUF; ioctl. The <structfield>m.offset</structfield> and 124&VIDIOC-QUERYBUF; ioctl. In the single-planar API case, the
125<structfield>length</structfield> returned in a &v4l2-buffer; are 125<structfield>m.offset</structfield> and <structfield>length</structfield>
126passed as sixth and second parameter to the 126returned in a &v4l2-buffer; are passed as sixth and second parameter to the
127<function>mmap()</function> function. The offset and length values 127<function>mmap()</function> function. When using the multi-planar API,
128must not be modified. Remember the buffers are allocated in physical 128struct &v4l2-buffer; contains an array of &v4l2-plane; structures, each
129memory, as opposed to virtual memory which can be swapped out to disk. 129containing its own <structfield>m.offset</structfield> and
130Applications should free the buffers as soon as possible with the 130<structfield>length</structfield>. When using the multi-planar API, every
131&func-munmap; function.</para> 131plane of every buffer has to be mapped separately, so the number of
132calls to &func-mmap; should be equal to number of buffers times number of
133planes in each buffer. The offset and length values must not be modified.
134Remember, the buffers are allocated in physical memory, as opposed to virtual
135memory, which can be swapped out to disk. Applications should free the buffers
136as soon as possible with the &func-munmap; function.</para>
132 137
133 <example> 138 <example>
134 <title>Mapping buffers</title> 139 <title>Mapping buffers in the single-planar API</title>
135
136 <programlisting> 140 <programlisting>
137&v4l2-requestbuffers; reqbuf; 141&v4l2-requestbuffers; reqbuf;
138struct { 142struct {
@@ -141,63 +145,145 @@ struct {
141} *buffers; 145} *buffers;
142unsigned int i; 146unsigned int i;
143 147
144memset (&amp;reqbuf, 0, sizeof (reqbuf)); 148memset(&amp;reqbuf, 0, sizeof(reqbuf));
145reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 149reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
146reqbuf.memory = V4L2_MEMORY_MMAP; 150reqbuf.memory = V4L2_MEMORY_MMAP;
147reqbuf.count = 20; 151reqbuf.count = 20;
148 152
149if (-1 == ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf)) { 153if (-1 == ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf)) {
150 if (errno == EINVAL) 154 if (errno == EINVAL)
151 printf ("Video capturing or mmap-streaming is not supported\n"); 155 printf("Video capturing or mmap-streaming is not supported\n");
152 else 156 else
153 perror ("VIDIOC_REQBUFS"); 157 perror("VIDIOC_REQBUFS");
154 158
155 exit (EXIT_FAILURE); 159 exit(EXIT_FAILURE);
156} 160}
157 161
158/* We want at least five buffers. */ 162/* We want at least five buffers. */
159 163
160if (reqbuf.count &lt; 5) { 164if (reqbuf.count &lt; 5) {
161 /* You may need to free the buffers here. */ 165 /* You may need to free the buffers here. */
162 printf ("Not enough buffer memory\n"); 166 printf("Not enough buffer memory\n");
163 exit (EXIT_FAILURE); 167 exit(EXIT_FAILURE);
164} 168}
165 169
166buffers = calloc (reqbuf.count, sizeof (*buffers)); 170buffers = calloc(reqbuf.count, sizeof(*buffers));
167assert (buffers != NULL); 171assert(buffers != NULL);
168 172
169for (i = 0; i &lt; reqbuf.count; i++) { 173for (i = 0; i &lt; reqbuf.count; i++) {
170 &v4l2-buffer; buffer; 174 &v4l2-buffer; buffer;
171 175
172 memset (&amp;buffer, 0, sizeof (buffer)); 176 memset(&amp;buffer, 0, sizeof(buffer));
173 buffer.type = reqbuf.type; 177 buffer.type = reqbuf.type;
174 buffer.memory = V4L2_MEMORY_MMAP; 178 buffer.memory = V4L2_MEMORY_MMAP;
175 buffer.index = i; 179 buffer.index = i;
176 180
177 if (-1 == ioctl (fd, &VIDIOC-QUERYBUF;, &amp;buffer)) { 181 if (-1 == ioctl (fd, &VIDIOC-QUERYBUF;, &amp;buffer)) {
178 perror ("VIDIOC_QUERYBUF"); 182 perror("VIDIOC_QUERYBUF");
179 exit (EXIT_FAILURE); 183 exit(EXIT_FAILURE);
180 } 184 }
181 185
182 buffers[i].length = buffer.length; /* remember for munmap() */ 186 buffers[i].length = buffer.length; /* remember for munmap() */
183 187
184 buffers[i].start = mmap (NULL, buffer.length, 188 buffers[i].start = mmap(NULL, buffer.length,
185 PROT_READ | PROT_WRITE, /* recommended */ 189 PROT_READ | PROT_WRITE, /* recommended */
186 MAP_SHARED, /* recommended */ 190 MAP_SHARED, /* recommended */
187 fd, buffer.m.offset); 191 fd, buffer.m.offset);
188 192
189 if (MAP_FAILED == buffers[i].start) { 193 if (MAP_FAILED == buffers[i].start) {
190 /* If you do not exit here you should unmap() and free() 194 /* If you do not exit here you should unmap() and free()
191 the buffers mapped so far. */ 195 the buffers mapped so far. */
192 perror ("mmap"); 196 perror("mmap");
193 exit (EXIT_FAILURE); 197 exit(EXIT_FAILURE);
198 }
199}
200
201/* Cleanup. */
202
203for (i = 0; i &lt; reqbuf.count; i++)
204 munmap(buffers[i].start, buffers[i].length);
205 </programlisting>
206 </example>
207
208 <example>
209 <title>Mapping buffers in the multi-planar API</title>
210 <programlisting>
211&v4l2-requestbuffers; reqbuf;
212/* Our current format uses 3 planes per buffer */
213#define FMT_NUM_PLANES = 3;
214
215struct {
216 void *start[FMT_NUM_PLANES];
217 size_t length[FMT_NUM_PLANES];
218} *buffers;
219unsigned int i, j;
220
221memset(&amp;reqbuf, 0, sizeof(reqbuf));
222reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
223reqbuf.memory = V4L2_MEMORY_MMAP;
224reqbuf.count = 20;
225
226if (ioctl(fd, &VIDIOC-REQBUFS;, &amp;reqbuf) &lt; 0) {
227 if (errno == EINVAL)
228 printf("Video capturing or mmap-streaming is not supported\n");
229 else
230 perror("VIDIOC_REQBUFS");
231
232 exit(EXIT_FAILURE);
233}
234
235/* We want at least five buffers. */
236
237if (reqbuf.count &lt; 5) {
238 /* You may need to free the buffers here. */
239 printf("Not enough buffer memory\n");
240 exit(EXIT_FAILURE);
241}
242
243buffers = calloc(reqbuf.count, sizeof(*buffers));
244assert(buffers != NULL);
245
246for (i = 0; i &lt; reqbuf.count; i++) {
247 &v4l2-buffer; buffer;
248 &v4l2-plane; planes[FMT_NUM_PLANES];
249
250 memset(&amp;buffer, 0, sizeof(buffer));
251 buffer.type = reqbuf.type;
252 buffer.memory = V4L2_MEMORY_MMAP;
253 buffer.index = i;
254 /* length in struct v4l2_buffer in multi-planar API stores the size
255 * of planes array. */
256 buffer.length = FMT_NUM_PLANES;
257 buffer.m.planes = planes;
258
259 if (ioctl(fd, &VIDIOC-QUERYBUF;, &amp;buffer) &lt; 0) {
260 perror("VIDIOC_QUERYBUF");
261 exit(EXIT_FAILURE);
262 }
263
264 /* Every plane has to be mapped separately */
265 for (j = 0; j &lt; FMT_NUM_PLANES; j++) {
266 buffers[i].length[j] = buffer.m.planes[j].length; /* remember for munmap() */
267
268 buffers[i].start[j] = mmap(NULL, buffer.m.planes[j].length,
269 PROT_READ | PROT_WRITE, /* recommended */
270 MAP_SHARED, /* recommended */
271 fd, buffer.m.planes[j].m.offset);
272
273 if (MAP_FAILED == buffers[i].start[j]) {
274 /* If you do not exit here you should unmap() and free()
275 the buffers and planes mapped so far. */
276 perror("mmap");
277 exit(EXIT_FAILURE);
278 }
194 } 279 }
195} 280}
196 281
197/* Cleanup. */ 282/* Cleanup. */
198 283
199for (i = 0; i &lt; reqbuf.count; i++) 284for (i = 0; i &lt; reqbuf.count; i++)
200 munmap (buffers[i].start, buffers[i].length); 285 for (j = 0; j &lt; FMT_NUM_PLANES; j++)
286 munmap(buffers[i].start[j], buffers[i].length[j]);
201 </programlisting> 287 </programlisting>
202 </example> 288 </example>
203 289
@@ -286,13 +372,13 @@ pointer method (not only memory mapping) is supported must be
286determined by calling the &VIDIOC-REQBUFS; ioctl.</para> 372determined by calling the &VIDIOC-REQBUFS; ioctl.</para>
287 373
288 <para>This I/O method combines advantages of the read/write and 374 <para>This I/O method combines advantages of the read/write and
289memory mapping methods. Buffers are allocated by the application 375memory mapping methods. Buffers (planes) are allocated by the application
290itself, and can reside for example in virtual or shared memory. Only 376itself, and can reside for example in virtual or shared memory. Only
291pointers to data are exchanged, these pointers and meta-information 377pointers to data are exchanged, these pointers and meta-information
292are passed in &v4l2-buffer;. The driver must be switched 378are passed in &v4l2-buffer; (or in &v4l2-plane; in the multi-planar API case).
293into user pointer I/O mode by calling the &VIDIOC-REQBUFS; with the 379The driver must be switched into user pointer I/O mode by calling the
294desired buffer type. No buffers are allocated beforehands, 380&VIDIOC-REQBUFS; with the desired buffer type. No buffers (planes) are allocated
295consequently they are not indexed and cannot be queried like mapped 381beforehand, consequently they are not indexed and cannot be queried like mapped
296buffers with the <constant>VIDIOC_QUERYBUF</constant> ioctl.</para> 382buffers with the <constant>VIDIOC_QUERYBUF</constant> ioctl.</para>
297 383
298 <example> 384 <example>
@@ -316,7 +402,7 @@ if (ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf) == -1) {
316 </programlisting> 402 </programlisting>
317 </example> 403 </example>
318 404
319 <para>Buffer addresses and sizes are passed on the fly with the 405 <para>Buffer (plane) addresses and sizes are passed on the fly with the
320&VIDIOC-QBUF; ioctl. Although buffers are commonly cycled, 406&VIDIOC-QBUF; ioctl. Although buffers are commonly cycled,
321applications can pass different addresses and sizes at each 407applications can pass different addresses and sizes at each
322<constant>VIDIOC_QBUF</constant> call. If required by the hardware the 408<constant>VIDIOC_QBUF</constant> call. If required by the hardware the
@@ -396,11 +482,18 @@ rest should be evident.</para>
396 <title>Buffers</title> 482 <title>Buffers</title>
397 483
398 <para>A buffer contains data exchanged by application and 484 <para>A buffer contains data exchanged by application and
399driver using one of the Streaming I/O methods. Only pointers to 485driver using one of the Streaming I/O methods. In the multi-planar API, the
400buffers are exchanged, the data itself is not copied. These pointers, 486data is held in planes, while the buffer structure acts as a container
401together with meta-information like timestamps or field parity, are 487for the planes. Only pointers to buffers (planes) are exchanged, the data
402stored in a struct <structname>v4l2_buffer</structname>, argument to 488itself is not copied. These pointers, together with meta-information like
403the &VIDIOC-QUERYBUF;, &VIDIOC-QBUF; and &VIDIOC-DQBUF; ioctl.</para> 489timestamps or field parity, are stored in a struct
490<structname>v4l2_buffer</structname>, argument to
491the &VIDIOC-QUERYBUF;, &VIDIOC-QBUF; and &VIDIOC-DQBUF; ioctl.
492In the multi-planar API, some plane-specific members of struct
493<structname>v4l2_buffer</structname>, such as pointers and sizes for each
494plane, are stored in struct <structname>v4l2_plane</structname> instead.
495In that case, struct <structname>v4l2_buffer</structname> contains an array of
496plane structures.</para>
404 497
405 <para>Nominally timestamps refer to the first data byte transmitted. 498 <para>Nominally timestamps refer to the first data byte transmitted.
406In practice however the wide range of hardware covered by the V4L2 API 499In practice however the wide range of hardware covered by the V4L2 API
@@ -551,26 +644,40 @@ in accordance with the selected I/O method.</entry>
551 <entry></entry> 644 <entry></entry>
552 <entry>__u32</entry> 645 <entry>__u32</entry>
553 <entry><structfield>offset</structfield></entry> 646 <entry><structfield>offset</structfield></entry>
554 <entry>When <structfield>memory</structfield> is 647 <entry>For the single-planar API and when
555<constant>V4L2_MEMORY_MMAP</constant> this is the offset of the buffer 648<structfield>memory</structfield> is <constant>V4L2_MEMORY_MMAP</constant> this
556from the start of the device memory. The value is returned by the 649is the offset of the buffer from the start of the device memory. The value is
557driver and apart of serving as parameter to the &func-mmap; function 650returned by the driver and apart of serving as parameter to the &func-mmap;
558not useful for applications. See <xref linkend="mmap" /> for details.</entry> 651function not useful for applications. See <xref linkend="mmap" /> for details
652 </entry>
559 </row> 653 </row>
560 <row> 654 <row>
561 <entry></entry> 655 <entry></entry>
562 <entry>unsigned long</entry> 656 <entry>unsigned long</entry>
563 <entry><structfield>userptr</structfield></entry> 657 <entry><structfield>userptr</structfield></entry>
564 <entry>When <structfield>memory</structfield> is 658 <entry>For the single-planar API and when
565<constant>V4L2_MEMORY_USERPTR</constant> this is a pointer to the 659<structfield>memory</structfield> is <constant>V4L2_MEMORY_USERPTR</constant>
566buffer (casted to unsigned long type) in virtual memory, set by the 660this is a pointer to the buffer (casted to unsigned long type) in virtual
567application. See <xref linkend="userp" /> for details.</entry> 661memory, set by the application. See <xref linkend="userp" /> for details.
662 </entry>
663 </row>
664 <row>
665 <entry></entry>
666 <entry>struct v4l2_plane</entry>
667 <entry><structfield>*planes</structfield></entry>
668 <entry>When using the multi-planar API, contains a userspace pointer
669 to an array of &v4l2-plane;. The size of the array should be put
670 in the <structfield>length</structfield> field of this
671 <structname>v4l2_buffer</structname> structure.</entry>
568 </row> 672 </row>
569 <row> 673 <row>
570 <entry>__u32</entry> 674 <entry>__u32</entry>
571 <entry><structfield>length</structfield></entry> 675 <entry><structfield>length</structfield></entry>
572 <entry></entry> 676 <entry></entry>
573 <entry>Size of the buffer (not the payload) in bytes.</entry> 677 <entry>Size of the buffer (not the payload) in bytes for the
678 single-planar API. For the multi-planar API should contain the
679 number of elements in the <structfield>planes</structfield> array.
680 </entry>
574 </row> 681 </row>
575 <row> 682 <row>
576 <entry>__u32</entry> 683 <entry>__u32</entry>
@@ -596,6 +703,66 @@ should set this to 0.</entry>
596 </tgroup> 703 </tgroup>
597 </table> 704 </table>
598 705
706 <table frame="none" pgwide="1" id="v4l2-plane">
707 <title>struct <structname>v4l2_plane</structname></title>
708 <tgroup cols="4">
709 &cs-ustr;
710 <tbody valign="top">
711 <row>
712 <entry>__u32</entry>
713 <entry><structfield>bytesused</structfield></entry>
714 <entry></entry>
715 <entry>The number of bytes occupied by data in the plane
716 (its payload).</entry>
717 </row>
718 <row>
719 <entry>__u32</entry>
720 <entry><structfield>length</structfield></entry>
721 <entry></entry>
722 <entry>Size in bytes of the plane (not its payload).</entry>
723 </row>
724 <row>
725 <entry>union</entry>
726 <entry><structfield>m</structfield></entry>
727 <entry></entry>
728 <entry></entry>
729 </row>
730 <row>
731 <entry></entry>
732 <entry>__u32</entry>
733 <entry><structfield>mem_offset</structfield></entry>
734 <entry>When the memory type in the containing &v4l2-buffer; is
735 <constant>V4L2_MEMORY_MMAP</constant>, this is the value that
736 should be passed to &func-mmap;, similar to the
737 <structfield>offset</structfield> field in &v4l2-buffer;.</entry>
738 </row>
739 <row>
740 <entry></entry>
741 <entry>__unsigned long</entry>
742 <entry><structfield>userptr</structfield></entry>
743 <entry>When the memory type in the containing &v4l2-buffer; is
744 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
745 pointer to the memory allocated for this plane by an application.
746 </entry>
747 </row>
748 <row>
749 <entry>__u32</entry>
750 <entry><structfield>data_offset</structfield></entry>
751 <entry></entry>
752 <entry>Offset in bytes to video data in the plane, if applicable.
753 </entry>
754 </row>
755 <row>
756 <entry>__u32</entry>
757 <entry><structfield>reserved[11]</structfield></entry>
758 <entry></entry>
759 <entry>Reserved for future use. Should be zeroed by an
760 application.</entry>
761 </row>
762 </tbody>
763 </tgroup>
764 </table>
765
599 <table frame="none" pgwide="1" id="v4l2-buf-type"> 766 <table frame="none" pgwide="1" id="v4l2-buf-type">
600 <title>enum v4l2_buf_type</title> 767 <title>enum v4l2_buf_type</title>
601 <tgroup cols="3"> 768 <tgroup cols="3">
@@ -604,13 +771,27 @@ should set this to 0.</entry>
604 <row> 771 <row>
605 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant></entry> 772 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant></entry>
606 <entry>1</entry> 773 <entry>1</entry>
607 <entry>Buffer of a video capture stream, see <xref 774 <entry>Buffer of a single-planar video capture stream, see <xref
775 linkend="capture" />.</entry>
776 </row>
777 <row>
778 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>
779 </entry>
780 <entry>9</entry>
781 <entry>Buffer of a multi-planar video capture stream, see <xref
608 linkend="capture" />.</entry> 782 linkend="capture" />.</entry>
609 </row> 783 </row>
610 <row> 784 <row>
611 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant></entry> 785 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant></entry>
612 <entry>2</entry> 786 <entry>2</entry>
613 <entry>Buffer of a video output stream, see <xref 787 <entry>Buffer of a single-planar video output stream, see <xref
788 linkend="output" />.</entry>
789 </row>
790 <row>
791 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>
792 </entry>
793 <entry>10</entry>
794 <entry>Buffer of a multi-planar video output stream, see <xref
614 linkend="output" />.</entry> 795 linkend="output" />.</entry>
615 </row> 796 </row>
616 <row> 797 <row>
diff --git a/Documentation/DocBook/v4l/libv4l.xml b/Documentation/DocBook/v4l/libv4l.xml
index c14fc3db2a8..3cb10ec5192 100644
--- a/Documentation/DocBook/v4l/libv4l.xml
+++ b/Documentation/DocBook/v4l/libv4l.xml
@@ -140,7 +140,7 @@ and is not locked sets the cid to the scaled value.
140 <para>int v4l2_get_control(int fd, int cid) - 140 <para>int v4l2_get_control(int fd, int cid) -
141This function returns a value of 0 - 65535, scaled to from the actual range 141This function returns a value of 0 - 65535, scaled to from the actual range
142of the given v4l control id. when the cid does not exist, could not be 142of the given v4l control id. when the cid does not exist, could not be
143accessed for some reason, or some error occured 0 is returned. 143accessed for some reason, or some error occurred 0 is returned.
144</para></listitem> 144</para></listitem>
145</itemizedlist> 145</itemizedlist>
146 </section> 146 </section>
diff --git a/Documentation/DocBook/v4l/lirc_device_interface.xml b/Documentation/DocBook/v4l/lirc_device_interface.xml
index 68134c0ab4d..0e0453f39e7 100644
--- a/Documentation/DocBook/v4l/lirc_device_interface.xml
+++ b/Documentation/DocBook/v4l/lirc_device_interface.xml
@@ -45,7 +45,7 @@ describing an IR signal are read from the chardev.</para>
45<para>The data written to the chardev is a pulse/space sequence of integer 45<para>The data written to the chardev is a pulse/space sequence of integer
46values. Pulses and spaces are only marked implicitly by their position. The 46values. Pulses and spaces are only marked implicitly by their position. The
47data must start and end with a pulse, therefore, the data must always include 47data must start and end with a pulse, therefore, the data must always include
48an unevent number of samples. The write function must block until the data has 48an uneven number of samples. The write function must block until the data has
49been transmitted by the hardware.</para> 49been transmitted by the hardware.</para>
50</section> 50</section>
51 51
diff --git a/Documentation/DocBook/v4l/media-controller.xml b/Documentation/DocBook/v4l/media-controller.xml
new file mode 100644
index 00000000000..873ac3a621f
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-controller.xml
@@ -0,0 +1,89 @@
1<partinfo>
2 <authorgroup>
3 <author>
4 <firstname>Laurent</firstname>
5 <surname>Pinchart</surname>
6 <affiliation><address><email>laurent.pinchart@ideasonboard.com</email></address></affiliation>
7 <contrib>Initial version.</contrib>
8 </author>
9 </authorgroup>
10 <copyright>
11 <year>2010</year>
12 <holder>Laurent Pinchart</holder>
13 </copyright>
14
15 <revhistory>
16 <!-- Put document revisions here, newest first. -->
17 <revision>
18 <revnumber>1.0.0</revnumber>
19 <date>2010-11-10</date>
20 <authorinitials>lp</authorinitials>
21 <revremark>Initial revision</revremark>
22 </revision>
23 </revhistory>
24</partinfo>
25
26<title>Media Controller API</title>
27
28<chapter id="media_controller">
29 <title>Media Controller</title>
30
31 <section id="media-controller-intro">
32 <title>Introduction</title>
33 <para>Media devices increasingly handle multiple related functions. Many USB
34 cameras include microphones, video capture hardware can also output video,
35 or SoC camera interfaces also perform memory-to-memory operations similar to
36 video codecs.</para>
37 <para>Independent functions, even when implemented in the same hardware, can
38 be modelled as separate devices. A USB camera with a microphone will be
39 presented to userspace applications as V4L2 and ALSA capture devices. The
40 devices' relationships (when using a webcam, end-users shouldn't have to
41 manually select the associated USB microphone), while not made available
42 directly to applications by the drivers, can usually be retrieved from
43 sysfs.</para>
44 <para>With more and more advanced SoC devices being introduced, the current
45 approach will not scale. Device topologies are getting increasingly complex
46 and can't always be represented by a tree structure. Hardware blocks are
47 shared between different functions, creating dependencies between seemingly
48 unrelated devices.</para>
49 <para>Kernel abstraction APIs such as V4L2 and ALSA provide means for
50 applications to access hardware parameters. As newer hardware expose an
51 increasingly high number of those parameters, drivers need to guess what
52 applications really require based on limited information, thereby
53 implementing policies that belong to userspace.</para>
54 <para>The media controller API aims at solving those problems.</para>
55 </section>
56
57 <section id="media-controller-model">
58 <title>Media device model</title>
59 <para>Discovering a device internal topology, and configuring it at runtime,
60 is one of the goals of the media controller API. To achieve this, hardware
61 devices are modelled as an oriented graph of building blocks called entities
62 connected through pads.</para>
63 <para>An entity is a basic media hardware or software building block. It can
64 correspond to a large variety of logical blocks such as physical hardware
65 devices (CMOS sensor for instance), logical hardware devices (a building
66 block in a System-on-Chip image processing pipeline), DMA channels or
67 physical connectors.</para>
68 <para>A pad is a connection endpoint through which an entity can interact
69 with other entities. Data (not restricted to video) produced by an entity
70 flows from the entity's output to one or more entity inputs. Pads should not
71 be confused with physical pins at chip boundaries.</para>
72 <para>A link is a point-to-point oriented connection between two pads,
73 either on the same entity or on different entities. Data flows from a source
74 pad to a sink pad.</para>
75 </section>
76</chapter>
77
78<appendix id="media-user-func">
79 <title>Function Reference</title>
80 <!-- Keep this alphabetically sorted. -->
81 &sub-media-func-open;
82 &sub-media-func-close;
83 &sub-media-func-ioctl;
84 <!-- All ioctls go here. -->
85 &sub-media-ioc-device-info;
86 &sub-media-ioc-enum-entities;
87 &sub-media-ioc-enum-links;
88 &sub-media-ioc-setup-link;
89</appendix>
diff --git a/Documentation/DocBook/v4l/media-func-close.xml b/Documentation/DocBook/v4l/media-func-close.xml
new file mode 100644
index 00000000000..be149c802ae
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-close.xml
@@ -0,0 +1,59 @@
1<refentry id="media-func-close">
2 <refmeta>
3 <refentrytitle>media close()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-close</refname>
9 <refpurpose>Close a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;unistd.h&gt;</funcsynopsisinfo>
15 <funcprototype>
16 <funcdef>int <function>close</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 </funcprototype>
19 </funcsynopsis>
20 </refsynopsisdiv>
21
22 <refsect1>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fd;</para>
30 </listitem>
31 </varlistentry>
32 </variablelist>
33 </refsect1>
34
35 <refsect1>
36 <title>Description</title>
37
38 <para>Closes the media device. Resources associated with the file descriptor
39 are freed. The device configuration remain unchanged.</para>
40 </refsect1>
41
42 <refsect1>
43 <title>Return Value</title>
44
45 <para><function>close</function> returns 0 on success. On error, -1 is
46 returned, and <varname>errno</varname> is set appropriately. Possible error
47 codes are:</para>
48
49 <variablelist>
50 <varlistentry>
51 <term><errorcode>EBADF</errorcode></term>
52 <listitem>
53 <para><parameter>fd</parameter> is not a valid open file descriptor.
54 </para>
55 </listitem>
56 </varlistentry>
57 </variablelist>
58 </refsect1>
59</refentry>
diff --git a/Documentation/DocBook/v4l/media-func-ioctl.xml b/Documentation/DocBook/v4l/media-func-ioctl.xml
new file mode 100644
index 00000000000..bda8604de15
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-ioctl.xml
@@ -0,0 +1,116 @@
1<refentry id="media-func-ioctl">
2 <refmeta>
3 <refentrytitle>media ioctl()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-ioctl</refname>
9 <refpurpose>Control a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;sys/ioctl.h&gt;</funcsynopsisinfo>
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>void *<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>Media ioctl request code as defined in the media.h header file,
38 for example MEDIA_IOC_SETUP_LINK.</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para>Pointer to a request-specific structure.</para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>The <function>ioctl()</function> function manipulates media device
53 parameters. The argument <parameter>fd</parameter> must be an open file
54 descriptor.</para>
55 <para>The ioctl <parameter>request</parameter> code specifies the media
56 function to be called. It has encoded in it whether the argument is an
57 input, output or read/write parameter, and the size of the argument
58 <parameter>argp</parameter> in bytes.</para>
59 <para>Macros and structures definitions specifying media ioctl requests and
60 their parameters are located in the media.h header file. All media ioctl
61 requests, their respective function and parameters are specified in
62 <xref linkend="media-user-func" />.</para>
63 </refsect1>
64
65 <refsect1>
66 <title>Return Value</title>
67
68 <para><function>ioctl()</function> returns <returnvalue>0</returnvalue> on
69 success. On failure, <returnvalue>-1</returnvalue> is returned, and the
70 <varname>errno</varname> variable is set appropriately. Generic error codes
71 are listed below, and request-specific error codes are listed in the
72 individual requests descriptions.</para>
73 <para>When an ioctl that takes an output or read/write parameter fails,
74 the parameter remains unmodified.</para>
75
76 <variablelist>
77 <varlistentry>
78 <term><errorcode>EBADF</errorcode></term>
79 <listitem>
80 <para><parameter>fd</parameter> is not a valid open file descriptor.
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><errorcode>EFAULT</errorcode></term>
86 <listitem>
87 <para><parameter>argp</parameter> references an inaccessible memory
88 area.</para>
89 </listitem>
90 </varlistentry>
91 <varlistentry>
92 <term><errorcode>EINVAL</errorcode></term>
93 <listitem>
94 <para>The <parameter>request</parameter> or the data pointed to by
95 <parameter>argp</parameter> is not valid. This is a very common error
96 code, see the individual ioctl requests listed in
97 <xref linkend="media-user-func" /> for actual causes.</para>
98 </listitem>
99 </varlistentry>
100 <varlistentry>
101 <term><errorcode>ENOMEM</errorcode></term>
102 <listitem>
103 <para>Insufficient kernel memory was available to complete the
104 request.</para>
105 </listitem>
106 </varlistentry>
107 <varlistentry>
108 <term><errorcode>ENOTTY</errorcode></term>
109 <listitem>
110 <para><parameter>fd</parameter> is not associated with a character
111 special device.</para>
112 </listitem>
113 </varlistentry>
114 </variablelist>
115 </refsect1>
116</refentry>
diff --git a/Documentation/DocBook/v4l/media-func-open.xml b/Documentation/DocBook/v4l/media-func-open.xml
new file mode 100644
index 00000000000..f7df034dc9e
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-open.xml
@@ -0,0 +1,94 @@
1<refentry id="media-func-open">
2 <refmeta>
3 <refentrytitle>media open()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-open</refname>
9 <refpurpose>Open a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;fcntl.h&gt;</funcsynopsisinfo>
15 <funcprototype>
16 <funcdef>int <function>open</function></funcdef>
17 <paramdef>const char *<parameter>device_name</parameter></paramdef>
18 <paramdef>int <parameter>flags</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>device_name</parameter></term>
29 <listitem>
30 <para>Device to be opened.</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>flags</parameter></term>
35 <listitem>
36 <para>Open flags. Access mode must be either <constant>O_RDONLY</constant>
37 or <constant>O_RDWR</constant>. Other flags have no effect.</para>
38 </listitem>
39 </varlistentry>
40 </variablelist>
41 </refsect1>
42 <refsect1>
43 <title>Description</title>
44 <para>To open a media device applications call <function>open()</function>
45 with the desired device name. The function has no side effects; the device
46 configuration remain unchanged.</para>
47 <para>When the device is opened in read-only mode, attemps to modify its
48 configuration will result in an error, and <varname>errno</varname> will be
49 set to <errorcode>EBADF</errorcode>.</para>
50 </refsect1>
51 <refsect1>
52 <title>Return Value</title>
53
54 <para><function>open</function> returns the new file descriptor on success.
55 On error, -1 is returned, and <varname>errno</varname> is set appropriately.
56 Possible error codes are:</para>
57
58 <variablelist>
59 <varlistentry>
60 <term><errorcode>EACCES</errorcode></term>
61 <listitem>
62 <para>The requested access to the file is not allowed.</para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><errorcode>EMFILE</errorcode></term>
67 <listitem>
68 <para>The process already has the maximum number of files open.
69 </para>
70 </listitem>
71 </varlistentry>
72 <varlistentry>
73 <term><errorcode>ENFILE</errorcode></term>
74 <listitem>
75 <para>The system limit on the total number of open files has been
76 reached.</para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><errorcode>ENOMEM</errorcode></term>
81 <listitem>
82 <para>Insufficient kernel memory was available.</para>
83 </listitem>
84 </varlistentry>
85 <varlistentry>
86 <term><errorcode>ENXIO</errorcode></term>
87 <listitem>
88 <para>No device corresponding to this device special file exists.
89 </para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </refsect1>
94</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-device-info.xml b/Documentation/DocBook/v4l/media-ioc-device-info.xml
new file mode 100644
index 00000000000..1f3237351bb
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-device-info.xml
@@ -0,0 +1,133 @@
1<refentry id="media-ioc-device-info">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_DEVICE_INFO</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_DEVICE_INFO</refname>
9 <refpurpose>Query device information</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_device_info *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_DEVICE_INFO</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 <para>All media devices must support the <constant>MEDIA_IOC_DEVICE_INFO</constant>
53 ioctl. To query device information, applications call the ioctl with a
54 pointer to a &media-device-info;. The driver fills the structure and returns
55 the information to the application.
56 The ioctl never fails.</para>
57
58 <table pgwide="1" frame="none" id="media-device-info">
59 <title>struct <structname>media_device_info</structname></title>
60 <tgroup cols="3">
61 &cs-str;
62 <tbody valign="top">
63 <row>
64 <entry>char</entry>
65 <entry><structfield>driver</structfield>[16]</entry>
66 <entry><para>Name of the driver implementing the media API as a
67 NUL-terminated ASCII string. The driver version is stored in the
68 <structfield>driver_version</structfield> field.</para>
69 <para>Driver specific applications can use this information to
70 verify the driver identity. It is also useful to work around
71 known bugs, or to identify drivers in error reports.</para></entry>
72 </row>
73 <row>
74 <entry>char</entry>
75 <entry><structfield>model</structfield>[32]</entry>
76 <entry>Device model name as a NUL-terminated UTF-8 string. The
77 device version is stored in the <structfield>device_version</structfield>
78 field and is not be appended to the model name.</entry>
79 </row>
80 <row>
81 <entry>char</entry>
82 <entry><structfield>serial</structfield>[40]</entry>
83 <entry>Serial number as a NUL-terminated ASCII string.</entry>
84 </row>
85 <row>
86 <entry>char</entry>
87 <entry><structfield>bus_info</structfield>[32]</entry>
88 <entry>Location of the device in the system as a NUL-terminated
89 ASCII string. This includes the bus type name (PCI, USB, ...) and a
90 bus-specific identifier.</entry>
91 </row>
92 <row>
93 <entry>__u32</entry>
94 <entry><structfield>media_version</structfield></entry>
95 <entry>Media API version, formatted with the
96 <constant>KERNEL_VERSION()</constant> macro.</entry>
97 </row>
98 <row>
99 <entry>__u32</entry>
100 <entry><structfield>hw_revision</structfield></entry>
101 <entry>Hardware device revision in a driver-specific format.</entry>
102 </row>
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>media_version</structfield></entry>
106 <entry>Media device driver version, formatted with the
107 <constant>KERNEL_VERSION()</constant> macro. Together with the
108 <structfield>driver</structfield> field this identifies a particular
109 driver.</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>reserved</structfield>[31]</entry>
114 <entry>Reserved for future extensions. Drivers and applications must
115 set this array to zero.</entry>
116 </row>
117 </tbody>
118 </tgroup>
119 </table>
120 <para>The <structfield>serial</structfield> and <structfield>bus_info</structfield>
121 fields can be used to distinguish between multiple instances of otherwise
122 identical hardware. The serial number takes precedence when provided and can
123 be assumed to be unique. If the serial number is an empty string, the
124 <structfield>bus_info</structfield> field can be used instead. The
125 <structfield>bus_info</structfield> field is guaranteed to be unique, but
126 can vary across reboots or device unplug/replug.</para>
127 </refsect1>
128
129 <refsect1>
130 <title>Return value</title>
131 <para>This function doesn't return specific error codes.</para>
132 </refsect1>
133</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-enum-entities.xml b/Documentation/DocBook/v4l/media-ioc-enum-entities.xml
new file mode 100644
index 00000000000..576b68b33f2
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-enum-entities.xml
@@ -0,0 +1,308 @@
1<refentry id="media-ioc-enum-entities">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_ENUM_ENTITIES</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_ENUM_ENTITIES</refname>
9 <refpurpose>Enumerate entities and their properties</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_entity_desc *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_ENUM_ENTITIES</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 <para>To query the attributes of an entity, applications set the id field
52 of a &media-entity-desc; structure and call the MEDIA_IOC_ENUM_ENTITIES
53 ioctl with a pointer to this structure. The driver fills the rest of the
54 structure or returns an &EINVAL; when the id is invalid.</para>
55 <para>Entities can be enumerated by or'ing the id with the
56 <constant>MEDIA_ENT_ID_FLAG_NEXT</constant> flag. The driver will return
57 information about the entity with the smallest id strictly larger than the
58 requested one ('next entity'), or the &EINVAL; if there is none.</para>
59 <para>Entity IDs can be non-contiguous. Applications must
60 <emphasis>not</emphasis> try to enumerate entities by calling
61 MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
62 <para>Two or more entities that share a common non-zero
63 <structfield>group_id</structfield> value are considered as logically
64 grouped. Groups are used to report
65 <itemizedlist>
66 <listitem><para>ALSA, VBI and video nodes that carry the same media
67 stream</para></listitem>
68 <listitem><para>lens and flash controllers associated with a sensor</para></listitem>
69 </itemizedlist>
70 </para>
71
72 <table pgwide="1" frame="none" id="media-entity-desc">
73 <title>struct <structname>media_entity_desc</structname></title>
74 <tgroup cols="5">
75 <colspec colname="c1" />
76 <colspec colname="c2" />
77 <colspec colname="c3" />
78 <colspec colname="c4" />
79 <colspec colname="c5" />
80 <tbody valign="top">
81 <row>
82 <entry>__u32</entry>
83 <entry><structfield>id</structfield></entry>
84 <entry></entry>
85 <entry></entry>
86 <entry>Entity id, set by the application. When the id is or'ed with
87 <constant>MEDIA_ENT_ID_FLAG_NEXT</constant>, the driver clears the
88 flag and returns the first entity with a larger id.</entry>
89 </row>
90 <row>
91 <entry>char</entry>
92 <entry><structfield>name</structfield>[32]</entry>
93 <entry></entry>
94 <entry></entry>
95 <entry>Entity name as an UTF-8 NULL-terminated string.</entry>
96 </row>
97 <row>
98 <entry>__u32</entry>
99 <entry><structfield>type</structfield></entry>
100 <entry></entry>
101 <entry></entry>
102 <entry>Entity type, see <xref linkend="media-entity-type" /> for details.</entry>
103 </row>
104 <row>
105 <entry>__u32</entry>
106 <entry><structfield>revision</structfield></entry>
107 <entry></entry>
108 <entry></entry>
109 <entry>Entity revision in a driver/hardware specific format.</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>flags</structfield></entry>
114 <entry></entry>
115 <entry></entry>
116 <entry>Entity flags, see <xref linkend="media-entity-flag" /> for details.</entry>
117 </row>
118 <row>
119 <entry>__u32</entry>
120 <entry><structfield>group_id</structfield></entry>
121 <entry></entry>
122 <entry></entry>
123 <entry>Entity group ID</entry>
124 </row>
125 <row>
126 <entry>__u16</entry>
127 <entry><structfield>pads</structfield></entry>
128 <entry></entry>
129 <entry></entry>
130 <entry>Number of pads</entry>
131 </row>
132 <row>
133 <entry>__u16</entry>
134 <entry><structfield>links</structfield></entry>
135 <entry></entry>
136 <entry></entry>
137 <entry>Total number of outbound links. Inbound links are not counted
138 in this field.</entry>
139 </row>
140 <row>
141 <entry>union</entry>
142 </row>
143 <row>
144 <entry></entry>
145 <entry>struct</entry>
146 <entry><structfield>v4l</structfield></entry>
147 <entry></entry>
148 <entry>Valid for V4L sub-devices and nodes only.</entry>
149 </row>
150 <row>
151 <entry></entry>
152 <entry></entry>
153 <entry>__u32</entry>
154 <entry><structfield>major</structfield></entry>
155 <entry>V4L device node major number. For V4L sub-devices with no
156 device node, set by the driver to 0.</entry>
157 </row>
158 <row>
159 <entry></entry>
160 <entry></entry>
161 <entry>__u32</entry>
162 <entry><structfield>minor</structfield></entry>
163 <entry>V4L device node minor number. For V4L sub-devices with no
164 device node, set by the driver to 0.</entry>
165 </row>
166 <row>
167 <entry></entry>
168 <entry>struct</entry>
169 <entry><structfield>fb</structfield></entry>
170 <entry></entry>
171 <entry>Valid for frame buffer nodes only.</entry>
172 </row>
173 <row>
174 <entry></entry>
175 <entry></entry>
176 <entry>__u32</entry>
177 <entry><structfield>major</structfield></entry>
178 <entry>Frame buffer device node major number.</entry>
179 </row>
180 <row>
181 <entry></entry>
182 <entry></entry>
183 <entry>__u32</entry>
184 <entry><structfield>minor</structfield></entry>
185 <entry>Frame buffer device node minor number.</entry>
186 </row>
187 <row>
188 <entry></entry>
189 <entry>struct</entry>
190 <entry><structfield>alsa</structfield></entry>
191 <entry></entry>
192 <entry>Valid for ALSA devices only.</entry>
193 </row>
194 <row>
195 <entry></entry>
196 <entry></entry>
197 <entry>__u32</entry>
198 <entry><structfield>card</structfield></entry>
199 <entry>ALSA card number</entry>
200 </row>
201 <row>
202 <entry></entry>
203 <entry></entry>
204 <entry>__u32</entry>
205 <entry><structfield>device</structfield></entry>
206 <entry>ALSA device number</entry>
207 </row>
208 <row>
209 <entry></entry>
210 <entry></entry>
211 <entry>__u32</entry>
212 <entry><structfield>subdevice</structfield></entry>
213 <entry>ALSA sub-device number</entry>
214 </row>
215 <row>
216 <entry></entry>
217 <entry>int</entry>
218 <entry><structfield>dvb</structfield></entry>
219 <entry></entry>
220 <entry>DVB card number</entry>
221 </row>
222 <row>
223 <entry></entry>
224 <entry>__u8</entry>
225 <entry><structfield>raw</structfield>[180]</entry>
226 <entry></entry>
227 <entry></entry>
228 </row>
229 </tbody>
230 </tgroup>
231 </table>
232
233 <table frame="none" pgwide="1" id="media-entity-type">
234 <title>Media entity types</title>
235 <tgroup cols="2">
236 <colspec colname="c1"/>
237 <colspec colname="c2"/>
238 <tbody valign="top">
239 <row>
240 <entry><constant>MEDIA_ENT_T_DEVNODE</constant></entry>
241 <entry>Unknown device node</entry>
242 </row>
243 <row>
244 <entry><constant>MEDIA_ENT_T_DEVNODE_V4L</constant></entry>
245 <entry>V4L video, radio or vbi device node</entry>
246 </row>
247 <row>
248 <entry><constant>MEDIA_ENT_T_DEVNODE_FB</constant></entry>
249 <entry>Frame buffer device node</entry>
250 </row>
251 <row>
252 <entry><constant>MEDIA_ENT_T_DEVNODE_ALSA</constant></entry>
253 <entry>ALSA card</entry>
254 </row>
255 <row>
256 <entry><constant>MEDIA_ENT_T_DEVNODE_DVB</constant></entry>
257 <entry>DVB card</entry>
258 </row>
259 <row>
260 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV</constant></entry>
261 <entry>Unknown V4L sub-device</entry>
262 </row>
263 <row>
264 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_SENSOR</constant></entry>
265 <entry>Video sensor</entry>
266 </row>
267 <row>
268 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_FLASH</constant></entry>
269 <entry>Flash controller</entry>
270 </row>
271 <row>
272 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_LENS</constant></entry>
273 <entry>Lens controller</entry>
274 </row>
275 </tbody>
276 </tgroup>
277 </table>
278
279 <table frame="none" pgwide="1" id="media-entity-flag">
280 <title>Media entity flags</title>
281 <tgroup cols="2">
282 <colspec colname="c1"/>
283 <colspec colname="c2"/>
284 <tbody valign="top">
285 <row>
286 <entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
287 <entry>Default entity for its type. Used to discover the default
288 audio, VBI and video devices, the default camera sensor, ...</entry>
289 </row>
290 </tbody>
291 </tgroup>
292 </table>
293 </refsect1>
294
295 <refsect1>
296 &return-value;
297
298 <variablelist>
299 <varlistentry>
300 <term><errorcode>EINVAL</errorcode></term>
301 <listitem>
302 <para>The &media-entity-desc; <structfield>id</structfield> references
303 a non-existing entity.</para>
304 </listitem>
305 </varlistentry>
306 </variablelist>
307 </refsect1>
308</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-enum-links.xml b/Documentation/DocBook/v4l/media-ioc-enum-links.xml
new file mode 100644
index 00000000000..d2fc73ef8d5
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-enum-links.xml
@@ -0,0 +1,207 @@
1<refentry id="media-ioc-enum-links">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_ENUM_LINKS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_ENUM_LINKS</refname>
9 <refpurpose>Enumerate all pads and links for a given entity</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_links_enum *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_ENUM_LINKS</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 <para>To enumerate pads and/or links for a given entity, applications set
53 the entity field of a &media-links-enum; structure and initialize the
54 &media-pad-desc; and &media-link-desc; structure arrays pointed by the
55 <structfield>pads</structfield> and <structfield>links</structfield> fields.
56 They then call the MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this
57 structure.</para>
58 <para>If the <structfield>pads</structfield> field is not NULL, the driver
59 fills the <structfield>pads</structfield> array with information about the
60 entity's pads. The array must have enough room to store all the entity's
61 pads. The number of pads can be retrieved with the &MEDIA-IOC-ENUM-ENTITIES;
62 ioctl.</para>
63 <para>If the <structfield>links</structfield> field is not NULL, the driver
64 fills the <structfield>links</structfield> array with information about the
65 entity's outbound links. The array must have enough room to store all the
66 entity's outbound links. The number of outbound links can be retrieved with
67 the &MEDIA-IOC-ENUM-ENTITIES; ioctl.</para>
68 <para>Only forward links that originate at one of the entity's source pads
69 are returned during the enumeration process.</para>
70
71 <table pgwide="1" frame="none" id="media-links-enum">
72 <title>struct <structname>media_links_enum</structname></title>
73 <tgroup cols="3">
74 &cs-str;
75 <tbody valign="top">
76 <row>
77 <entry>__u32</entry>
78 <entry><structfield>entity</structfield></entry>
79 <entry>Entity id, set by the application.</entry>
80 </row>
81 <row>
82 <entry>struct &media-pad-desc;</entry>
83 <entry>*<structfield>pads</structfield></entry>
84 <entry>Pointer to a pads array allocated by the application. Ignored
85 if NULL.</entry>
86 </row>
87 <row>
88 <entry>struct &media-link-desc;</entry>
89 <entry>*<structfield>links</structfield></entry>
90 <entry>Pointer to a links array allocated by the application. Ignored
91 if NULL.</entry>
92 </row>
93 </tbody>
94 </tgroup>
95 </table>
96
97 <table pgwide="1" frame="none" id="media-pad-desc">
98 <title>struct <structname>media_pad_desc</structname></title>
99 <tgroup cols="3">
100 &cs-str;
101 <tbody valign="top">
102 <row>
103 <entry>__u32</entry>
104 <entry><structfield>entity</structfield></entry>
105 <entry>ID of the entity this pad belongs to.</entry>
106 </row>
107 <row>
108 <entry>__u16</entry>
109 <entry><structfield>index</structfield></entry>
110 <entry>0-based pad index.</entry>
111 </row>
112 <row>
113 <entry>__u32</entry>
114 <entry><structfield>flags</structfield></entry>
115 <entry>Pad flags, see <xref linkend="media-pad-flag" /> for more details.</entry>
116 </row>
117 </tbody>
118 </tgroup>
119 </table>
120
121 <table frame="none" pgwide="1" id="media-pad-flag">
122 <title>Media pad flags</title>
123 <tgroup cols="2">
124 <colspec colname="c1"/>
125 <colspec colname="c2"/>
126 <tbody valign="top">
127 <row>
128 <entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
129 <entry>Input pad, relative to the entity. Input pads sink data and
130 are targets of links.</entry>
131 </row>
132 <row>
133 <entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
134 <entry>Output pad, relative to the entity. Output pads source data
135 and are origins of links.</entry>
136 </row>
137 </tbody>
138 </tgroup>
139 </table>
140
141 <table pgwide="1" frame="none" id="media-link-desc">
142 <title>struct <structname>media_links_desc</structname></title>
143 <tgroup cols="3">
144 &cs-str;
145 <tbody valign="top">
146 <row>
147 <entry>struct &media-pad-desc;</entry>
148 <entry><structfield>source</structfield></entry>
149 <entry>Pad at the origin of this link.</entry>
150 </row>
151 <row>
152 <entry>struct &media-pad-desc;</entry>
153 <entry><structfield>sink</structfield></entry>
154 <entry>Pad at the target of this link.</entry>
155 </row>
156 <row>
157 <entry>__u32</entry>
158 <entry><structfield>flags</structfield></entry>
159 <entry>Link flags, see <xref linkend="media-link-flag" /> for more details.</entry>
160 </row>
161 </tbody>
162 </tgroup>
163 </table>
164
165 <table frame="none" pgwide="1" id="media-link-flag">
166 <title>Media link flags</title>
167 <tgroup cols="2">
168 <colspec colname="c1"/>
169 <colspec colname="c2"/>
170 <tbody valign="top">
171 <row>
172 <entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
173 <entry>The link is enabled and can be used to transfer media data.
174 When two or more links target a sink pad, only one of them can be
175 enabled at a time.</entry>
176 </row>
177 <row>
178 <entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
179 <entry>The link enabled state can't be modified at runtime. An
180 immutable link is always enabled.</entry>
181 </row>
182 <row>
183 <entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
184 <entry>The link enabled state can be modified during streaming. This
185 flag is set by drivers and is read-only for applications.</entry>
186 </row>
187 </tbody>
188 </tgroup>
189 </table>
190 <para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
191 <constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
192 </refsect1>
193
194 <refsect1>
195 &return-value;
196
197 <variablelist>
198 <varlistentry>
199 <term><errorcode>EINVAL</errorcode></term>
200 <listitem>
201 <para>The &media-links-enum; <structfield>id</structfield> references
202 a non-existing entity.</para>
203 </listitem>
204 </varlistentry>
205 </variablelist>
206 </refsect1>
207</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-setup-link.xml b/Documentation/DocBook/v4l/media-ioc-setup-link.xml
new file mode 100644
index 00000000000..cec97af4dab
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-setup-link.xml
@@ -0,0 +1,93 @@
1<refentry id="media-ioc-setup-link">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_SETUP_LINK</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_SETUP_LINK</refname>
9 <refpurpose>Modify the properties of a link</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_link_desc *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_SETUP_LINK</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 <para>To change link properties applications fill a &media-link-desc; with
53 link identification information (source and sink pad) and the new requested
54 link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to
55 that structure.</para>
56 <para>The only configurable property is the <constant>ENABLED</constant>
57 link flag to enable/disable a link. Links marked with the
58 <constant>IMMUTABLE</constant> link flag can not be enabled or disabled.
59 </para>
60 <para>Link configuration has no side effect on other links. If an enabled
61 link at the sink pad prevents the link from being enabled, the driver
62 returns with an &EBUSY;.</para>
63 <para>Only links marked with the <constant>DYNAMIC</constant> link flag can
64 be enabled/disabled while streaming media data. Attempting to enable or
65 disable a streaming non-dynamic link will return an &EBUSY;.</para>
66 <para>If the specified link can't be found the driver returns with an
67 &EINVAL;.</para>
68 </refsect1>
69
70 <refsect1>
71 &return-value;
72
73 <variablelist>
74 <varlistentry>
75 <term><errorcode>EBUSY</errorcode></term>
76 <listitem>
77 <para>The link properties can't be changed because the link is
78 currently busy. This can be caused, for instance, by an active media
79 stream (audio or video) on the link. The ioctl shouldn't be retried if
80 no other action is performed before to fix the problem.</para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term><errorcode>EINVAL</errorcode></term>
85 <listitem>
86 <para>The &media-link-desc; references a non-existing link, or the
87 link is immutable and an attempt to modify its configuration was made.
88 </para>
89 </listitem>
90 </varlistentry>
91 </variablelist>
92 </refsect1>
93</refentry>
diff --git a/Documentation/DocBook/v4l/nv12mt.gif b/Documentation/DocBook/v4l/nv12mt.gif
new file mode 100644
index 00000000000..ef2d4cf8367
--- /dev/null
+++ b/Documentation/DocBook/v4l/nv12mt.gif
Binary files differ
diff --git a/Documentation/DocBook/v4l/nv12mt_example.gif b/Documentation/DocBook/v4l/nv12mt_example.gif
new file mode 100644
index 00000000000..df81d68108e
--- /dev/null
+++ b/Documentation/DocBook/v4l/nv12mt_example.gif
Binary files differ
diff --git a/Documentation/DocBook/v4l/pipeline.pdf b/Documentation/DocBook/v4l/pipeline.pdf
new file mode 100644
index 00000000000..ee3e37f04b6
--- /dev/null
+++ b/Documentation/DocBook/v4l/pipeline.pdf
Binary files differ
diff --git a/Documentation/DocBook/v4l/pipeline.png b/Documentation/DocBook/v4l/pipeline.png
new file mode 100644
index 00000000000..f19b86c2c24
--- /dev/null
+++ b/Documentation/DocBook/v4l/pipeline.png
Binary files differ
diff --git a/Documentation/DocBook/v4l/pixfmt-m420.xml b/Documentation/DocBook/v4l/pixfmt-m420.xml
new file mode 100644
index 00000000000..ce4bc019e5c
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-m420.xml
@@ -0,0 +1,147 @@
1 <refentry id="V4L2-PIX-FMT-M420">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_M420 ('M420')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_M420</constant></refname>
8 <refpurpose>Format with &frac12; horizontal and vertical chroma
9 resolution, also known as YUV 4:2:0. Hybrid plane line-interleaved
10 layout.</refpurpose>
11 </refnamediv>
12 <refsect1>
13 <title>Description</title>
14
15 <para>M420 is a YUV format with &frac12; horizontal and vertical chroma
16 subsampling (YUV 4:2:0). Pixels are organized as interleaved luma and
17 chroma planes. Two lines of luma data are followed by one line of chroma
18 data.</para>
19 <para>The luma plane has one byte per pixel. The chroma plane contains
20 interleaved CbCr pixels subsampled by &frac12; in the horizontal and
21 vertical directions. Each CbCr pair belongs to four pixels. For example,
22Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
23Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
24Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.</para>
25
26 <para>All line lengths are identical: if the Y lines include pad bytes
27 so do the CbCr lines.</para>
28
29 <example>
30 <title><constant>V4L2_PIX_FMT_M420</constant> 4 &times; 4
31pixel image</title>
32
33 <formalpara>
34 <title>Byte Order.</title>
35 <para>Each cell is one byte.
36 <informaltable frame="none">
37 <tgroup cols="5" align="center">
38 <colspec align="left" colwidth="2*" />
39 <tbody valign="top">
40 <row>
41 <entry>start&nbsp;+&nbsp;0:</entry>
42 <entry>Y'<subscript>00</subscript></entry>
43 <entry>Y'<subscript>01</subscript></entry>
44 <entry>Y'<subscript>02</subscript></entry>
45 <entry>Y'<subscript>03</subscript></entry>
46 </row>
47 <row>
48 <entry>start&nbsp;+&nbsp;4:</entry>
49 <entry>Y'<subscript>10</subscript></entry>
50 <entry>Y'<subscript>11</subscript></entry>
51 <entry>Y'<subscript>12</subscript></entry>
52 <entry>Y'<subscript>13</subscript></entry>
53 </row>
54 <row>
55 <entry>start&nbsp;+&nbsp;8:</entry>
56 <entry>Cb<subscript>00</subscript></entry>
57 <entry>Cr<subscript>00</subscript></entry>
58 <entry>Cb<subscript>01</subscript></entry>
59 <entry>Cr<subscript>01</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;16:</entry>
63 <entry>Y'<subscript>20</subscript></entry>
64 <entry>Y'<subscript>21</subscript></entry>
65 <entry>Y'<subscript>22</subscript></entry>
66 <entry>Y'<subscript>23</subscript></entry>
67 </row>
68 <row>
69 <entry>start&nbsp;+&nbsp;20:</entry>
70 <entry>Y'<subscript>30</subscript></entry>
71 <entry>Y'<subscript>31</subscript></entry>
72 <entry>Y'<subscript>32</subscript></entry>
73 <entry>Y'<subscript>33</subscript></entry>
74 </row>
75 <row>
76 <entry>start&nbsp;+&nbsp;24:</entry>
77 <entry>Cb<subscript>10</subscript></entry>
78 <entry>Cr<subscript>10</subscript></entry>
79 <entry>Cb<subscript>11</subscript></entry>
80 <entry>Cr<subscript>11</subscript></entry>
81 </row>
82 </tbody>
83 </tgroup>
84 </informaltable>
85 </para>
86 </formalpara>
87
88 <formalpara>
89 <title>Color Sample Location.</title>
90 <para>
91 <informaltable frame="none">
92 <tgroup cols="7" align="center">
93 <tbody valign="top">
94 <row>
95 <entry></entry>
96 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
97 <entry>2</entry><entry></entry><entry>3</entry>
98 </row>
99 <row>
100 <entry>0</entry>
101 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
102 <entry>Y</entry><entry></entry><entry>Y</entry>
103 </row>
104 <row>
105 <entry></entry>
106 <entry></entry><entry>C</entry><entry></entry><entry></entry>
107 <entry></entry><entry>C</entry><entry></entry>
108 </row>
109 <row>
110 <entry>1</entry>
111 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
112 <entry>Y</entry><entry></entry><entry>Y</entry>
113 </row>
114 <row>
115 <entry></entry>
116 </row>
117 <row>
118 <entry>2</entry>
119 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
120 <entry>Y</entry><entry></entry><entry>Y</entry>
121 </row>
122 <row>
123 <entry></entry>
124 <entry></entry><entry>C</entry><entry></entry><entry></entry>
125 <entry></entry><entry>C</entry><entry></entry>
126 </row>
127 <row>
128 <entry>3</entry>
129 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
130 <entry>Y</entry><entry></entry><entry>Y</entry>
131 </row>
132 </tbody>
133 </tgroup>
134 </informaltable>
135 </para>
136 </formalpara>
137 </example>
138 </refsect1>
139 </refentry>
140
141 <!--
142Local Variables:
143mode: sgml
144sgml-parent-document: "pixfmt.sgml"
145indent-tabs-mode: nil
146End:
147 -->
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/v4l/pixfmt-nv12m.xml
new file mode 100644
index 00000000000..c9e166d9ded
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-nv12m.xml
@@ -0,0 +1,154 @@
1 <refentry id="V4L2-PIX-FMT-NV12M">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname> <constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> with planes
9 non contiguous in memory. </refpurpose>
10 </refnamediv>
11 <refsect1>
12 <title>Description</title>
13
14 <para>This is a multi-planar, two-plane version of the YUV 4:2:0 format.
15The three components are separated into two sub-images or planes.
16<constant>V4L2_PIX_FMT_NV12M</constant> differs from <constant>V4L2_PIX_FMT_NV12
17</constant> in that the two planes are non-contiguous in memory, i.e. the chroma
18plane do not necessarily immediately follows the luma plane.
19The luminance data occupies the first plane. The Y plane has one byte per pixel.
20In the second plane there is a chrominance data with alternating chroma samples.
21The CbCr plane is the same width, in bytes, as the Y plane (and of the image),
22but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example,
23Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
24Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
25Y'<subscript>10</subscript>, Y'<subscript>11</subscript>. </para>
26
27 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
28used only in drivers and applications that support the multi-planar API,
29described in <xref linkend="planar-apis"/>. </para>
30
31 <para>If the Y plane has pad bytes after each row, then the
32CbCr plane has as many pad bytes after its rows.</para>
33
34 <example>
35 <title><constant>V4L2_PIX_FMT_NV12M</constant> 4 &times; 4 pixel image</title>
36
37 <formalpara>
38 <title>Byte Order.</title>
39 <para>Each cell is one byte.
40 <informaltable frame="none">
41 <tgroup cols="5" align="center">
42 <colspec align="left" colwidth="2*" />
43 <tbody valign="top">
44 <row>
45 <entry>start0&nbsp;+&nbsp;0:</entry>
46 <entry>Y'<subscript>00</subscript></entry>
47 <entry>Y'<subscript>01</subscript></entry>
48 <entry>Y'<subscript>02</subscript></entry>
49 <entry>Y'<subscript>03</subscript></entry>
50 </row>
51 <row>
52 <entry>start0&nbsp;+&nbsp;4:</entry>
53 <entry>Y'<subscript>10</subscript></entry>
54 <entry>Y'<subscript>11</subscript></entry>
55 <entry>Y'<subscript>12</subscript></entry>
56 <entry>Y'<subscript>13</subscript></entry>
57 </row>
58 <row>
59 <entry>start0&nbsp;+&nbsp;8:</entry>
60 <entry>Y'<subscript>20</subscript></entry>
61 <entry>Y'<subscript>21</subscript></entry>
62 <entry>Y'<subscript>22</subscript></entry>
63 <entry>Y'<subscript>23</subscript></entry>
64 </row>
65 <row>
66 <entry>start0&nbsp;+&nbsp;12:</entry>
67 <entry>Y'<subscript>30</subscript></entry>
68 <entry>Y'<subscript>31</subscript></entry>
69 <entry>Y'<subscript>32</subscript></entry>
70 <entry>Y'<subscript>33</subscript></entry>
71 </row>
72 <row>
73 <entry></entry>
74 </row>
75 <row>
76 <entry>start1&nbsp;+&nbsp;0:</entry>
77 <entry>Cb<subscript>00</subscript></entry>
78 <entry>Cr<subscript>00</subscript></entry>
79 <entry>Cb<subscript>01</subscript></entry>
80 <entry>Cr<subscript>01</subscript></entry>
81 </row>
82 <row>
83 <entry>start1&nbsp;+&nbsp;4:</entry>
84 <entry>Cb<subscript>10</subscript></entry>
85 <entry>Cr<subscript>10</subscript></entry>
86 <entry>Cb<subscript>11</subscript></entry>
87 <entry>Cr<subscript>11</subscript></entry>
88 </row>
89 </tbody>
90 </tgroup>
91 </informaltable>
92 </para>
93 </formalpara>
94
95 <formalpara>
96 <title>Color Sample Location.</title>
97 <para>
98 <informaltable frame="none">
99 <tgroup cols="7" align="center">
100 <tbody valign="top">
101 <row>
102 <entry></entry>
103 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
104 <entry>2</entry><entry></entry><entry>3</entry>
105 </row>
106 <row>
107 <entry>0</entry>
108 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
109 <entry>Y</entry><entry></entry><entry>Y</entry>
110 </row>
111 <row>
112 <entry></entry>
113 <entry></entry><entry>C</entry><entry></entry><entry></entry>
114 <entry></entry><entry>C</entry><entry></entry>
115 </row>
116 <row>
117 <entry>1</entry>
118 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
119 <entry>Y</entry><entry></entry><entry>Y</entry>
120 </row>
121 <row>
122 <entry></entry>
123 </row>
124 <row>
125 <entry>2</entry>
126 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
127 <entry>Y</entry><entry></entry><entry>Y</entry>
128 </row>
129 <row>
130 <entry></entry>
131 <entry></entry><entry>C</entry><entry></entry><entry></entry>
132 <entry></entry><entry>C</entry><entry></entry>
133 </row>
134 <row>
135 <entry>3</entry>
136 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
137 <entry>Y</entry><entry></entry><entry>Y</entry>
138 </row>
139 </tbody>
140 </tgroup>
141 </informaltable>
142 </para>
143 </formalpara>
144 </example>
145 </refsect1>
146 </refentry>
147
148 <!--
149Local Variables:
150mode: sgml
151sgml-parent-document: "pixfmt.sgml"
152indent-tabs-mode: nil
153End:
154 -->
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12mt.xml b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml
new file mode 100644
index 00000000000..7a2855a526c
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml
@@ -0,0 +1,74 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_NV12MT ('TM12')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname id="V4L2-PIX-FMT-NV12MT"><constant>V4L2_PIX_FMT_NV12MT
8</constant></refname>
9 <refpurpose>Formats with &frac12; horizontal and vertical
10chroma resolution. This format has two planes - one for luminance and one for
11chrominance. Chroma samples are interleaved. The difference to
12<constant>V4L2_PIX_FMT_NV12</constant> is the memory layout. Pixels are
13grouped in macroblocks of 64x32 size. The order of macroblocks in memory is
14also not standard.
15 </refpurpose>
16 </refnamediv>
17 <refsect1>
18 <title>Description</title>
19
20 <para>This is the two-plane versions of the YUV 4:2:0 format where data
21is grouped into 64x32 macroblocks. The three components are separated into two
22sub-images or planes. The Y plane has one byte per pixel and pixels are grouped
23into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y
24plane (and the image), but is half as tall in pixels. The chroma plane is also
25grouped into 64x32 macroblocks.</para>
26 <para>Width of the buffer has to be aligned to the multiple of 128, and
27height alignment is 32. Every four adjactent buffers - two horizontally and two
28vertically are grouped together and are located in memory in Z or flipped Z
29order. </para>
30 <para>Layout of macroblocks in memory is presented in the following
31figure.</para>
32 <para><figure id="nv12mt">
33 <title><constant>V4L2_PIX_FMT_NV12MT</constant> macroblock Z shape
34memory layout</title>
35 <mediaobject>
36 <imageobject>
37 <imagedata fileref="nv12mt.gif" format="GIF" />
38 </imageobject>
39 </mediaobject>
40 </figure>
41 The requirement that width is multiple of 128 is implemented because,
42the Z shape cannot be cut in half horizontally. In case the vertical resolution
43of macroblocks is odd then the last row of macroblocks is arranged in a linear
44order. </para>
45 <para>In case of chroma the layout is identical. Cb and Cr samples are
46interleaved. Height of the buffer is aligned to 32.
47 </para>
48 <example>
49 <title>Memory layout of macroblocks in <constant>V4L2_PIX_FMT_NV12
50</constant> format pixel image - extreme case</title>
51 <para>
52 <figure id="nv12mt_ex">
53 <title>Example <constant>V4L2_PIX_FMT_NV12MT</constant> memory
54layout of macroblocks</title>
55 <mediaobject>
56 <imageobject>
57 <imagedata fileref="nv12mt_example.gif" format="GIF" />
58 </imageobject>
59 </mediaobject>
60 </figure>
61 Memory layout of macroblocks of <constant>V4L2_PIX_FMT_NV12MT
62</constant> format in most extreme case.
63 </para>
64 </example>
65 </refsect1>
66 </refentry>
67
68 <!--
69Local Variables:
70mode: sgml
71sgml-parent-document: "pixfmt.sgml"
72indent-tabs-mode: nil
73End:
74 -->
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb12.xml b/Documentation/DocBook/v4l/pixfmt-srggb12.xml
new file mode 100644
index 00000000000..9ba4fb690bc
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-srggb12.xml
@@ -0,0 +1,90 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_SRGGB12 ('RG12'),
4 V4L2_PIX_FMT_SGRBG12 ('BA12'),
5 V4L2_PIX_FMT_SGBRG12 ('GB12'),
6 V4L2_PIX_FMT_SBGGR12 ('BG12'),
7 </refentrytitle>
8 &manvol;
9 </refmeta>
10 <refnamediv>
11 <refname id="V4L2-PIX-FMT-SRGGB12"><constant>V4L2_PIX_FMT_SRGGB12</constant></refname>
12 <refname id="V4L2-PIX-FMT-SGRBG12"><constant>V4L2_PIX_FMT_SGRBG12</constant></refname>
13 <refname id="V4L2-PIX-FMT-SGBRG12"><constant>V4L2_PIX_FMT_SGBRG12</constant></refname>
14 <refname id="V4L2-PIX-FMT-SBGGR12"><constant>V4L2_PIX_FMT_SBGGR12</constant></refname>
15 <refpurpose>12-bit Bayer formats expanded to 16 bits</refpurpose>
16 </refnamediv>
17 <refsect1>
18 <title>Description</title>
19
20 <para>The following four pixel formats are raw sRGB / Bayer formats with
2112 bits per colour. Each colour component is stored in a 16-bit word, with 6
22unused high bits filled with zeros. Each n-pixel row contains n/2 green samples
23and n/2 blue or red samples, with alternating red and blue rows. Bytes are
24stored in memory in little endian order. They are conventionally described
25as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these
26formats</para>
27
28 <example>
29 <title><constant>V4L2_PIX_FMT_SBGGR12</constant> 4 &times; 4
30pixel image</title>
31
32 <formalpara>
33 <title>Byte Order.</title>
34 <para>Each cell is one byte, high 6 bits in high bytes are 0.
35 <informaltable frame="none">
36 <tgroup cols="5" align="center">
37 <colspec align="left" colwidth="2*" />
38 <tbody valign="top">
39 <row>
40 <entry>start&nbsp;+&nbsp;0:</entry>
41 <entry>B<subscript>00low</subscript></entry>
42 <entry>B<subscript>00high</subscript></entry>
43 <entry>G<subscript>01low</subscript></entry>
44 <entry>G<subscript>01high</subscript></entry>
45 <entry>B<subscript>02low</subscript></entry>
46 <entry>B<subscript>02high</subscript></entry>
47 <entry>G<subscript>03low</subscript></entry>
48 <entry>G<subscript>03high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;8:</entry>
52 <entry>G<subscript>10low</subscript></entry>
53 <entry>G<subscript>10high</subscript></entry>
54 <entry>R<subscript>11low</subscript></entry>
55 <entry>R<subscript>11high</subscript></entry>
56 <entry>G<subscript>12low</subscript></entry>
57 <entry>G<subscript>12high</subscript></entry>
58 <entry>R<subscript>13low</subscript></entry>
59 <entry>R<subscript>13high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;16:</entry>
63 <entry>B<subscript>20low</subscript></entry>
64 <entry>B<subscript>20high</subscript></entry>
65 <entry>G<subscript>21low</subscript></entry>
66 <entry>G<subscript>21high</subscript></entry>
67 <entry>B<subscript>22low</subscript></entry>
68 <entry>B<subscript>22high</subscript></entry>
69 <entry>G<subscript>23low</subscript></entry>
70 <entry>G<subscript>23high</subscript></entry>
71 </row>
72 <row>
73 <entry>start&nbsp;+&nbsp;24:</entry>
74 <entry>G<subscript>30low</subscript></entry>
75 <entry>G<subscript>30high</subscript></entry>
76 <entry>R<subscript>31low</subscript></entry>
77 <entry>R<subscript>31high</subscript></entry>
78 <entry>G<subscript>32low</subscript></entry>
79 <entry>G<subscript>32high</subscript></entry>
80 <entry>R<subscript>33low</subscript></entry>
81 <entry>R<subscript>33high</subscript></entry>
82 </row>
83 </tbody>
84 </tgroup>
85 </informaltable>
86 </para>
87 </formalpara>
88 </example>
89 </refsect1>
90</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-y10b.xml b/Documentation/DocBook/v4l/pixfmt-y10b.xml
new file mode 100644
index 00000000000..adb0ad808c9
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-y10b.xml
@@ -0,0 +1,43 @@
1<refentry id="V4L2-PIX-FMT-Y10BPACK">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_Y10BPACK ('Y10B')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_Y10BPACK</constant></refname>
8 <refpurpose>Grey-scale image as a bit-packed array</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is a packed grey-scale image format with a depth of 10 bits per
14 pixel. Pixels are stored in a bit-packed array of 10bit bits per pixel,
15 with no padding between them and with the most significant bits coming
16 first from the left.</para>
17
18 <example>
19 <title><constant>V4L2_PIX_FMT_Y10BPACK</constant> 4 pixel data stream taking 5 bytes</title>
20
21 <formalpara>
22 <title>Bit-packed representation</title>
23 <para>pixels cross the byte boundary and have a ratio of 5 bytes for each 4
24 pixels.
25 <informaltable frame="all">
26 <tgroup cols="5" align="center">
27 <colspec align="left" colwidth="2*" />
28 <tbody valign="top">
29 <row>
30 <entry>Y'<subscript>00[9:2]</subscript></entry>
31 <entry>Y'<subscript>00[1:0]</subscript>Y'<subscript>01[9:4]</subscript></entry>
32 <entry>Y'<subscript>01[3:0]</subscript>Y'<subscript>02[9:6]</subscript></entry>
33 <entry>Y'<subscript>02[5:0]</subscript>Y'<subscript>03[9:8]</subscript></entry>
34 <entry>Y'<subscript>03[7:0]</subscript></entry>
35 </row>
36 </tbody>
37 </tgroup>
38 </informaltable>
39 </para>
40 </formalpara>
41 </example>
42 </refsect1>
43</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-y12.xml b/Documentation/DocBook/v4l/pixfmt-y12.xml
new file mode 100644
index 00000000000..ff417b858cc
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-y12.xml
@@ -0,0 +1,79 @@
1<refentry id="V4L2-PIX-FMT-Y12">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_Y12 ('Y12 ')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_Y12</constant></refname>
8 <refpurpose>Grey-scale image</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is a grey-scale image with a depth of 12 bits per pixel. Pixels
14are stored in 16-bit words with unused high bits padded with 0. The least
15significant byte is stored at lower memory addresses (little-endian).</para>
16
17 <example>
18 <title><constant>V4L2_PIX_FMT_Y12</constant> 4 &times; 4
19pixel image</title>
20
21 <formalpara>
22 <title>Byte Order.</title>
23 <para>Each cell is one byte.
24 <informaltable frame="none">
25 <tgroup cols="9" align="center">
26 <colspec align="left" colwidth="2*" />
27 <tbody valign="top">
28 <row>
29 <entry>start&nbsp;+&nbsp;0:</entry>
30 <entry>Y'<subscript>00low</subscript></entry>
31 <entry>Y'<subscript>00high</subscript></entry>
32 <entry>Y'<subscript>01low</subscript></entry>
33 <entry>Y'<subscript>01high</subscript></entry>
34 <entry>Y'<subscript>02low</subscript></entry>
35 <entry>Y'<subscript>02high</subscript></entry>
36 <entry>Y'<subscript>03low</subscript></entry>
37 <entry>Y'<subscript>03high</subscript></entry>
38 </row>
39 <row>
40 <entry>start&nbsp;+&nbsp;8:</entry>
41 <entry>Y'<subscript>10low</subscript></entry>
42 <entry>Y'<subscript>10high</subscript></entry>
43 <entry>Y'<subscript>11low</subscript></entry>
44 <entry>Y'<subscript>11high</subscript></entry>
45 <entry>Y'<subscript>12low</subscript></entry>
46 <entry>Y'<subscript>12high</subscript></entry>
47 <entry>Y'<subscript>13low</subscript></entry>
48 <entry>Y'<subscript>13high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;16:</entry>
52 <entry>Y'<subscript>20low</subscript></entry>
53 <entry>Y'<subscript>20high</subscript></entry>
54 <entry>Y'<subscript>21low</subscript></entry>
55 <entry>Y'<subscript>21high</subscript></entry>
56 <entry>Y'<subscript>22low</subscript></entry>
57 <entry>Y'<subscript>22high</subscript></entry>
58 <entry>Y'<subscript>23low</subscript></entry>
59 <entry>Y'<subscript>23high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;24:</entry>
63 <entry>Y'<subscript>30low</subscript></entry>
64 <entry>Y'<subscript>30high</subscript></entry>
65 <entry>Y'<subscript>31low</subscript></entry>
66 <entry>Y'<subscript>31high</subscript></entry>
67 <entry>Y'<subscript>32low</subscript></entry>
68 <entry>Y'<subscript>32high</subscript></entry>
69 <entry>Y'<subscript>33low</subscript></entry>
70 <entry>Y'<subscript>33high</subscript></entry>
71 </row>
72 </tbody>
73 </tgroup>
74 </informaltable>
75 </para>
76 </formalpara>
77 </example>
78 </refsect1>
79</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-yuv420m.xml b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml
new file mode 100644
index 00000000000..f5d8f57495c
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml
@@ -0,0 +1,162 @@
1 <refentry id="V4L2-PIX-FMT-YUV420M">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname> <constant>V4L2_PIX_FMT_YUV420M</constant></refname>
8 <refpurpose>Variation of <constant>V4L2_PIX_FMT_YUV420</constant>
9 with planes non contiguous in memory. </refpurpose>
10 </refnamediv>
11
12 <refsect1>
13 <title>Description</title>
14
15 <para>This is a multi-planar format, as opposed to a packed format.
16The three components are separated into three sub- images or planes.
17
18The Y plane is first. The Y plane has one byte per pixel. The Cb data
19constitutes the second plane which is half the width and half
20the height of the Y plane (and of the image). Each Cb belongs to four
21pixels, a two-by-two square of the image. For example,
22Cb<subscript>0</subscript> belongs to Y'<subscript>00</subscript>,
23Y'<subscript>01</subscript>, Y'<subscript>10</subscript>, and
24Y'<subscript>11</subscript>. The Cr data, just like the Cb plane, is
25in the third plane. </para>
26
27 <para>If the Y plane has pad bytes after each row, then the Cb
28and Cr planes have half as many pad bytes after their rows. In other
29words, two Cx rows (including padding) is exactly as long as one Y row
30(including padding).</para>
31
32 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
33used only in drivers and applications that support the multi-planar API,
34described in <xref linkend="planar-apis"/>. </para>
35
36 <example>
37 <title><constant>V4L2_PIX_FMT_YVU420M</constant> 4 &times; 4
38pixel image</title>
39
40 <formalpara>
41 <title>Byte Order.</title>
42 <para>Each cell is one byte.
43 <informaltable frame="none">
44 <tgroup cols="5" align="center">
45 <colspec align="left" colwidth="2*" />
46 <tbody valign="top">
47 <row>
48 <entry>start0&nbsp;+&nbsp;0:</entry>
49 <entry>Y'<subscript>00</subscript></entry>
50 <entry>Y'<subscript>01</subscript></entry>
51 <entry>Y'<subscript>02</subscript></entry>
52 <entry>Y'<subscript>03</subscript></entry>
53 </row>
54 <row>
55 <entry>start0&nbsp;+&nbsp;4:</entry>
56 <entry>Y'<subscript>10</subscript></entry>
57 <entry>Y'<subscript>11</subscript></entry>
58 <entry>Y'<subscript>12</subscript></entry>
59 <entry>Y'<subscript>13</subscript></entry>
60 </row>
61 <row>
62 <entry>start0&nbsp;+&nbsp;8:</entry>
63 <entry>Y'<subscript>20</subscript></entry>
64 <entry>Y'<subscript>21</subscript></entry>
65 <entry>Y'<subscript>22</subscript></entry>
66 <entry>Y'<subscript>23</subscript></entry>
67 </row>
68 <row>
69 <entry>start0&nbsp;+&nbsp;12:</entry>
70 <entry>Y'<subscript>30</subscript></entry>
71 <entry>Y'<subscript>31</subscript></entry>
72 <entry>Y'<subscript>32</subscript></entry>
73 <entry>Y'<subscript>33</subscript></entry>
74 </row>
75 <row><entry></entry></row>
76 <row>
77 <entry>start1&nbsp;+&nbsp;0:</entry>
78 <entry>Cb<subscript>00</subscript></entry>
79 <entry>Cb<subscript>01</subscript></entry>
80 </row>
81 <row>
82 <entry>start1&nbsp;+&nbsp;2:</entry>
83 <entry>Cb<subscript>10</subscript></entry>
84 <entry>Cb<subscript>11</subscript></entry>
85 </row>
86 <row><entry></entry></row>
87 <row>
88 <entry>start2&nbsp;+&nbsp;0:</entry>
89 <entry>Cr<subscript>00</subscript></entry>
90 <entry>Cr<subscript>01</subscript></entry>
91 </row>
92 <row>
93 <entry>start2&nbsp;+&nbsp;2:</entry>
94 <entry>Cr<subscript>10</subscript></entry>
95 <entry>Cr<subscript>11</subscript></entry>
96 </row>
97 </tbody>
98 </tgroup>
99 </informaltable>
100 </para>
101 </formalpara>
102
103 <formalpara>
104 <title>Color Sample Location.</title>
105 <para>
106 <informaltable frame="none">
107 <tgroup cols="7" align="center">
108 <tbody valign="top">
109 <row>
110 <entry></entry>
111 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
112 <entry>2</entry><entry></entry><entry>3</entry>
113 </row>
114 <row>
115 <entry>0</entry>
116 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
117 <entry>Y</entry><entry></entry><entry>Y</entry>
118 </row>
119 <row>
120 <entry></entry>
121 <entry></entry><entry>C</entry><entry></entry><entry></entry>
122 <entry></entry><entry>C</entry><entry></entry>
123 </row>
124 <row>
125 <entry>1</entry>
126 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
127 <entry>Y</entry><entry></entry><entry>Y</entry>
128 </row>
129 <row>
130 <entry></entry>
131 </row>
132 <row>
133 <entry>2</entry>
134 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
135 <entry>Y</entry><entry></entry><entry>Y</entry>
136 </row>
137 <row>
138 <entry></entry>
139 <entry></entry><entry>C</entry><entry></entry><entry></entry>
140 <entry></entry><entry>C</entry><entry></entry>
141 </row>
142 <row>
143 <entry>3</entry>
144 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
145 <entry>Y</entry><entry></entry><entry>Y</entry>
146 </row>
147 </tbody>
148 </tgroup>
149 </informaltable>
150 </para>
151 </formalpara>
152 </example>
153 </refsect1>
154 </refentry>
155
156 <!--
157Local Variables:
158mode: sgml
159sgml-parent-document: "pixfmt.sgml"
160indent-tabs-mode: nil
161End:
162 -->
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml
index cfffc88d738..deb660207f9 100644
--- a/Documentation/DocBook/v4l/pixfmt.xml
+++ b/Documentation/DocBook/v4l/pixfmt.xml
@@ -2,12 +2,16 @@
2 2
3 <para>The V4L2 API was primarily designed for devices exchanging 3 <para>The V4L2 API was primarily designed for devices exchanging
4image data with applications. The 4image data with applications. The
5<structname>v4l2_pix_format</structname> structure defines the format 5<structname>v4l2_pix_format</structname> and <structname>v4l2_pix_format_mplane
6and layout of an image in memory. Image formats are negotiated with 6</structname> structures define the format and layout of an image in memory.
7the &VIDIOC-S-FMT; ioctl. (The explanations here focus on video 7The former is used with the single-planar API, while the latter is used with the
8multi-planar version (see <xref linkend="planar-apis"/>). Image formats are
9negotiated with the &VIDIOC-S-FMT; ioctl. (The explanations here focus on video
8capturing and output, for overlay frame buffer formats see also 10capturing and output, for overlay frame buffer formats see also
9&VIDIOC-G-FBUF;.)</para> 11&VIDIOC-G-FBUF;.)</para>
10 12
13<section>
14 <title>Single-planar format structure</title>
11 <table pgwide="1" frame="none" id="v4l2-pix-format"> 15 <table pgwide="1" frame="none" id="v4l2-pix-format">
12 <title>struct <structname>v4l2_pix_format</structname></title> 16 <title>struct <structname>v4l2_pix_format</structname></title>
13 <tgroup cols="3"> 17 <tgroup cols="3">
@@ -106,6 +110,98 @@ set this field to zero.</entry>
106 </tbody> 110 </tbody>
107 </tgroup> 111 </tgroup>
108 </table> 112 </table>
113</section>
114
115<section>
116 <title>Multi-planar format structures</title>
117 <para>The <structname>v4l2_plane_pix_format</structname> structures define
118 size and layout for each of the planes in a multi-planar format.
119 The <structname>v4l2_pix_format_mplane</structname> structure contains
120 information common to all planes (such as image width and height) and
121 an array of <structname>v4l2_plane_pix_format</structname> structures,
122 describing all planes of that format.</para>
123 <table pgwide="1" frame="none" id="v4l2-plane-pix-format">
124 <title>struct <structname>vl42_plane_pix_format</structname></title>
125 <tgroup cols="3">
126 &cs-str;
127 <tbody valign="top">
128 <row>
129 <entry>__u32</entry>
130 <entry><structfield>sizeimage</structfield></entry>
131 <entry>Maximum size in bytes required for image data in this plane.
132 </entry>
133 </row>
134 <row>
135 <entry>__u16</entry>
136 <entry><structfield>bytesperline</structfield></entry>
137 <entry>Distance in bytes between the leftmost pixels in two adjacent
138 lines.</entry>
139 </row>
140 <row>
141 <entry>__u16</entry>
142 <entry><structfield>reserved[7]</structfield></entry>
143 <entry>Reserved for future extensions. Should be zeroed by the
144 application.</entry>
145 </row>
146 </tbody>
147 </tgroup>
148 </table>
149 <table pgwide="1" frame="none" id="v4l2-pix-format-mplane">
150 <title>struct <structname>v4l2_pix_format_mplane</structname></title>
151 <tgroup cols="3">
152 &cs-str;
153 <tbody valign="top">
154 <row>
155 <entry>__u32</entry>
156 <entry><structfield>width</structfield></entry>
157 <entry>Image width in pixels.</entry>
158 </row>
159 <row>
160 <entry>__u32</entry>
161 <entry><structfield>height</structfield></entry>
162 <entry>Image height in pixels.</entry>
163 </row>
164 <row>
165 <entry>__u32</entry>
166 <entry><structfield>pixelformat</structfield></entry>
167 <entry>The pixel format. Both single- and multi-planar four character
168codes can be used.</entry>
169 </row>
170 <row>
171 <entry>&v4l2-field;</entry>
172 <entry><structfield>field</structfield></entry>
173 <entry>See &v4l2-pix-format;.</entry>
174 </row>
175 <row>
176 <entry>&v4l2-colorspace;</entry>
177 <entry><structfield>colorspace</structfield></entry>
178 <entry>See &v4l2-pix-format;.</entry>
179 </row>
180 <row>
181 <entry>&v4l2-plane-pix-format;</entry>
182 <entry><structfield>plane_fmt[VIDEO_MAX_PLANES]</structfield></entry>
183 <entry>An array of structures describing format of each plane this
184 pixel format consists of. The number of valid entries in this array
185 has to be put in the <structfield>num_planes</structfield>
186 field.</entry>
187 </row>
188 <row>
189 <entry>__u8</entry>
190 <entry><structfield>num_planes</structfield></entry>
191 <entry>Number of planes (i.e. separate memory buffers) for this format
192 and the number of valid entries in the
193 <structfield>plane_fmt</structfield> array.</entry>
194 </row>
195 <row>
196 <entry>__u8</entry>
197 <entry><structfield>reserved[11]</structfield></entry>
198 <entry>Reserved for future extensions. Should be zeroed by the
199 application.</entry>
200 </row>
201 </tbody>
202 </tgroup>
203 </table>
204</section>
109 205
110 <section> 206 <section>
111 <title>Standard Image Formats</title> 207 <title>Standard Image Formats</title>
@@ -142,11 +238,19 @@ leftmost pixel of the second row from the top, and so on. The last row
142has just as many pad bytes after it as the other rows.</para> 238has just as many pad bytes after it as the other rows.</para>
143 239
144 <para>In V4L2 each format has an identifier which looks like 240 <para>In V4L2 each format has an identifier which looks like
145<constant>PIX_FMT_XXX</constant>, defined in the <filename>videodev2.h</filename> 241<constant>PIX_FMT_XXX</constant>, defined in the <link
146header file. These identifiers 242linkend="videodev">videodev.h</link> header file. These identifiers
147represent <link linkend="v4l2-fourcc">four character codes</link> 243represent <link linkend="v4l2-fourcc">four character (FourCC) codes</link>
148which are also listed below, however they are not the same as those 244which are also listed below, however they are not the same as those
149used in the Windows world.</para> 245used in the Windows world.</para>
246
247 <para>For some formats, data is stored in separate, discontiguous
248memory buffers. Those formats are identified by a separate set of FourCC codes
249and are referred to as "multi-planar formats". For example, a YUV422 frame is
250normally stored in one memory buffer, but it can also be placed in two or three
251separate buffers, with Y component in one buffer and CbCr components in another
252in the 2-planar version or with each component in its own buffer in the
2533-planar case. Those sub-buffers are referred to as "planes".</para>
150 </section> 254 </section>
151 255
152 <section id="colorspaces"> 256 <section id="colorspaces">
@@ -569,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
569 &sub-srggb8; 673 &sub-srggb8;
570 &sub-sbggr16; 674 &sub-sbggr16;
571 &sub-srggb10; 675 &sub-srggb10;
676 &sub-srggb12;
572 </section> 677 </section>
573 678
574 <section id="yuv-formats"> 679 <section id="yuv-formats">
@@ -592,6 +697,8 @@ information.</para>
592 &sub-packed-yuv; 697 &sub-packed-yuv;
593 &sub-grey; 698 &sub-grey;
594 &sub-y10; 699 &sub-y10;
700 &sub-y12;
701 &sub-y10b;
595 &sub-y16; 702 &sub-y16;
596 &sub-yuyv; 703 &sub-yuyv;
597 &sub-uyvy; 704 &sub-uyvy;
@@ -599,11 +706,15 @@ information.</para>
599 &sub-vyuy; 706 &sub-vyuy;
600 &sub-y41p; 707 &sub-y41p;
601 &sub-yuv420; 708 &sub-yuv420;
709 &sub-yuv420m;
602 &sub-yuv410; 710 &sub-yuv410;
603 &sub-yuv422p; 711 &sub-yuv422p;
604 &sub-yuv411p; 712 &sub-yuv411p;
605 &sub-nv12; 713 &sub-nv12;
714 &sub-nv12m;
715 &sub-nv12mt;
606 &sub-nv16; 716 &sub-nv16;
717 &sub-m420;
607 </section> 718 </section>
608 719
609 <section> 720 <section>
diff --git a/Documentation/DocBook/v4l/planar-apis.xml b/Documentation/DocBook/v4l/planar-apis.xml
new file mode 100644
index 00000000000..878ce204048
--- /dev/null
+++ b/Documentation/DocBook/v4l/planar-apis.xml
@@ -0,0 +1,62 @@
1<section id="planar-apis">
2 <title>Single- and multi-planar APIs</title>
3
4 <para>Some devices require data for each input or output video frame
5 to be placed in discontiguous memory buffers. In such cases, one
6 video frame has to be addressed using more than one memory address, i.e. one
7 pointer per "plane". A plane is a sub-buffer of the current frame. For
8 examples of such formats see <xref linkend="pixfmt" />.</para>
9
10 <para>Initially, V4L2 API did not support multi-planar buffers and a set of
11 extensions has been introduced to handle them. Those extensions constitute
12 what is being referred to as the "multi-planar API".</para>
13
14 <para>Some of the V4L2 API calls and structures are interpreted differently,
15 depending on whether single- or multi-planar API is being used. An application
16 can choose whether to use one or the other by passing a corresponding buffer
17 type to its ioctl calls. Multi-planar versions of buffer types are suffixed
18 with an `_MPLANE' string. For a list of available multi-planar buffer types
19 see &v4l2-buf-type;.
20 </para>
21
22 <section>
23 <title>Multi-planar formats</title>
24 <para>Multi-planar API introduces new multi-planar formats. Those formats
25 use a separate set of FourCC codes. It is important to distinguish between
26 the multi-planar API and a multi-planar format. Multi-planar API calls can
27 handle all single-planar formats as well (as long as they are passed in
28 multi-planar API structures), while the single-planar API cannot
29 handle multi-planar formats.</para>
30 </section>
31
32 <section>
33 <title>Calls that distinguish between single and multi-planar APIs</title>
34 <variablelist>
35 <varlistentry>
36 <term>&VIDIOC-QUERYCAP;</term>
37 <listitem><para>Two additional multi-planar capabilities are added. They can
38 be set together with non-multi-planar ones for devices that handle
39 both single- and multi-planar formats.</para></listitem>
40 </varlistentry>
41 <varlistentry>
42 <term>&VIDIOC-G-FMT;, &VIDIOC-S-FMT;, &VIDIOC-TRY-FMT;</term>
43 <listitem><para>New structures for describing multi-planar formats are added:
44 &v4l2-pix-format-mplane; and &v4l2-plane-pix-format;. Drivers may
45 define new multi-planar formats, which have distinct FourCC codes from
46 the existing single-planar ones.</para>
47 </listitem>
48 </varlistentry>
49 <varlistentry>
50 <term>&VIDIOC-QBUF;, &VIDIOC-DQBUF;, &VIDIOC-QUERYBUF;</term>
51 <listitem><para>A new &v4l2-plane; structure for describing planes is added.
52 Arrays of this structure are passed in the new
53 <structfield>m.planes</structfield> field of &v4l2-buffer;.</para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term>&VIDIOC-REQBUFS;</term>
58 <listitem><para>Will allocate multi-planar buffers as requested.</para></listitem>
59 </varlistentry>
60 </variablelist>
61 </section>
62</section>
diff --git a/Documentation/DocBook/v4l/remote_controllers.xml b/Documentation/DocBook/v4l/remote_controllers.xml
index 3c3b667b28e..160e464d44b 100644
--- a/Documentation/DocBook/v4l/remote_controllers.xml
+++ b/Documentation/DocBook/v4l/remote_controllers.xml
@@ -133,7 +133,7 @@ different IR's. Due to that, V4L2 API now specifies a standard for mapping Media
133<row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row> 133<row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row>
134<row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row> 134<row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row>
135 135
136<row><entry><emphasis role="bold">Miscelaneous keys</emphasis></entry></row> 136<row><entry><emphasis role="bold">Miscellaneous keys</emphasis></entry></row>
137 137
138<row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row> 138<row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row>
139<row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row> 139<row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row>
diff --git a/Documentation/DocBook/v4l/subdev-formats.xml b/Documentation/DocBook/v4l/subdev-formats.xml
new file mode 100644
index 00000000000..8d3409d2c63
--- /dev/null
+++ b/Documentation/DocBook/v4l/subdev-formats.xml
@@ -0,0 +1,2572 @@
1<section id="v4l2-mbus-format">
2 <title>Media Bus Formats</title>
3
4 <table pgwide="1" frame="none" id="v4l2-mbus-framefmt">
5 <title>struct <structname>v4l2_mbus_framefmt</structname></title>
6 <tgroup cols="3">
7 &cs-str;
8 <tbody valign="top">
9 <row>
10 <entry>__u32</entry>
11 <entry><structfield>width</structfield></entry>
12 <entry>Image width, in pixels.</entry>
13 </row>
14 <row>
15 <entry>__u32</entry>
16 <entry><structfield>height</structfield></entry>
17 <entry>Image height, in pixels.</entry>
18 </row>
19 <row>
20 <entry>__u32</entry>
21 <entry><structfield>code</structfield></entry>
22 <entry>Format code, from &v4l2-mbus-pixelcode;.</entry>
23 </row>
24 <row>
25 <entry>__u32</entry>
26 <entry><structfield>field</structfield></entry>
27 <entry>Field order, from &v4l2-field;. See
28 <xref linkend="field-order" /> for details.</entry>
29 </row>
30 <row>
31 <entry>__u32</entry>
32 <entry><structfield>colorspace</structfield></entry>
33 <entry>Image colorspace, from &v4l2-colorspace;. See
34 <xref linkend="colorspaces" /> for details.</entry>
35 </row>
36 <row>
37 <entry>__u32</entry>
38 <entry><structfield>reserved</structfield>[7]</entry>
39 <entry>Reserved for future extensions. Applications and drivers must
40 set the array to zero.</entry>
41 </row>
42 </tbody>
43 </tgroup>
44 </table>
45
46 <section id="v4l2-mbus-pixelcode">
47 <title>Media Bus Pixel Codes</title>
48
49 <para>The media bus pixel codes describe image formats as flowing over
50 physical busses (both between separate physical components and inside SoC
51 devices). This should not be confused with the V4L2 pixel formats that
52 describe, using four character codes, image formats as stored in memory.
53 </para>
54
55 <para>While there is a relationship between image formats on busses and
56 image formats in memory (a raw Bayer image won't be magically converted to
57 JPEG just by storing it to memory), there is no one-to-one correspondance
58 between them.</para>
59
60 <section>
61 <title>Packed RGB Formats</title>
62
63 <para>Those formats transfer pixel data as red, green and blue components.
64 The format code is made of the following information.
65 <itemizedlist>
66 <listitem><para>The red, green and blue components order code, as encoded in a
67 pixel sample. Possible values are RGB and BGR.</para></listitem>
68 <listitem><para>The number of bits per component, for each component. The values
69 can be different for all components. Common values are 555 and 565.</para>
70 </listitem>
71 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
72 the bus width must be transferred in multiple samples. Common values are
73 1 and 2.</para></listitem>
74 <listitem><para>The bus width.</para></listitem>
75 <listitem><para>For formats where the total number of bits per pixel is smaller
76 than the number of bus samples per pixel times the bus width, a padding
77 value stating if the bytes are padded in their most high order bits
78 (PADHI) or low order bits (PADLO).</para></listitem>
79 <listitem><para>For formats where the number of bus samples per pixel is larger
80 than 1, an endianness value stating if the pixel is transferred MSB first
81 (BE) or LSB first (LE).</para></listitem>
82 </itemizedlist>
83 </para>
84
85 <para>For instance, a format where pixels are encoded as 5-bits red, 5-bits
86 green and 5-bit blue values padded on the high bit, transferred as 2 8-bit
87 samples per pixel with the most significant bits (padding, red and half of
88 the green value) transferred first will be named
89 <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>.
90 </para>
91
92 <para>The following tables list existing packet RGB formats.</para>
93
94 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-rgb">
95 <title>RGB formats</title>
96 <tgroup cols="11">
97 <colspec colname="id" align="left" />
98 <colspec colname="code" align="center"/>
99 <colspec colname="bit" />
100 <colspec colnum="4" colname="b07" align="center" />
101 <colspec colnum="5" colname="b06" align="center" />
102 <colspec colnum="6" colname="b05" align="center" />
103 <colspec colnum="7" colname="b04" align="center" />
104 <colspec colnum="8" colname="b03" align="center" />
105 <colspec colnum="9" colname="b02" align="center" />
106 <colspec colnum="10" colname="b01" align="center" />
107 <colspec colnum="11" colname="b00" align="center" />
108 <spanspec namest="b07" nameend="b00" spanname="b0" />
109 <thead>
110 <row>
111 <entry>Identifier</entry>
112 <entry>Code</entry>
113 <entry></entry>
114 <entry spanname="b0">Data organization</entry>
115 </row>
116 <row>
117 <entry></entry>
118 <entry></entry>
119 <entry>Bit</entry>
120 <entry>7</entry>
121 <entry>6</entry>
122 <entry>5</entry>
123 <entry>4</entry>
124 <entry>3</entry>
125 <entry>2</entry>
126 <entry>1</entry>
127 <entry>0</entry>
128 </row>
129 </thead>
130 <tbody valign="top">
131 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-BE">
132 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE</entry>
133 <entry>0x1001</entry>
134 <entry></entry>
135 <entry>0</entry>
136 <entry>0</entry>
137 <entry>0</entry>
138 <entry>0</entry>
139 <entry>r<subscript>3</subscript></entry>
140 <entry>r<subscript>2</subscript></entry>
141 <entry>r<subscript>1</subscript></entry>
142 <entry>r<subscript>0</subscript></entry>
143 </row>
144 <row>
145 <entry></entry>
146 <entry></entry>
147 <entry></entry>
148 <entry>g<subscript>3</subscript></entry>
149 <entry>g<subscript>2</subscript></entry>
150 <entry>g<subscript>1</subscript></entry>
151 <entry>g<subscript>0</subscript></entry>
152 <entry>b<subscript>3</subscript></entry>
153 <entry>b<subscript>2</subscript></entry>
154 <entry>b<subscript>1</subscript></entry>
155 <entry>b<subscript>0</subscript></entry>
156 </row>
157 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-LE">
158 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE</entry>
159 <entry>0x1002</entry>
160 <entry></entry>
161 <entry>g<subscript>3</subscript></entry>
162 <entry>g<subscript>2</subscript></entry>
163 <entry>g<subscript>1</subscript></entry>
164 <entry>g<subscript>0</subscript></entry>
165 <entry>b<subscript>3</subscript></entry>
166 <entry>b<subscript>2</subscript></entry>
167 <entry>b<subscript>1</subscript></entry>
168 <entry>b<subscript>0</subscript></entry>
169 </row>
170 <row>
171 <entry></entry>
172 <entry></entry>
173 <entry></entry>
174 <entry>0</entry>
175 <entry>0</entry>
176 <entry>0</entry>
177 <entry>0</entry>
178 <entry>r<subscript>3</subscript></entry>
179 <entry>r<subscript>2</subscript></entry>
180 <entry>r<subscript>1</subscript></entry>
181 <entry>r<subscript>0</subscript></entry>
182 </row>
183 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-BE">
184 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</entry>
185 <entry>0x1003</entry>
186 <entry></entry>
187 <entry>0</entry>
188 <entry>r<subscript>4</subscript></entry>
189 <entry>r<subscript>3</subscript></entry>
190 <entry>r<subscript>2</subscript></entry>
191 <entry>r<subscript>1</subscript></entry>
192 <entry>r<subscript>0</subscript></entry>
193 <entry>g<subscript>4</subscript></entry>
194 <entry>g<subscript>3</subscript></entry>
195 </row>
196 <row>
197 <entry></entry>
198 <entry></entry>
199 <entry></entry>
200 <entry>g<subscript>2</subscript></entry>
201 <entry>g<subscript>1</subscript></entry>
202 <entry>g<subscript>0</subscript></entry>
203 <entry>b<subscript>4</subscript></entry>
204 <entry>b<subscript>3</subscript></entry>
205 <entry>b<subscript>2</subscript></entry>
206 <entry>b<subscript>1</subscript></entry>
207 <entry>b<subscript>0</subscript></entry>
208 </row>
209 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-LE">
210 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE</entry>
211 <entry>0x1004</entry>
212 <entry></entry>
213 <entry>g<subscript>2</subscript></entry>
214 <entry>g<subscript>1</subscript></entry>
215 <entry>g<subscript>0</subscript></entry>
216 <entry>b<subscript>4</subscript></entry>
217 <entry>b<subscript>3</subscript></entry>
218 <entry>b<subscript>2</subscript></entry>
219 <entry>b<subscript>1</subscript></entry>
220 <entry>b<subscript>0</subscript></entry>
221 </row>
222 <row>
223 <entry></entry>
224 <entry></entry>
225 <entry></entry>
226 <entry>0</entry>
227 <entry>r<subscript>4</subscript></entry>
228 <entry>r<subscript>3</subscript></entry>
229 <entry>r<subscript>2</subscript></entry>
230 <entry>r<subscript>1</subscript></entry>
231 <entry>r<subscript>0</subscript></entry>
232 <entry>g<subscript>4</subscript></entry>
233 <entry>g<subscript>3</subscript></entry>
234 </row>
235 <row id="V4L2-MBUS-FMT-BGR565-2X8-BE">
236 <entry>V4L2_MBUS_FMT_BGR565_2X8_BE</entry>
237 <entry>0x1005</entry>
238 <entry></entry>
239 <entry>b<subscript>4</subscript></entry>
240 <entry>b<subscript>3</subscript></entry>
241 <entry>b<subscript>2</subscript></entry>
242 <entry>b<subscript>1</subscript></entry>
243 <entry>b<subscript>0</subscript></entry>
244 <entry>g<subscript>5</subscript></entry>
245 <entry>g<subscript>4</subscript></entry>
246 <entry>g<subscript>3</subscript></entry>
247 </row>
248 <row>
249 <entry></entry>
250 <entry></entry>
251 <entry></entry>
252 <entry>g<subscript>2</subscript></entry>
253 <entry>g<subscript>1</subscript></entry>
254 <entry>g<subscript>0</subscript></entry>
255 <entry>r<subscript>4</subscript></entry>
256 <entry>r<subscript>3</subscript></entry>
257 <entry>r<subscript>2</subscript></entry>
258 <entry>r<subscript>1</subscript></entry>
259 <entry>r<subscript>0</subscript></entry>
260 </row>
261 <row id="V4L2-MBUS-FMT-BGR565-2X8-LE">
262 <entry>V4L2_MBUS_FMT_BGR565_2X8_LE</entry>
263 <entry>0x1006</entry>
264 <entry></entry>
265 <entry>g<subscript>2</subscript></entry>
266 <entry>g<subscript>1</subscript></entry>
267 <entry>g<subscript>0</subscript></entry>
268 <entry>r<subscript>4</subscript></entry>
269 <entry>r<subscript>3</subscript></entry>
270 <entry>r<subscript>2</subscript></entry>
271 <entry>r<subscript>1</subscript></entry>
272 <entry>r<subscript>0</subscript></entry>
273 </row>
274 <row>
275 <entry></entry>
276 <entry></entry>
277 <entry></entry>
278 <entry>b<subscript>4</subscript></entry>
279 <entry>b<subscript>3</subscript></entry>
280 <entry>b<subscript>2</subscript></entry>
281 <entry>b<subscript>1</subscript></entry>
282 <entry>b<subscript>0</subscript></entry>
283 <entry>g<subscript>5</subscript></entry>
284 <entry>g<subscript>4</subscript></entry>
285 <entry>g<subscript>3</subscript></entry>
286 </row>
287 <row id="V4L2-MBUS-FMT-RGB565-2X8-BE">
288 <entry>V4L2_MBUS_FMT_RGB565_2X8_BE</entry>
289 <entry>0x1007</entry>
290 <entry></entry>
291 <entry>r<subscript>4</subscript></entry>
292 <entry>r<subscript>3</subscript></entry>
293 <entry>r<subscript>2</subscript></entry>
294 <entry>r<subscript>1</subscript></entry>
295 <entry>r<subscript>0</subscript></entry>
296 <entry>g<subscript>5</subscript></entry>
297 <entry>g<subscript>4</subscript></entry>
298 <entry>g<subscript>3</subscript></entry>
299 </row>
300 <row>
301 <entry></entry>
302 <entry></entry>
303 <entry></entry>
304 <entry>g<subscript>2</subscript></entry>
305 <entry>g<subscript>1</subscript></entry>
306 <entry>g<subscript>0</subscript></entry>
307 <entry>b<subscript>4</subscript></entry>
308 <entry>b<subscript>3</subscript></entry>
309 <entry>b<subscript>2</subscript></entry>
310 <entry>b<subscript>1</subscript></entry>
311 <entry>b<subscript>0</subscript></entry>
312 </row>
313 <row id="V4L2-MBUS-FMT-RGB565-2X8-LE">
314 <entry>V4L2_MBUS_FMT_RGB565_2X8_LE</entry>
315 <entry>0x1008</entry>
316 <entry></entry>
317 <entry>g<subscript>2</subscript></entry>
318 <entry>g<subscript>1</subscript></entry>
319 <entry>g<subscript>0</subscript></entry>
320 <entry>b<subscript>4</subscript></entry>
321 <entry>b<subscript>3</subscript></entry>
322 <entry>b<subscript>2</subscript></entry>
323 <entry>b<subscript>1</subscript></entry>
324 <entry>b<subscript>0</subscript></entry>
325 </row>
326 <row>
327 <entry></entry>
328 <entry></entry>
329 <entry></entry>
330 <entry>r<subscript>4</subscript></entry>
331 <entry>r<subscript>3</subscript></entry>
332 <entry>r<subscript>2</subscript></entry>
333 <entry>r<subscript>1</subscript></entry>
334 <entry>r<subscript>0</subscript></entry>
335 <entry>g<subscript>5</subscript></entry>
336 <entry>g<subscript>4</subscript></entry>
337 <entry>g<subscript>3</subscript></entry>
338 </row>
339 </tbody>
340 </tgroup>
341 </table>
342 </section>
343
344 <section>
345 <title>Bayer Formats</title>
346
347 <para>Those formats transfer pixel data as red, green and blue components.
348 The format code is made of the following information.
349 <itemizedlist>
350 <listitem><para>The red, green and blue components order code, as encoded in a
351 pixel sample. The possible values are shown in <xref
352 linkend="bayer-patterns" />.</para></listitem>
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>
355 </listitem>
356 <listitem><para>If the pixel components are DPCM-compressed, a mention of the
357 DPCM compression and the number of bits per compressed pixel component.</para>
358 </listitem>
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
361 1 and 2.</para></listitem>
362 <listitem><para>The bus width.</para></listitem>
363 <listitem><para>For formats where the total number of bits per pixel is smaller
364 than the number of bus samples per pixel times the bus width, a padding
365 value stating if the bytes are padded in their most high order bits
366 (PADHI) or low order bits (PADLO).</para></listitem>
367 <listitem><para>For formats where the number of bus samples per pixel is larger
368 than 1, an endianness value stating if the pixel is transferred MSB first
369 (BE) or LSB first (LE).</para></listitem>
370 </itemizedlist>
371 </para>
372
373 <para>For instance, a format with uncompressed 10-bit Bayer components
374 arranged in a red, green, green, blue pattern transferred as 2 8-bit
375 samples per pixel with the least significant bits transferred first will
376 be named <constant>V4L2_MBUS_FMT_SRGGB10_2X8_PADHI_LE</constant>.
377 </para>
378
379 <figure id="bayer-patterns">
380 <title>Bayer Patterns</title>
381 <mediaobject>
382 <imageobject>
383 <imagedata fileref="bayer.pdf" format="PS" />
384 </imageobject>
385 <imageobject>
386 <imagedata fileref="bayer.png" format="PNG" />
387 </imageobject>
388 <textobject>
389 <phrase>Bayer filter color patterns</phrase>
390 </textobject>
391 </mediaobject>
392 </figure>
393
394 <para>The following table lists existing packet Bayer formats. The data
395 organization is given as an example for the first pixel only.</para>
396
397 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-bayer">
398 <title>Bayer Formats</title>
399 <tgroup cols="15">
400 <colspec colname="id" align="left" />
401 <colspec colname="code" align="center"/>
402 <colspec colname="bit" />
403 <colspec colnum="4" colname="b11" align="center" />
404 <colspec colnum="5" colname="b10" align="center" />
405 <colspec colnum="6" colname="b09" align="center" />
406 <colspec colnum="7" colname="b08" align="center" />
407 <colspec colnum="8" colname="b07" align="center" />
408 <colspec colnum="9" colname="b06" align="center" />
409 <colspec colnum="10" colname="b05" align="center" />
410 <colspec colnum="11" colname="b04" align="center" />
411 <colspec colnum="12" colname="b03" align="center" />
412 <colspec colnum="13" colname="b02" align="center" />
413 <colspec colnum="14" colname="b01" align="center" />
414 <colspec colnum="15" colname="b00" align="center" />
415 <spanspec namest="b11" nameend="b00" spanname="b0" />
416 <thead>
417 <row>
418 <entry>Identifier</entry>
419 <entry>Code</entry>
420 <entry></entry>
421 <entry spanname="b0">Data organization</entry>
422 </row>
423 <row>
424 <entry></entry>
425 <entry></entry>
426 <entry>Bit</entry>
427 <entry>11</entry>
428 <entry>10</entry>
429 <entry>9</entry>
430 <entry>8</entry>
431 <entry>7</entry>
432 <entry>6</entry>
433 <entry>5</entry>
434 <entry>4</entry>
435 <entry>3</entry>
436 <entry>2</entry>
437 <entry>1</entry>
438 <entry>0</entry>
439 </row>
440 </thead>
441 <tbody valign="top">
442 <row id="V4L2-MBUS-FMT-SBGGR8-1X8">
443 <entry>V4L2_MBUS_FMT_SBGGR8_1X8</entry>
444 <entry>0x3001</entry>
445 <entry></entry>
446 <entry>-</entry>
447 <entry>-</entry>
448 <entry>-</entry>
449 <entry>-</entry>
450 <entry>b<subscript>7</subscript></entry>
451 <entry>b<subscript>6</subscript></entry>
452 <entry>b<subscript>5</subscript></entry>
453 <entry>b<subscript>4</subscript></entry>
454 <entry>b<subscript>3</subscript></entry>
455 <entry>b<subscript>2</subscript></entry>
456 <entry>b<subscript>1</subscript></entry>
457 <entry>b<subscript>0</subscript></entry>
458 </row>
459 <row id="V4L2-MBUS-FMT-SGBRG8-1X8">
460 <entry>V4L2_MBUS_FMT_SGBRG8_1X8</entry>
461 <entry>0x3013</entry>
462 <entry></entry>
463 <entry>-</entry>
464 <entry>-</entry>
465 <entry>-</entry>
466 <entry>-</entry>
467 <entry>g<subscript>7</subscript></entry>
468 <entry>g<subscript>6</subscript></entry>
469 <entry>g<subscript>5</subscript></entry>
470 <entry>g<subscript>4</subscript></entry>
471 <entry>g<subscript>3</subscript></entry>
472 <entry>g<subscript>2</subscript></entry>
473 <entry>g<subscript>1</subscript></entry>
474 <entry>g<subscript>0</subscript></entry>
475 </row>
476 <row id="V4L2-MBUS-FMT-SGRBG8-1X8">
477 <entry>V4L2_MBUS_FMT_SGRBG8_1X8</entry>
478 <entry>0x3002</entry>
479 <entry></entry>
480 <entry>-</entry>
481 <entry>-</entry>
482 <entry>-</entry>
483 <entry>-</entry>
484 <entry>g<subscript>7</subscript></entry>
485 <entry>g<subscript>6</subscript></entry>
486 <entry>g<subscript>5</subscript></entry>
487 <entry>g<subscript>4</subscript></entry>
488 <entry>g<subscript>3</subscript></entry>
489 <entry>g<subscript>2</subscript></entry>
490 <entry>g<subscript>1</subscript></entry>
491 <entry>g<subscript>0</subscript></entry>
492 </row>
493 <row id="V4L2-MBUS-FMT-SRGGB8-1X8">
494 <entry>V4L2_MBUS_FMT_SRGGB8_1X8</entry>
495 <entry>0x3014</entry>
496 <entry></entry>
497 <entry>-</entry>
498 <entry>-</entry>
499 <entry>-</entry>
500 <entry>-</entry>
501 <entry>r<subscript>7</subscript></entry>
502 <entry>r<subscript>6</subscript></entry>
503 <entry>r<subscript>5</subscript></entry>
504 <entry>r<subscript>4</subscript></entry>
505 <entry>r<subscript>3</subscript></entry>
506 <entry>r<subscript>2</subscript></entry>
507 <entry>r<subscript>1</subscript></entry>
508 <entry>r<subscript>0</subscript></entry>
509 </row>
510 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8">
511 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry>
512 <entry>0x300b</entry>
513 <entry></entry>
514 <entry>-</entry>
515 <entry>-</entry>
516 <entry>-</entry>
517 <entry>-</entry>
518 <entry>b<subscript>7</subscript></entry>
519 <entry>b<subscript>6</subscript></entry>
520 <entry>b<subscript>5</subscript></entry>
521 <entry>b<subscript>4</subscript></entry>
522 <entry>b<subscript>3</subscript></entry>
523 <entry>b<subscript>2</subscript></entry>
524 <entry>b<subscript>1</subscript></entry>
525 <entry>b<subscript>0</subscript></entry>
526 </row>
527 <row id="V4L2-MBUS-FMT-SGBRG10-DPCM8-1X8">
528 <entry>V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8</entry>
529 <entry>0x300c</entry>
530 <entry></entry>
531 <entry>-</entry>
532 <entry>-</entry>
533 <entry>-</entry>
534 <entry>-</entry>
535 <entry>g<subscript>7</subscript></entry>
536 <entry>g<subscript>6</subscript></entry>
537 <entry>g<subscript>5</subscript></entry>
538 <entry>g<subscript>4</subscript></entry>
539 <entry>g<subscript>3</subscript></entry>
540 <entry>g<subscript>2</subscript></entry>
541 <entry>g<subscript>1</subscript></entry>
542 <entry>g<subscript>0</subscript></entry>
543 </row>
544 <row id="V4L2-MBUS-FMT-SGRBG10-DPCM8-1X8">
545 <entry>V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8</entry>
546 <entry>0x3009</entry>
547 <entry></entry>
548 <entry>-</entry>
549 <entry>-</entry>
550 <entry>-</entry>
551 <entry>-</entry>
552 <entry>g<subscript>7</subscript></entry>
553 <entry>g<subscript>6</subscript></entry>
554 <entry>g<subscript>5</subscript></entry>
555 <entry>g<subscript>4</subscript></entry>
556 <entry>g<subscript>3</subscript></entry>
557 <entry>g<subscript>2</subscript></entry>
558 <entry>g<subscript>1</subscript></entry>
559 <entry>g<subscript>0</subscript></entry>
560 </row>
561 <row id="V4L2-MBUS-FMT-SRGGB10-DPCM8-1X8">
562 <entry>V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8</entry>
563 <entry>0x300d</entry>
564 <entry></entry>
565 <entry>-</entry>
566 <entry>-</entry>
567 <entry>-</entry>
568 <entry>-</entry>
569 <entry>r<subscript>7</subscript></entry>
570 <entry>r<subscript>6</subscript></entry>
571 <entry>r<subscript>5</subscript></entry>
572 <entry>r<subscript>4</subscript></entry>
573 <entry>r<subscript>3</subscript></entry>
574 <entry>r<subscript>2</subscript></entry>
575 <entry>r<subscript>1</subscript></entry>
576 <entry>r<subscript>0</subscript></entry>
577 </row>
578 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-BE">
579 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE</entry>
580 <entry>0x3003</entry>
581 <entry></entry>
582 <entry>-</entry>
583 <entry>-</entry>
584 <entry>-</entry>
585 <entry>-</entry>
586 <entry>0</entry>
587 <entry>0</entry>
588 <entry>0</entry>
589 <entry>0</entry>
590 <entry>0</entry>
591 <entry>0</entry>
592 <entry>b<subscript>9</subscript></entry>
593 <entry>b<subscript>8</subscript></entry>
594 </row>
595 <row>
596 <entry></entry>
597 <entry></entry>
598 <entry></entry>
599 <entry>-</entry>
600 <entry>-</entry>
601 <entry>-</entry>
602 <entry>-</entry>
603 <entry>b<subscript>7</subscript></entry>
604 <entry>b<subscript>6</subscript></entry>
605 <entry>b<subscript>5</subscript></entry>
606 <entry>b<subscript>4</subscript></entry>
607 <entry>b<subscript>3</subscript></entry>
608 <entry>b<subscript>2</subscript></entry>
609 <entry>b<subscript>1</subscript></entry>
610 <entry>b<subscript>0</subscript></entry>
611 </row>
612 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-LE">
613 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE</entry>
614 <entry>0x3004</entry>
615 <entry></entry>
616 <entry>-</entry>
617 <entry>-</entry>
618 <entry>-</entry>
619 <entry>-</entry>
620 <entry>b<subscript>7</subscript></entry>
621 <entry>b<subscript>6</subscript></entry>
622 <entry>b<subscript>5</subscript></entry>
623 <entry>b<subscript>4</subscript></entry>
624 <entry>b<subscript>3</subscript></entry>
625 <entry>b<subscript>2</subscript></entry>
626 <entry>b<subscript>1</subscript></entry>
627 <entry>b<subscript>0</subscript></entry>
628 </row>
629 <row>
630 <entry></entry>
631 <entry></entry>
632 <entry></entry>
633 <entry>-</entry>
634 <entry>-</entry>
635 <entry>-</entry>
636 <entry>-</entry>
637 <entry>0</entry>
638 <entry>0</entry>
639 <entry>0</entry>
640 <entry>0</entry>
641 <entry>0</entry>
642 <entry>0</entry>
643 <entry>b<subscript>9</subscript></entry>
644 <entry>b<subscript>8</subscript></entry>
645 </row>
646 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-BE">
647 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE</entry>
648 <entry>0x3005</entry>
649 <entry></entry>
650 <entry>-</entry>
651 <entry>-</entry>
652 <entry>-</entry>
653 <entry>-</entry>
654 <entry>b<subscript>9</subscript></entry>
655 <entry>b<subscript>8</subscript></entry>
656 <entry>b<subscript>7</subscript></entry>
657 <entry>b<subscript>6</subscript></entry>
658 <entry>b<subscript>5</subscript></entry>
659 <entry>b<subscript>4</subscript></entry>
660 <entry>b<subscript>3</subscript></entry>
661 <entry>b<subscript>2</subscript></entry>
662 </row>
663 <row>
664 <entry></entry>
665 <entry></entry>
666 <entry></entry>
667 <entry>-</entry>
668 <entry>-</entry>
669 <entry>-</entry>
670 <entry>-</entry>
671 <entry>b<subscript>1</subscript></entry>
672 <entry>b<subscript>0</subscript></entry>
673 <entry>0</entry>
674 <entry>0</entry>
675 <entry>0</entry>
676 <entry>0</entry>
677 <entry>0</entry>
678 <entry>0</entry>
679 </row>
680 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-LE">
681 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE</entry>
682 <entry>0x3006</entry>
683 <entry></entry>
684 <entry>-</entry>
685 <entry>-</entry>
686 <entry>-</entry>
687 <entry>-</entry>
688 <entry>b<subscript>1</subscript></entry>
689 <entry>b<subscript>0</subscript></entry>
690 <entry>0</entry>
691 <entry>0</entry>
692 <entry>0</entry>
693 <entry>0</entry>
694 <entry>0</entry>
695 <entry>0</entry>
696 </row>
697 <row>
698 <entry></entry>
699 <entry></entry>
700 <entry></entry>
701 <entry>-</entry>
702 <entry>-</entry>
703 <entry>-</entry>
704 <entry>-</entry>
705 <entry>b<subscript>9</subscript></entry>
706 <entry>b<subscript>8</subscript></entry>
707 <entry>b<subscript>7</subscript></entry>
708 <entry>b<subscript>6</subscript></entry>
709 <entry>b<subscript>5</subscript></entry>
710 <entry>b<subscript>4</subscript></entry>
711 <entry>b<subscript>3</subscript></entry>
712 <entry>b<subscript>2</subscript></entry>
713 </row>
714 <row id="V4L2-MBUS-FMT-SBGGR10-1X10">
715 <entry>V4L2_MBUS_FMT_SBGGR10_1X10</entry>
716 <entry>0x3007</entry>
717 <entry></entry>
718 <entry>-</entry>
719 <entry>-</entry>
720 <entry>b<subscript>9</subscript></entry>
721 <entry>b<subscript>8</subscript></entry>
722 <entry>b<subscript>7</subscript></entry>
723 <entry>b<subscript>6</subscript></entry>
724 <entry>b<subscript>5</subscript></entry>
725 <entry>b<subscript>4</subscript></entry>
726 <entry>b<subscript>3</subscript></entry>
727 <entry>b<subscript>2</subscript></entry>
728 <entry>b<subscript>1</subscript></entry>
729 <entry>b<subscript>0</subscript></entry>
730 </row>
731 <row id="V4L2-MBUS-FMT-SGBRG10-1X10">
732 <entry>V4L2_MBUS_FMT_SGBRG10_1X10</entry>
733 <entry>0x300e</entry>
734 <entry></entry>
735 <entry>-</entry>
736 <entry>-</entry>
737 <entry>g<subscript>9</subscript></entry>
738 <entry>g<subscript>8</subscript></entry>
739 <entry>g<subscript>7</subscript></entry>
740 <entry>g<subscript>6</subscript></entry>
741 <entry>g<subscript>5</subscript></entry>
742 <entry>g<subscript>4</subscript></entry>
743 <entry>g<subscript>3</subscript></entry>
744 <entry>g<subscript>2</subscript></entry>
745 <entry>g<subscript>1</subscript></entry>
746 <entry>g<subscript>0</subscript></entry>
747 </row>
748 <row id="V4L2-MBUS-FMT-SGRBG10-1X10">
749 <entry>V4L2_MBUS_FMT_SGRBG10_1X10</entry>
750 <entry>0x300a</entry>
751 <entry></entry>
752 <entry>-</entry>
753 <entry>-</entry>
754 <entry>g<subscript>9</subscript></entry>
755 <entry>g<subscript>8</subscript></entry>
756 <entry>g<subscript>7</subscript></entry>
757 <entry>g<subscript>6</subscript></entry>
758 <entry>g<subscript>5</subscript></entry>
759 <entry>g<subscript>4</subscript></entry>
760 <entry>g<subscript>3</subscript></entry>
761 <entry>g<subscript>2</subscript></entry>
762 <entry>g<subscript>1</subscript></entry>
763 <entry>g<subscript>0</subscript></entry>
764 </row>
765 <row id="V4L2-MBUS-FMT-SRGGB10-1X10">
766 <entry>V4L2_MBUS_FMT_SRGGB10_1X10</entry>
767 <entry>0x300f</entry>
768 <entry></entry>
769 <entry>-</entry>
770 <entry>-</entry>
771 <entry>r<subscript>9</subscript></entry>
772 <entry>r<subscript>8</subscript></entry>
773 <entry>r<subscript>7</subscript></entry>
774 <entry>r<subscript>6</subscript></entry>
775 <entry>r<subscript>5</subscript></entry>
776 <entry>r<subscript>4</subscript></entry>
777 <entry>r<subscript>3</subscript></entry>
778 <entry>r<subscript>2</subscript></entry>
779 <entry>r<subscript>1</subscript></entry>
780 <entry>r<subscript>0</subscript></entry>
781 </row>
782 <row id="V4L2-MBUS-FMT-SBGGR12-1X12">
783 <entry>V4L2_MBUS_FMT_SBGGR12_1X12</entry>
784 <entry>0x3008</entry>
785 <entry></entry>
786 <entry>b<subscript>11</subscript></entry>
787 <entry>b<subscript>10</subscript></entry>
788 <entry>b<subscript>9</subscript></entry>
789 <entry>b<subscript>8</subscript></entry>
790 <entry>b<subscript>7</subscript></entry>
791 <entry>b<subscript>6</subscript></entry>
792 <entry>b<subscript>5</subscript></entry>
793 <entry>b<subscript>4</subscript></entry>
794 <entry>b<subscript>3</subscript></entry>
795 <entry>b<subscript>2</subscript></entry>
796 <entry>b<subscript>1</subscript></entry>
797 <entry>b<subscript>0</subscript></entry>
798 </row>
799 <row id="V4L2-MBUS-FMT-SGBRG12-1X12">
800 <entry>V4L2_MBUS_FMT_SGBRG12_1X12</entry>
801 <entry>0x3010</entry>
802 <entry></entry>
803 <entry>g<subscript>11</subscript></entry>
804 <entry>g<subscript>10</subscript></entry>
805 <entry>g<subscript>9</subscript></entry>
806 <entry>g<subscript>8</subscript></entry>
807 <entry>g<subscript>7</subscript></entry>
808 <entry>g<subscript>6</subscript></entry>
809 <entry>g<subscript>5</subscript></entry>
810 <entry>g<subscript>4</subscript></entry>
811 <entry>g<subscript>3</subscript></entry>
812 <entry>g<subscript>2</subscript></entry>
813 <entry>g<subscript>1</subscript></entry>
814 <entry>g<subscript>0</subscript></entry>
815 </row>
816 <row id="V4L2-MBUS-FMT-SGRBG12-1X12">
817 <entry>V4L2_MBUS_FMT_SGRBG12_1X12</entry>
818 <entry>0x3011</entry>
819 <entry></entry>
820 <entry>g<subscript>11</subscript></entry>
821 <entry>g<subscript>10</subscript></entry>
822 <entry>g<subscript>9</subscript></entry>
823 <entry>g<subscript>8</subscript></entry>
824 <entry>g<subscript>7</subscript></entry>
825 <entry>g<subscript>6</subscript></entry>
826 <entry>g<subscript>5</subscript></entry>
827 <entry>g<subscript>4</subscript></entry>
828 <entry>g<subscript>3</subscript></entry>
829 <entry>g<subscript>2</subscript></entry>
830 <entry>g<subscript>1</subscript></entry>
831 <entry>g<subscript>0</subscript></entry>
832 </row>
833 <row id="V4L2-MBUS-FMT-SRGGB12-1X12">
834 <entry>V4L2_MBUS_FMT_SRGGB12_1X12</entry>
835 <entry>0x3012</entry>
836 <entry></entry>
837 <entry>r<subscript>11</subscript></entry>
838 <entry>r<subscript>10</subscript></entry>
839 <entry>r<subscript>9</subscript></entry>
840 <entry>r<subscript>8</subscript></entry>
841 <entry>r<subscript>7</subscript></entry>
842 <entry>r<subscript>6</subscript></entry>
843 <entry>r<subscript>5</subscript></entry>
844 <entry>r<subscript>4</subscript></entry>
845 <entry>r<subscript>3</subscript></entry>
846 <entry>r<subscript>2</subscript></entry>
847 <entry>r<subscript>1</subscript></entry>
848 <entry>r<subscript>0</subscript></entry>
849 </row>
850 </tbody>
851 </tgroup>
852 </table>
853 </section>
854
855 <section>
856 <title>Packed YUV Formats</title>
857
858 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U
859 and V components. The format code is made of the following information.
860 <itemizedlist>
861 <listitem><para>The Y, U and V components order code, as transferred on the
862 bus. Possible values are YUYV, UYVY, YVYU and VYUY.</para></listitem>
863 <listitem><para>The number of bits per pixel component. All components are
864 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
865 </listitem>
866 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
867 the bus width must be transferred in multiple samples. Common values are
868 1, 1.5 (encoded as 1_5) and 2.</para></listitem>
869 <listitem><para>The bus width. When the bus width is larger than the number of
870 bits per pixel component, several components are packed in a single bus
871 sample. The components are ordered as specified by the order code, with
872 components on the left of the code transferred in the high order bits.
873 Common values are 8 and 16.</para>
874 </listitem>
875 </itemizedlist>
876 </para>
877
878 <para>For instance, a format where pixels are encoded as 8-bit YUV values
879 downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the
880 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>.
881 </para>
882
883 <para>The following table lisst existing packet YUV formats.</para>
884
885 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8">
886 <title>YUV Formats</title>
887 <tgroup cols="23">
888 <colspec colname="id" align="left" />
889 <colspec colname="code" align="center"/>
890 <colspec colname="bit" />
891 <colspec colnum="4" colname="b19" align="center" />
892 <colspec colnum="5" colname="b18" align="center" />
893 <colspec colnum="6" colname="b17" align="center" />
894 <colspec colnum="7" colname="b16" align="center" />
895 <colspec colnum="8" colname="b15" align="center" />
896 <colspec colnum="9" colname="b14" align="center" />
897 <colspec colnum="10" colname="b13" align="center" />
898 <colspec colnum="11" colname="b12" align="center" />
899 <colspec colnum="12" colname="b11" align="center" />
900 <colspec colnum="13" colname="b10" align="center" />
901 <colspec colnum="14" colname="b09" align="center" />
902 <colspec colnum="15" colname="b08" align="center" />
903 <colspec colnum="16" colname="b07" align="center" />
904 <colspec colnum="17" colname="b06" align="center" />
905 <colspec colnum="18" colname="b05" align="center" />
906 <colspec colnum="19" colname="b04" align="center" />
907 <colspec colnum="20" colname="b03" align="center" />
908 <colspec colnum="21" colname="b02" align="center" />
909 <colspec colnum="22" colname="b01" align="center" />
910 <colspec colnum="23" colname="b00" align="center" />
911 <spanspec namest="b19" nameend="b00" spanname="b0" />
912 <thead>
913 <row>
914 <entry>Identifier</entry>
915 <entry>Code</entry>
916 <entry></entry>
917 <entry spanname="b0">Data organization</entry>
918 </row>
919 <row>
920 <entry></entry>
921 <entry></entry>
922 <entry>Bit</entry>
923 <entry>19</entry>
924 <entry>18</entry>
925 <entry>17</entry>
926 <entry>16</entry>
927 <entry>15</entry>
928 <entry>14</entry>
929 <entry>13</entry>
930 <entry>12</entry>
931 <entry>11</entry>
932 <entry>10</entry>
933 <entry>9</entry>
934 <entry>8</entry>
935 <entry>7</entry>
936 <entry>6</entry>
937 <entry>5</entry>
938 <entry>4</entry>
939 <entry>3</entry>
940 <entry>2</entry>
941 <entry>1</entry>
942 <entry>0</entry>
943 </row>
944 </thead>
945 <tbody valign="top">
946 <row id="V4L2-MBUS-FMT-Y8-1X8">
947 <entry>V4L2_MBUS_FMT_Y8_1X8</entry>
948 <entry>0x2001</entry>
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>
958 <entry>-</entry>
959 <entry>-</entry>
960 <entry>-</entry>
961 <entry>-</entry>
962 <entry>y<subscript>7</subscript></entry>
963 <entry>y<subscript>6</subscript></entry>
964 <entry>y<subscript>5</subscript></entry>
965 <entry>y<subscript>4</subscript></entry>
966 <entry>y<subscript>3</subscript></entry>
967 <entry>y<subscript>2</subscript></entry>
968 <entry>y<subscript>1</subscript></entry>
969 <entry>y<subscript>0</subscript></entry>
970 </row>
971 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8">
972 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry>
973 <entry>0x2002</entry>
974 <entry></entry>
975 <entry>-</entry>
976 <entry>-</entry>
977 <entry>-</entry>
978 <entry>-</entry>
979 <entry>-</entry>
980 <entry>-</entry>
981 <entry>-</entry>
982 <entry>-</entry>
983 <entry>-</entry>
984 <entry>-</entry>
985 <entry>-</entry>
986 <entry>-</entry>
987 <entry>u<subscript>7</subscript></entry>
988 <entry>u<subscript>6</subscript></entry>
989 <entry>u<subscript>5</subscript></entry>
990 <entry>u<subscript>4</subscript></entry>
991 <entry>u<subscript>3</subscript></entry>
992 <entry>u<subscript>2</subscript></entry>
993 <entry>u<subscript>1</subscript></entry>
994 <entry>u<subscript>0</subscript></entry>
995 </row>
996 <row>
997 <entry></entry>
998 <entry></entry>
999 <entry></entry>
1000 <entry>-</entry>
1001 <entry>-</entry>
1002 <entry>-</entry>
1003 <entry>-</entry>
1004 <entry>-</entry>
1005 <entry>-</entry>
1006 <entry>-</entry>
1007 <entry>-</entry>
1008 <entry>-</entry>
1009 <entry>-</entry>
1010 <entry>-</entry>
1011 <entry>-</entry>
1012 <entry>y<subscript>7</subscript></entry>
1013 <entry>y<subscript>6</subscript></entry>
1014 <entry>y<subscript>5</subscript></entry>
1015 <entry>y<subscript>4</subscript></entry>
1016 <entry>y<subscript>3</subscript></entry>
1017 <entry>y<subscript>2</subscript></entry>
1018 <entry>y<subscript>1</subscript></entry>
1019 <entry>y<subscript>0</subscript></entry>
1020 </row>
1021 <row>
1022 <entry></entry>
1023 <entry></entry>
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>
1033 <entry>-</entry>
1034 <entry>-</entry>
1035 <entry>-</entry>
1036 <entry>-</entry>
1037 <entry>y<subscript>7</subscript></entry>
1038 <entry>y<subscript>6</subscript></entry>
1039 <entry>y<subscript>5</subscript></entry>
1040 <entry>y<subscript>4</subscript></entry>
1041 <entry>y<subscript>3</subscript></entry>
1042 <entry>y<subscript>2</subscript></entry>
1043 <entry>y<subscript>1</subscript></entry>
1044 <entry>y<subscript>0</subscript></entry>
1045 </row>
1046 <row>
1047 <entry></entry>
1048 <entry></entry>
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>
1058 <entry>-</entry>
1059 <entry>-</entry>
1060 <entry>-</entry>
1061 <entry>-</entry>
1062 <entry>v<subscript>7</subscript></entry>
1063 <entry>v<subscript>6</subscript></entry>
1064 <entry>v<subscript>5</subscript></entry>
1065 <entry>v<subscript>4</subscript></entry>
1066 <entry>v<subscript>3</subscript></entry>
1067 <entry>v<subscript>2</subscript></entry>
1068 <entry>v<subscript>1</subscript></entry>
1069 <entry>v<subscript>0</subscript></entry>
1070 </row>
1071 <row>
1072 <entry></entry>
1073 <entry></entry>
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>
1083 <entry>-</entry>
1084 <entry>-</entry>
1085 <entry>-</entry>
1086 <entry>-</entry>
1087 <entry>y<subscript>7</subscript></entry>
1088 <entry>y<subscript>6</subscript></entry>
1089 <entry>y<subscript>5</subscript></entry>
1090 <entry>y<subscript>4</subscript></entry>
1091 <entry>y<subscript>3</subscript></entry>
1092 <entry>y<subscript>2</subscript></entry>
1093 <entry>y<subscript>1</subscript></entry>
1094 <entry>y<subscript>0</subscript></entry>
1095 </row>
1096 <row>
1097 <entry></entry>
1098 <entry></entry>
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>
1108 <entry>-</entry>
1109 <entry>-</entry>
1110 <entry>-</entry>
1111 <entry>-</entry>
1112 <entry>y<subscript>7</subscript></entry>
1113 <entry>y<subscript>6</subscript></entry>
1114 <entry>y<subscript>5</subscript></entry>
1115 <entry>y<subscript>4</subscript></entry>
1116 <entry>y<subscript>3</subscript></entry>
1117 <entry>y<subscript>2</subscript></entry>
1118 <entry>y<subscript>1</subscript></entry>
1119 <entry>y<subscript>0</subscript></entry>
1120 </row>
1121 <row id="V4L2-MBUS-FMT-VYUY8-1_5X8">
1122 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry>
1123 <entry>0x2003</entry>
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>
1133 <entry>-</entry>
1134 <entry>-</entry>
1135 <entry>-</entry>
1136 <entry>-</entry>
1137 <entry>v<subscript>7</subscript></entry>
1138 <entry>v<subscript>6</subscript></entry>
1139 <entry>v<subscript>5</subscript></entry>
1140 <entry>v<subscript>4</subscript></entry>
1141 <entry>v<subscript>3</subscript></entry>
1142 <entry>v<subscript>2</subscript></entry>
1143 <entry>v<subscript>1</subscript></entry>
1144 <entry>v<subscript>0</subscript></entry>
1145 </row>
1146 <row>
1147 <entry></entry>
1148 <entry></entry>
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>
1158 <entry>-</entry>
1159 <entry>-</entry>
1160 <entry>-</entry>
1161 <entry>-</entry>
1162 <entry>y<subscript>7</subscript></entry>
1163 <entry>y<subscript>6</subscript></entry>
1164 <entry>y<subscript>5</subscript></entry>
1165 <entry>y<subscript>4</subscript></entry>
1166 <entry>y<subscript>3</subscript></entry>
1167 <entry>y<subscript>2</subscript></entry>
1168 <entry>y<subscript>1</subscript></entry>
1169 <entry>y<subscript>0</subscript></entry>
1170 </row>
1171 <row>
1172 <entry></entry>
1173 <entry></entry>
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>
1183 <entry>-</entry>
1184 <entry>-</entry>
1185 <entry>-</entry>
1186 <entry>-</entry>
1187 <entry>y<subscript>7</subscript></entry>
1188 <entry>y<subscript>6</subscript></entry>
1189 <entry>y<subscript>5</subscript></entry>
1190 <entry>y<subscript>4</subscript></entry>
1191 <entry>y<subscript>3</subscript></entry>
1192 <entry>y<subscript>2</subscript></entry>
1193 <entry>y<subscript>1</subscript></entry>
1194 <entry>y<subscript>0</subscript></entry>
1195 </row>
1196 <row>
1197 <entry></entry>
1198 <entry></entry>
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>
1208 <entry>-</entry>
1209 <entry>-</entry>
1210 <entry>-</entry>
1211 <entry>-</entry>
1212 <entry>u<subscript>7</subscript></entry>
1213 <entry>u<subscript>6</subscript></entry>
1214 <entry>u<subscript>5</subscript></entry>
1215 <entry>u<subscript>4</subscript></entry>
1216 <entry>u<subscript>3</subscript></entry>
1217 <entry>u<subscript>2</subscript></entry>
1218 <entry>u<subscript>1</subscript></entry>
1219 <entry>u<subscript>0</subscript></entry>
1220 </row>
1221 <row>
1222 <entry></entry>
1223 <entry></entry>
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>
1233 <entry>-</entry>
1234 <entry>-</entry>
1235 <entry>-</entry>
1236 <entry>-</entry>
1237 <entry>y<subscript>7</subscript></entry>
1238 <entry>y<subscript>6</subscript></entry>
1239 <entry>y<subscript>5</subscript></entry>
1240 <entry>y<subscript>4</subscript></entry>
1241 <entry>y<subscript>3</subscript></entry>
1242 <entry>y<subscript>2</subscript></entry>
1243 <entry>y<subscript>1</subscript></entry>
1244 <entry>y<subscript>0</subscript></entry>
1245 </row>
1246 <row>
1247 <entry></entry>
1248 <entry></entry>
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>
1258 <entry>-</entry>
1259 <entry>-</entry>
1260 <entry>-</entry>
1261 <entry>-</entry>
1262 <entry>y<subscript>7</subscript></entry>
1263 <entry>y<subscript>6</subscript></entry>
1264 <entry>y<subscript>5</subscript></entry>
1265 <entry>y<subscript>4</subscript></entry>
1266 <entry>y<subscript>3</subscript></entry>
1267 <entry>y<subscript>2</subscript></entry>
1268 <entry>y<subscript>1</subscript></entry>
1269 <entry>y<subscript>0</subscript></entry>
1270 </row>
1271 <row id="V4L2-MBUS-FMT-YUYV8-1_5X8">
1272 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry>
1273 <entry>0x2004</entry>
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>
1283 <entry>-</entry>
1284 <entry>-</entry>
1285 <entry>-</entry>
1286 <entry>-</entry>
1287 <entry>y<subscript>7</subscript></entry>
1288 <entry>y<subscript>6</subscript></entry>
1289 <entry>y<subscript>5</subscript></entry>
1290 <entry>y<subscript>4</subscript></entry>
1291 <entry>y<subscript>3</subscript></entry>
1292 <entry>y<subscript>2</subscript></entry>
1293 <entry>y<subscript>1</subscript></entry>
1294 <entry>y<subscript>0</subscript></entry>
1295 </row>
1296 <row>
1297 <entry></entry>
1298 <entry></entry>
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>
1308 <entry>-</entry>
1309 <entry>-</entry>
1310 <entry>-</entry>
1311 <entry>-</entry>
1312 <entry>y<subscript>7</subscript></entry>
1313 <entry>y<subscript>6</subscript></entry>
1314 <entry>y<subscript>5</subscript></entry>
1315 <entry>y<subscript>4</subscript></entry>
1316 <entry>y<subscript>3</subscript></entry>
1317 <entry>y<subscript>2</subscript></entry>
1318 <entry>y<subscript>1</subscript></entry>
1319 <entry>y<subscript>0</subscript></entry>
1320 </row>
1321 <row>
1322 <entry></entry>
1323 <entry></entry>
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>
1333 <entry>-</entry>
1334 <entry>-</entry>
1335 <entry>-</entry>
1336 <entry>-</entry>
1337 <entry>u<subscript>7</subscript></entry>
1338 <entry>u<subscript>6</subscript></entry>
1339 <entry>u<subscript>5</subscript></entry>
1340 <entry>u<subscript>4</subscript></entry>
1341 <entry>u<subscript>3</subscript></entry>
1342 <entry>u<subscript>2</subscript></entry>
1343 <entry>u<subscript>1</subscript></entry>
1344 <entry>u<subscript>0</subscript></entry>
1345 </row>
1346 <row>
1347 <entry></entry>
1348 <entry></entry>
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>
1358 <entry>-</entry>
1359 <entry>-</entry>
1360 <entry>-</entry>
1361 <entry>-</entry>
1362 <entry>y<subscript>7</subscript></entry>
1363 <entry>y<subscript>6</subscript></entry>
1364 <entry>y<subscript>5</subscript></entry>
1365 <entry>y<subscript>4</subscript></entry>
1366 <entry>y<subscript>3</subscript></entry>
1367 <entry>y<subscript>2</subscript></entry>
1368 <entry>y<subscript>1</subscript></entry>
1369 <entry>y<subscript>0</subscript></entry>
1370 </row>
1371 <row>
1372 <entry></entry>
1373 <entry></entry>
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>
1383 <entry>-</entry>
1384 <entry>-</entry>
1385 <entry>-</entry>
1386 <entry>-</entry>
1387 <entry>y<subscript>7</subscript></entry>
1388 <entry>y<subscript>6</subscript></entry>
1389 <entry>y<subscript>5</subscript></entry>
1390 <entry>y<subscript>4</subscript></entry>
1391 <entry>y<subscript>3</subscript></entry>
1392 <entry>y<subscript>2</subscript></entry>
1393 <entry>y<subscript>1</subscript></entry>
1394 <entry>y<subscript>0</subscript></entry>
1395 </row>
1396 <row>
1397 <entry></entry>
1398 <entry></entry>
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>
1408 <entry>-</entry>
1409 <entry>-</entry>
1410 <entry>-</entry>
1411 <entry>-</entry>
1412 <entry>v<subscript>7</subscript></entry>
1413 <entry>v<subscript>6</subscript></entry>
1414 <entry>v<subscript>5</subscript></entry>
1415 <entry>v<subscript>4</subscript></entry>
1416 <entry>v<subscript>3</subscript></entry>
1417 <entry>v<subscript>2</subscript></entry>
1418 <entry>v<subscript>1</subscript></entry>
1419 <entry>v<subscript>0</subscript></entry>
1420 </row>
1421 <row id="V4L2-MBUS-FMT-YVYU8-1_5X8">
1422 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry>
1423 <entry>0x2005</entry>
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>
1433 <entry>-</entry>
1434 <entry>-</entry>
1435 <entry>-</entry>
1436 <entry>-</entry>
1437 <entry>y<subscript>7</subscript></entry>
1438 <entry>y<subscript>6</subscript></entry>
1439 <entry>y<subscript>5</subscript></entry>
1440 <entry>y<subscript>4</subscript></entry>
1441 <entry>y<subscript>3</subscript></entry>
1442 <entry>y<subscript>2</subscript></entry>
1443 <entry>y<subscript>1</subscript></entry>
1444 <entry>y<subscript>0</subscript></entry>
1445 </row>
1446 <row>
1447 <entry></entry>
1448 <entry></entry>
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>
1458 <entry>-</entry>
1459 <entry>-</entry>
1460 <entry>-</entry>
1461 <entry>-</entry>
1462 <entry>y<subscript>7</subscript></entry>
1463 <entry>y<subscript>6</subscript></entry>
1464 <entry>y<subscript>5</subscript></entry>
1465 <entry>y<subscript>4</subscript></entry>
1466 <entry>y<subscript>3</subscript></entry>
1467 <entry>y<subscript>2</subscript></entry>
1468 <entry>y<subscript>1</subscript></entry>
1469 <entry>y<subscript>0</subscript></entry>
1470 </row>
1471 <row>
1472 <entry></entry>
1473 <entry></entry>
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>
1483 <entry>-</entry>
1484 <entry>-</entry>
1485 <entry>-</entry>
1486 <entry>-</entry>
1487 <entry>v<subscript>7</subscript></entry>
1488 <entry>v<subscript>6</subscript></entry>
1489 <entry>v<subscript>5</subscript></entry>
1490 <entry>v<subscript>4</subscript></entry>
1491 <entry>v<subscript>3</subscript></entry>
1492 <entry>v<subscript>2</subscript></entry>
1493 <entry>v<subscript>1</subscript></entry>
1494 <entry>v<subscript>0</subscript></entry>
1495 </row>
1496 <row>
1497 <entry></entry>
1498 <entry></entry>
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>
1508 <entry>-</entry>
1509 <entry>-</entry>
1510 <entry>-</entry>
1511 <entry>-</entry>
1512 <entry>y<subscript>7</subscript></entry>
1513 <entry>y<subscript>6</subscript></entry>
1514 <entry>y<subscript>5</subscript></entry>
1515 <entry>y<subscript>4</subscript></entry>
1516 <entry>y<subscript>3</subscript></entry>
1517 <entry>y<subscript>2</subscript></entry>
1518 <entry>y<subscript>1</subscript></entry>
1519 <entry>y<subscript>0</subscript></entry>
1520 </row>
1521 <row>
1522 <entry></entry>
1523 <entry></entry>
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>
1533 <entry>-</entry>
1534 <entry>-</entry>
1535 <entry>-</entry>
1536 <entry>-</entry>
1537 <entry>y<subscript>7</subscript></entry>
1538 <entry>y<subscript>6</subscript></entry>
1539 <entry>y<subscript>5</subscript></entry>
1540 <entry>y<subscript>4</subscript></entry>
1541 <entry>y<subscript>3</subscript></entry>
1542 <entry>y<subscript>2</subscript></entry>
1543 <entry>y<subscript>1</subscript></entry>
1544 <entry>y<subscript>0</subscript></entry>
1545 </row>
1546 <row>
1547 <entry></entry>
1548 <entry></entry>
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>
1558 <entry>-</entry>
1559 <entry>-</entry>
1560 <entry>-</entry>
1561 <entry>-</entry>
1562 <entry>u<subscript>7</subscript></entry>
1563 <entry>u<subscript>6</subscript></entry>
1564 <entry>u<subscript>5</subscript></entry>
1565 <entry>u<subscript>4</subscript></entry>
1566 <entry>u<subscript>3</subscript></entry>
1567 <entry>u<subscript>2</subscript></entry>
1568 <entry>u<subscript>1</subscript></entry>
1569 <entry>u<subscript>0</subscript></entry>
1570 </row>
1571 <row id="V4L2-MBUS-FMT-UYVY8-2X8">
1572 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry>
1573 <entry>0x2006</entry>
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>
1583 <entry>-</entry>
1584 <entry>-</entry>
1585 <entry>-</entry>
1586 <entry>-</entry>
1587 <entry>u<subscript>7</subscript></entry>
1588 <entry>u<subscript>6</subscript></entry>
1589 <entry>u<subscript>5</subscript></entry>
1590 <entry>u<subscript>4</subscript></entry>
1591 <entry>u<subscript>3</subscript></entry>
1592 <entry>u<subscript>2</subscript></entry>
1593 <entry>u<subscript>1</subscript></entry>
1594 <entry>u<subscript>0</subscript></entry>
1595 </row>
1596 <row>
1597 <entry></entry>
1598 <entry></entry>
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>
1608 <entry>-</entry>
1609 <entry>-</entry>
1610 <entry>-</entry>
1611 <entry>-</entry>
1612 <entry>y<subscript>7</subscript></entry>
1613 <entry>y<subscript>6</subscript></entry>
1614 <entry>y<subscript>5</subscript></entry>
1615 <entry>y<subscript>4</subscript></entry>
1616 <entry>y<subscript>3</subscript></entry>
1617 <entry>y<subscript>2</subscript></entry>
1618 <entry>y<subscript>1</subscript></entry>
1619 <entry>y<subscript>0</subscript></entry>
1620 </row>
1621 <row>
1622 <entry></entry>
1623 <entry></entry>
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>
1633 <entry>-</entry>
1634 <entry>-</entry>
1635 <entry>-</entry>
1636 <entry>-</entry>
1637 <entry>v<subscript>7</subscript></entry>
1638 <entry>v<subscript>6</subscript></entry>
1639 <entry>v<subscript>5</subscript></entry>
1640 <entry>v<subscript>4</subscript></entry>
1641 <entry>v<subscript>3</subscript></entry>
1642 <entry>v<subscript>2</subscript></entry>
1643 <entry>v<subscript>1</subscript></entry>
1644 <entry>v<subscript>0</subscript></entry>
1645 </row>
1646 <row>
1647 <entry></entry>
1648 <entry></entry>
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>
1658 <entry>-</entry>
1659 <entry>-</entry>
1660 <entry>-</entry>
1661 <entry>-</entry>
1662 <entry>y<subscript>7</subscript></entry>
1663 <entry>y<subscript>6</subscript></entry>
1664 <entry>y<subscript>5</subscript></entry>
1665 <entry>y<subscript>4</subscript></entry>
1666 <entry>y<subscript>3</subscript></entry>
1667 <entry>y<subscript>2</subscript></entry>
1668 <entry>y<subscript>1</subscript></entry>
1669 <entry>y<subscript>0</subscript></entry>
1670 </row>
1671 <row id="V4L2-MBUS-FMT-VYUY8-2X8">
1672 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry>
1673 <entry>0x2007</entry>
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>
1683 <entry>-</entry>
1684 <entry>-</entry>
1685 <entry>-</entry>
1686 <entry>-</entry>
1687 <entry>v<subscript>7</subscript></entry>
1688 <entry>v<subscript>6</subscript></entry>
1689 <entry>v<subscript>5</subscript></entry>
1690 <entry>v<subscript>4</subscript></entry>
1691 <entry>v<subscript>3</subscript></entry>
1692 <entry>v<subscript>2</subscript></entry>
1693 <entry>v<subscript>1</subscript></entry>
1694 <entry>v<subscript>0</subscript></entry>
1695 </row>
1696 <row>
1697 <entry></entry>
1698 <entry></entry>
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>
1708 <entry>-</entry>
1709 <entry>-</entry>
1710 <entry>-</entry>
1711 <entry>-</entry>
1712 <entry>y<subscript>7</subscript></entry>
1713 <entry>y<subscript>6</subscript></entry>
1714 <entry>y<subscript>5</subscript></entry>
1715 <entry>y<subscript>4</subscript></entry>
1716 <entry>y<subscript>3</subscript></entry>
1717 <entry>y<subscript>2</subscript></entry>
1718 <entry>y<subscript>1</subscript></entry>
1719 <entry>y<subscript>0</subscript></entry>
1720 </row>
1721 <row>
1722 <entry></entry>
1723 <entry></entry>
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>
1733 <entry>-</entry>
1734 <entry>-</entry>
1735 <entry>-</entry>
1736 <entry>-</entry>
1737 <entry>u<subscript>7</subscript></entry>
1738 <entry>u<subscript>6</subscript></entry>
1739 <entry>u<subscript>5</subscript></entry>
1740 <entry>u<subscript>4</subscript></entry>
1741 <entry>u<subscript>3</subscript></entry>
1742 <entry>u<subscript>2</subscript></entry>
1743 <entry>u<subscript>1</subscript></entry>
1744 <entry>u<subscript>0</subscript></entry>
1745 </row>
1746 <row>
1747 <entry></entry>
1748 <entry></entry>
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>
1758 <entry>-</entry>
1759 <entry>-</entry>
1760 <entry>-</entry>
1761 <entry>-</entry>
1762 <entry>y<subscript>7</subscript></entry>
1763 <entry>y<subscript>6</subscript></entry>
1764 <entry>y<subscript>5</subscript></entry>
1765 <entry>y<subscript>4</subscript></entry>
1766 <entry>y<subscript>3</subscript></entry>
1767 <entry>y<subscript>2</subscript></entry>
1768 <entry>y<subscript>1</subscript></entry>
1769 <entry>y<subscript>0</subscript></entry>
1770 </row>
1771 <row id="V4L2-MBUS-FMT-YUYV8-2X8">
1772 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry>
1773 <entry>0x2008</entry>
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>
1783 <entry>-</entry>
1784 <entry>-</entry>
1785 <entry>-</entry>
1786 <entry>-</entry>
1787 <entry>y<subscript>7</subscript></entry>
1788 <entry>y<subscript>6</subscript></entry>
1789 <entry>y<subscript>5</subscript></entry>
1790 <entry>y<subscript>4</subscript></entry>
1791 <entry>y<subscript>3</subscript></entry>
1792 <entry>y<subscript>2</subscript></entry>
1793 <entry>y<subscript>1</subscript></entry>
1794 <entry>y<subscript>0</subscript></entry>
1795 </row>
1796 <row>
1797 <entry></entry>
1798 <entry></entry>
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>
1808 <entry>-</entry>
1809 <entry>-</entry>
1810 <entry>-</entry>
1811 <entry>-</entry>
1812 <entry>u<subscript>7</subscript></entry>
1813 <entry>u<subscript>6</subscript></entry>
1814 <entry>u<subscript>5</subscript></entry>
1815 <entry>u<subscript>4</subscript></entry>
1816 <entry>u<subscript>3</subscript></entry>
1817 <entry>u<subscript>2</subscript></entry>
1818 <entry>u<subscript>1</subscript></entry>
1819 <entry>u<subscript>0</subscript></entry>
1820 </row>
1821 <row>
1822 <entry></entry>
1823 <entry></entry>
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>
1833 <entry>-</entry>
1834 <entry>-</entry>
1835 <entry>-</entry>
1836 <entry>-</entry>
1837 <entry>y<subscript>7</subscript></entry>
1838 <entry>y<subscript>6</subscript></entry>
1839 <entry>y<subscript>5</subscript></entry>
1840 <entry>y<subscript>4</subscript></entry>
1841 <entry>y<subscript>3</subscript></entry>
1842 <entry>y<subscript>2</subscript></entry>
1843 <entry>y<subscript>1</subscript></entry>
1844 <entry>y<subscript>0</subscript></entry>
1845 </row>
1846 <row>
1847 <entry></entry>
1848 <entry></entry>
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>
1858 <entry>-</entry>
1859 <entry>-</entry>
1860 <entry>-</entry>
1861 <entry>-</entry>
1862 <entry>v<subscript>7</subscript></entry>
1863 <entry>v<subscript>6</subscript></entry>
1864 <entry>v<subscript>5</subscript></entry>
1865 <entry>v<subscript>4</subscript></entry>
1866 <entry>v<subscript>3</subscript></entry>
1867 <entry>v<subscript>2</subscript></entry>
1868 <entry>v<subscript>1</subscript></entry>
1869 <entry>v<subscript>0</subscript></entry>
1870 </row>
1871 <row id="V4L2-MBUS-FMT-YVYU8-2X8">
1872 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry>
1873 <entry>0x2009</entry>
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>
1883 <entry>-</entry>
1884 <entry>-</entry>
1885 <entry>-</entry>
1886 <entry>-</entry>
1887 <entry>y<subscript>7</subscript></entry>
1888 <entry>y<subscript>6</subscript></entry>
1889 <entry>y<subscript>5</subscript></entry>
1890 <entry>y<subscript>4</subscript></entry>
1891 <entry>y<subscript>3</subscript></entry>
1892 <entry>y<subscript>2</subscript></entry>
1893 <entry>y<subscript>1</subscript></entry>
1894 <entry>y<subscript>0</subscript></entry>
1895 </row>
1896 <row>
1897 <entry></entry>
1898 <entry></entry>
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>
1908 <entry>-</entry>
1909 <entry>-</entry>
1910 <entry>-</entry>
1911 <entry>-</entry>
1912 <entry>v<subscript>7</subscript></entry>
1913 <entry>v<subscript>6</subscript></entry>
1914 <entry>v<subscript>5</subscript></entry>
1915 <entry>v<subscript>4</subscript></entry>
1916 <entry>v<subscript>3</subscript></entry>
1917 <entry>v<subscript>2</subscript></entry>
1918 <entry>v<subscript>1</subscript></entry>
1919 <entry>v<subscript>0</subscript></entry>
1920 </row>
1921 <row>
1922 <entry></entry>
1923 <entry></entry>
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>
1933 <entry>-</entry>
1934 <entry>-</entry>
1935 <entry>-</entry>
1936 <entry>-</entry>
1937 <entry>y<subscript>7</subscript></entry>
1938 <entry>y<subscript>6</subscript></entry>
1939 <entry>y<subscript>5</subscript></entry>
1940 <entry>y<subscript>4</subscript></entry>
1941 <entry>y<subscript>3</subscript></entry>
1942 <entry>y<subscript>2</subscript></entry>
1943 <entry>y<subscript>1</subscript></entry>
1944 <entry>y<subscript>0</subscript></entry>
1945 </row>
1946 <row>
1947 <entry></entry>
1948 <entry></entry>
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>
1958 <entry>-</entry>
1959 <entry>-</entry>
1960 <entry>-</entry>
1961 <entry>-</entry>
1962 <entry>u<subscript>7</subscript></entry>
1963 <entry>u<subscript>6</subscript></entry>
1964 <entry>u<subscript>5</subscript></entry>
1965 <entry>u<subscript>4</subscript></entry>
1966 <entry>u<subscript>3</subscript></entry>
1967 <entry>u<subscript>2</subscript></entry>
1968 <entry>u<subscript>1</subscript></entry>
1969 <entry>u<subscript>0</subscript></entry>
1970 </row>
1971 <row id="V4L2-MBUS-FMT-Y10-1X10">
1972 <entry>V4L2_MBUS_FMT_Y10_1X10</entry>
1973 <entry>0x200a</entry>
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>-</entry>
1983 <entry>-</entry>
1984 <entry>-</entry>
1985 <entry>y<subscript>9</subscript></entry>
1986 <entry>y<subscript>8</subscript></entry>
1987 <entry>y<subscript>7</subscript></entry>
1988 <entry>y<subscript>6</subscript></entry>
1989 <entry>y<subscript>5</subscript></entry>
1990 <entry>y<subscript>4</subscript></entry>
1991 <entry>y<subscript>3</subscript></entry>
1992 <entry>y<subscript>2</subscript></entry>
1993 <entry>y<subscript>1</subscript></entry>
1994 <entry>y<subscript>0</subscript></entry>
1995 </row>
1996 <row id="V4L2-MBUS-FMT-YUYV10-2X10">
1997 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry>
1998 <entry>0x200b</entry>
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>-</entry>
2008 <entry>-</entry>
2009 <entry>-</entry>
2010 <entry>y<subscript>9</subscript></entry>
2011 <entry>y<subscript>8</subscript></entry>
2012 <entry>y<subscript>7</subscript></entry>
2013 <entry>y<subscript>6</subscript></entry>
2014 <entry>y<subscript>5</subscript></entry>
2015 <entry>y<subscript>4</subscript></entry>
2016 <entry>y<subscript>3</subscript></entry>
2017 <entry>y<subscript>2</subscript></entry>
2018 <entry>y<subscript>1</subscript></entry>
2019 <entry>y<subscript>0</subscript></entry>
2020 </row>
2021 <row>
2022 <entry></entry>
2023 <entry></entry>
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>-</entry>
2033 <entry>-</entry>
2034 <entry>-</entry>
2035 <entry>u<subscript>9</subscript></entry>
2036 <entry>u<subscript>8</subscript></entry>
2037 <entry>u<subscript>7</subscript></entry>
2038 <entry>u<subscript>6</subscript></entry>
2039 <entry>u<subscript>5</subscript></entry>
2040 <entry>u<subscript>4</subscript></entry>
2041 <entry>u<subscript>3</subscript></entry>
2042 <entry>u<subscript>2</subscript></entry>
2043 <entry>u<subscript>1</subscript></entry>
2044 <entry>u<subscript>0</subscript></entry>
2045 </row>
2046 <row>
2047 <entry></entry>
2048 <entry></entry>
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>-</entry>
2058 <entry>-</entry>
2059 <entry>-</entry>
2060 <entry>y<subscript>9</subscript></entry>
2061 <entry>y<subscript>8</subscript></entry>
2062 <entry>y<subscript>7</subscript></entry>
2063 <entry>y<subscript>6</subscript></entry>
2064 <entry>y<subscript>5</subscript></entry>
2065 <entry>y<subscript>4</subscript></entry>
2066 <entry>y<subscript>3</subscript></entry>
2067 <entry>y<subscript>2</subscript></entry>
2068 <entry>y<subscript>1</subscript></entry>
2069 <entry>y<subscript>0</subscript></entry>
2070 </row>
2071 <row>
2072 <entry></entry>
2073 <entry></entry>
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>-</entry>
2083 <entry>-</entry>
2084 <entry>-</entry>
2085 <entry>v<subscript>9</subscript></entry>
2086 <entry>v<subscript>8</subscript></entry>
2087 <entry>v<subscript>7</subscript></entry>
2088 <entry>v<subscript>6</subscript></entry>
2089 <entry>v<subscript>5</subscript></entry>
2090 <entry>v<subscript>4</subscript></entry>
2091 <entry>v<subscript>3</subscript></entry>
2092 <entry>v<subscript>2</subscript></entry>
2093 <entry>v<subscript>1</subscript></entry>
2094 <entry>v<subscript>0</subscript></entry>
2095 </row>
2096 <row id="V4L2-MBUS-FMT-YVYU10-2X10">
2097 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry>
2098 <entry>0x200c</entry>
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>-</entry>
2108 <entry>-</entry>
2109 <entry>-</entry>
2110 <entry>y<subscript>9</subscript></entry>
2111 <entry>y<subscript>8</subscript></entry>
2112 <entry>y<subscript>7</subscript></entry>
2113 <entry>y<subscript>6</subscript></entry>
2114 <entry>y<subscript>5</subscript></entry>
2115 <entry>y<subscript>4</subscript></entry>
2116 <entry>y<subscript>3</subscript></entry>
2117 <entry>y<subscript>2</subscript></entry>
2118 <entry>y<subscript>1</subscript></entry>
2119 <entry>y<subscript>0</subscript></entry>
2120 </row>
2121 <row>
2122 <entry></entry>
2123 <entry></entry>
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>-</entry>
2133 <entry>-</entry>
2134 <entry>-</entry>
2135 <entry>v<subscript>9</subscript></entry>
2136 <entry>v<subscript>8</subscript></entry>
2137 <entry>v<subscript>7</subscript></entry>
2138 <entry>v<subscript>6</subscript></entry>
2139 <entry>v<subscript>5</subscript></entry>
2140 <entry>v<subscript>4</subscript></entry>
2141 <entry>v<subscript>3</subscript></entry>
2142 <entry>v<subscript>2</subscript></entry>
2143 <entry>v<subscript>1</subscript></entry>
2144 <entry>v<subscript>0</subscript></entry>
2145 </row>
2146 <row>
2147 <entry></entry>
2148 <entry></entry>
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>-</entry>
2158 <entry>-</entry>
2159 <entry>-</entry>
2160 <entry>y<subscript>9</subscript></entry>
2161 <entry>y<subscript>8</subscript></entry>
2162 <entry>y<subscript>7</subscript></entry>
2163 <entry>y<subscript>6</subscript></entry>
2164 <entry>y<subscript>5</subscript></entry>
2165 <entry>y<subscript>4</subscript></entry>
2166 <entry>y<subscript>3</subscript></entry>
2167 <entry>y<subscript>2</subscript></entry>
2168 <entry>y<subscript>1</subscript></entry>
2169 <entry>y<subscript>0</subscript></entry>
2170 </row>
2171 <row>
2172 <entry></entry>
2173 <entry></entry>
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>-</entry>
2183 <entry>-</entry>
2184 <entry>-</entry>
2185 <entry>u<subscript>9</subscript></entry>
2186 <entry>u<subscript>8</subscript></entry>
2187 <entry>u<subscript>7</subscript></entry>
2188 <entry>u<subscript>6</subscript></entry>
2189 <entry>u<subscript>5</subscript></entry>
2190 <entry>u<subscript>4</subscript></entry>
2191 <entry>u<subscript>3</subscript></entry>
2192 <entry>u<subscript>2</subscript></entry>
2193 <entry>u<subscript>1</subscript></entry>
2194 <entry>u<subscript>0</subscript></entry>
2195 </row>
2196 <row id="V4L2-MBUS-FMT-Y12-1X12">
2197 <entry>V4L2_MBUS_FMT_Y12_1X12</entry>
2198 <entry>0x2013</entry>
2199 <entry></entry>
2200 <entry>-</entry>
2201 <entry>-</entry>
2202 <entry>-</entry>
2203 <entry>-</entry>
2204 <entry>-</entry>
2205 <entry>-</entry>
2206 <entry>-</entry>
2207 <entry>-</entry>
2208 <entry>y<subscript>11</subscript></entry>
2209 <entry>y<subscript>10</subscript></entry>
2210 <entry>y<subscript>9</subscript></entry>
2211 <entry>y<subscript>8</subscript></entry>
2212 <entry>y<subscript>7</subscript></entry>
2213 <entry>y<subscript>6</subscript></entry>
2214 <entry>y<subscript>5</subscript></entry>
2215 <entry>y<subscript>4</subscript></entry>
2216 <entry>y<subscript>3</subscript></entry>
2217 <entry>y<subscript>2</subscript></entry>
2218 <entry>y<subscript>1</subscript></entry>
2219 <entry>y<subscript>0</subscript></entry>
2220 </row>
2221 <row id="V4L2-MBUS-FMT-UYVY8-1X16">
2222 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry>
2223 <entry>0x200f</entry>
2224 <entry></entry>
2225 <entry>-</entry>
2226 <entry>-</entry>
2227 <entry>-</entry>
2228 <entry>-</entry>
2229 <entry>u<subscript>7</subscript></entry>
2230 <entry>u<subscript>6</subscript></entry>
2231 <entry>u<subscript>5</subscript></entry>
2232 <entry>u<subscript>4</subscript></entry>
2233 <entry>u<subscript>3</subscript></entry>
2234 <entry>u<subscript>2</subscript></entry>
2235 <entry>u<subscript>1</subscript></entry>
2236 <entry>u<subscript>0</subscript></entry>
2237 <entry>y<subscript>7</subscript></entry>
2238 <entry>y<subscript>6</subscript></entry>
2239 <entry>y<subscript>5</subscript></entry>
2240 <entry>y<subscript>4</subscript></entry>
2241 <entry>y<subscript>3</subscript></entry>
2242 <entry>y<subscript>2</subscript></entry>
2243 <entry>y<subscript>1</subscript></entry>
2244 <entry>y<subscript>0</subscript></entry>
2245 </row>
2246 <row>
2247 <entry></entry>
2248 <entry></entry>
2249 <entry></entry>
2250 <entry>-</entry>
2251 <entry>-</entry>
2252 <entry>-</entry>
2253 <entry>-</entry>
2254 <entry>v<subscript>7</subscript></entry>
2255 <entry>v<subscript>6</subscript></entry>
2256 <entry>v<subscript>5</subscript></entry>
2257 <entry>v<subscript>4</subscript></entry>
2258 <entry>v<subscript>3</subscript></entry>
2259 <entry>v<subscript>2</subscript></entry>
2260 <entry>v<subscript>1</subscript></entry>
2261 <entry>v<subscript>0</subscript></entry>
2262 <entry>y<subscript>7</subscript></entry>
2263 <entry>y<subscript>6</subscript></entry>
2264 <entry>y<subscript>5</subscript></entry>
2265 <entry>y<subscript>4</subscript></entry>
2266 <entry>y<subscript>3</subscript></entry>
2267 <entry>y<subscript>2</subscript></entry>
2268 <entry>y<subscript>1</subscript></entry>
2269 <entry>y<subscript>0</subscript></entry>
2270 </row>
2271 <row id="V4L2-MBUS-FMT-VYUY8-1X16">
2272 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry>
2273 <entry>0x2010</entry>
2274 <entry></entry>
2275 <entry>-</entry>
2276 <entry>-</entry>
2277 <entry>-</entry>
2278 <entry>-</entry>
2279 <entry>v<subscript>7</subscript></entry>
2280 <entry>v<subscript>6</subscript></entry>
2281 <entry>v<subscript>5</subscript></entry>
2282 <entry>v<subscript>4</subscript></entry>
2283 <entry>v<subscript>3</subscript></entry>
2284 <entry>v<subscript>2</subscript></entry>
2285 <entry>v<subscript>1</subscript></entry>
2286 <entry>v<subscript>0</subscript></entry>
2287 <entry>y<subscript>7</subscript></entry>
2288 <entry>y<subscript>6</subscript></entry>
2289 <entry>y<subscript>5</subscript></entry>
2290 <entry>y<subscript>4</subscript></entry>
2291 <entry>y<subscript>3</subscript></entry>
2292 <entry>y<subscript>2</subscript></entry>
2293 <entry>y<subscript>1</subscript></entry>
2294 <entry>y<subscript>0</subscript></entry>
2295 </row>
2296 <row>
2297 <entry></entry>
2298 <entry></entry>
2299 <entry></entry>
2300 <entry>-</entry>
2301 <entry>-</entry>
2302 <entry>-</entry>
2303 <entry>-</entry>
2304 <entry>u<subscript>7</subscript></entry>
2305 <entry>u<subscript>6</subscript></entry>
2306 <entry>u<subscript>5</subscript></entry>
2307 <entry>u<subscript>4</subscript></entry>
2308 <entry>u<subscript>3</subscript></entry>
2309 <entry>u<subscript>2</subscript></entry>
2310 <entry>u<subscript>1</subscript></entry>
2311 <entry>u<subscript>0</subscript></entry>
2312 <entry>y<subscript>7</subscript></entry>
2313 <entry>y<subscript>6</subscript></entry>
2314 <entry>y<subscript>5</subscript></entry>
2315 <entry>y<subscript>4</subscript></entry>
2316 <entry>y<subscript>3</subscript></entry>
2317 <entry>y<subscript>2</subscript></entry>
2318 <entry>y<subscript>1</subscript></entry>
2319 <entry>y<subscript>0</subscript></entry>
2320 </row>
2321 <row id="V4L2-MBUS-FMT-YUYV8-1X16">
2322 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry>
2323 <entry>0x2011</entry>
2324 <entry></entry>
2325 <entry>-</entry>
2326 <entry>-</entry>
2327 <entry>-</entry>
2328 <entry>-</entry>
2329 <entry>y<subscript>7</subscript></entry>
2330 <entry>y<subscript>6</subscript></entry>
2331 <entry>y<subscript>5</subscript></entry>
2332 <entry>y<subscript>4</subscript></entry>
2333 <entry>y<subscript>3</subscript></entry>
2334 <entry>y<subscript>2</subscript></entry>
2335 <entry>y<subscript>1</subscript></entry>
2336 <entry>y<subscript>0</subscript></entry>
2337 <entry>u<subscript>7</subscript></entry>
2338 <entry>u<subscript>6</subscript></entry>
2339 <entry>u<subscript>5</subscript></entry>
2340 <entry>u<subscript>4</subscript></entry>
2341 <entry>u<subscript>3</subscript></entry>
2342 <entry>u<subscript>2</subscript></entry>
2343 <entry>u<subscript>1</subscript></entry>
2344 <entry>u<subscript>0</subscript></entry>
2345 </row>
2346 <row>
2347 <entry></entry>
2348 <entry></entry>
2349 <entry></entry>
2350 <entry>-</entry>
2351 <entry>-</entry>
2352 <entry>-</entry>
2353 <entry>-</entry>
2354 <entry>y<subscript>7</subscript></entry>
2355 <entry>y<subscript>6</subscript></entry>
2356 <entry>y<subscript>5</subscript></entry>
2357 <entry>y<subscript>4</subscript></entry>
2358 <entry>y<subscript>3</subscript></entry>
2359 <entry>y<subscript>2</subscript></entry>
2360 <entry>y<subscript>1</subscript></entry>
2361 <entry>y<subscript>0</subscript></entry>
2362 <entry>v<subscript>7</subscript></entry>
2363 <entry>v<subscript>6</subscript></entry>
2364 <entry>v<subscript>5</subscript></entry>
2365 <entry>v<subscript>4</subscript></entry>
2366 <entry>v<subscript>3</subscript></entry>
2367 <entry>v<subscript>2</subscript></entry>
2368 <entry>v<subscript>1</subscript></entry>
2369 <entry>v<subscript>0</subscript></entry>
2370 </row>
2371 <row id="V4L2-MBUS-FMT-YVYU8-1X16">
2372 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry>
2373 <entry>0x2012</entry>
2374 <entry></entry>
2375 <entry>-</entry>
2376 <entry>-</entry>
2377 <entry>-</entry>
2378 <entry>-</entry>
2379 <entry>y<subscript>7</subscript></entry>
2380 <entry>y<subscript>6</subscript></entry>
2381 <entry>y<subscript>5</subscript></entry>
2382 <entry>y<subscript>4</subscript></entry>
2383 <entry>y<subscript>3</subscript></entry>
2384 <entry>y<subscript>2</subscript></entry>
2385 <entry>y<subscript>1</subscript></entry>
2386 <entry>y<subscript>0</subscript></entry>
2387 <entry>v<subscript>7</subscript></entry>
2388 <entry>v<subscript>6</subscript></entry>
2389 <entry>v<subscript>5</subscript></entry>
2390 <entry>v<subscript>4</subscript></entry>
2391 <entry>v<subscript>3</subscript></entry>
2392 <entry>v<subscript>2</subscript></entry>
2393 <entry>v<subscript>1</subscript></entry>
2394 <entry>v<subscript>0</subscript></entry>
2395 </row>
2396 <row>
2397 <entry></entry>
2398 <entry></entry>
2399 <entry></entry>
2400 <entry>-</entry>
2401 <entry>-</entry>
2402 <entry>-</entry>
2403 <entry>-</entry>
2404 <entry>y<subscript>7</subscript></entry>
2405 <entry>y<subscript>6</subscript></entry>
2406 <entry>y<subscript>5</subscript></entry>
2407 <entry>y<subscript>4</subscript></entry>
2408 <entry>y<subscript>3</subscript></entry>
2409 <entry>y<subscript>2</subscript></entry>
2410 <entry>y<subscript>1</subscript></entry>
2411 <entry>y<subscript>0</subscript></entry>
2412 <entry>u<subscript>7</subscript></entry>
2413 <entry>u<subscript>6</subscript></entry>
2414 <entry>u<subscript>5</subscript></entry>
2415 <entry>u<subscript>4</subscript></entry>
2416 <entry>u<subscript>3</subscript></entry>
2417 <entry>u<subscript>2</subscript></entry>
2418 <entry>u<subscript>1</subscript></entry>
2419 <entry>u<subscript>0</subscript></entry>
2420 </row>
2421 <row id="V4L2-MBUS-FMT-YUYV10-1X20">
2422 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry>
2423 <entry>0x200d</entry>
2424 <entry></entry>
2425 <entry>y<subscript>9</subscript></entry>
2426 <entry>y<subscript>8</subscript></entry>
2427 <entry>y<subscript>7</subscript></entry>
2428 <entry>y<subscript>6</subscript></entry>
2429 <entry>y<subscript>5</subscript></entry>
2430 <entry>y<subscript>4</subscript></entry>
2431 <entry>y<subscript>3</subscript></entry>
2432 <entry>y<subscript>2</subscript></entry>
2433 <entry>y<subscript>1</subscript></entry>
2434 <entry>y<subscript>0</subscript></entry>
2435 <entry>u<subscript>9</subscript></entry>
2436 <entry>u<subscript>8</subscript></entry>
2437 <entry>u<subscript>7</subscript></entry>
2438 <entry>u<subscript>6</subscript></entry>
2439 <entry>u<subscript>5</subscript></entry>
2440 <entry>u<subscript>4</subscript></entry>
2441 <entry>u<subscript>3</subscript></entry>
2442 <entry>u<subscript>2</subscript></entry>
2443 <entry>u<subscript>1</subscript></entry>
2444 <entry>u<subscript>0</subscript></entry>
2445 </row>
2446 <row>
2447 <entry></entry>
2448 <entry></entry>
2449 <entry></entry>
2450 <entry>y<subscript>9</subscript></entry>
2451 <entry>y<subscript>8</subscript></entry>
2452 <entry>y<subscript>7</subscript></entry>
2453 <entry>y<subscript>6</subscript></entry>
2454 <entry>y<subscript>5</subscript></entry>
2455 <entry>y<subscript>4</subscript></entry>
2456 <entry>y<subscript>3</subscript></entry>
2457 <entry>y<subscript>2</subscript></entry>
2458 <entry>y<subscript>1</subscript></entry>
2459 <entry>y<subscript>0</subscript></entry>
2460 <entry>v<subscript>9</subscript></entry>
2461 <entry>v<subscript>8</subscript></entry>
2462 <entry>v<subscript>7</subscript></entry>
2463 <entry>v<subscript>6</subscript></entry>
2464 <entry>v<subscript>5</subscript></entry>
2465 <entry>v<subscript>4</subscript></entry>
2466 <entry>v<subscript>3</subscript></entry>
2467 <entry>v<subscript>2</subscript></entry>
2468 <entry>v<subscript>1</subscript></entry>
2469 <entry>v<subscript>0</subscript></entry>
2470 </row>
2471 <row id="V4L2-MBUS-FMT-YVYU10-1X20">
2472 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry>
2473 <entry>0x200e</entry>
2474 <entry></entry>
2475 <entry>y<subscript>9</subscript></entry>
2476 <entry>y<subscript>8</subscript></entry>
2477 <entry>y<subscript>7</subscript></entry>
2478 <entry>y<subscript>6</subscript></entry>
2479 <entry>y<subscript>5</subscript></entry>
2480 <entry>y<subscript>4</subscript></entry>
2481 <entry>y<subscript>3</subscript></entry>
2482 <entry>y<subscript>2</subscript></entry>
2483 <entry>y<subscript>1</subscript></entry>
2484 <entry>y<subscript>0</subscript></entry>
2485 <entry>v<subscript>9</subscript></entry>
2486 <entry>v<subscript>8</subscript></entry>
2487 <entry>v<subscript>7</subscript></entry>
2488 <entry>v<subscript>6</subscript></entry>
2489 <entry>v<subscript>5</subscript></entry>
2490 <entry>v<subscript>4</subscript></entry>
2491 <entry>v<subscript>3</subscript></entry>
2492 <entry>v<subscript>2</subscript></entry>
2493 <entry>v<subscript>1</subscript></entry>
2494 <entry>v<subscript>0</subscript></entry>
2495 </row>
2496 <row>
2497 <entry></entry>
2498 <entry></entry>
2499 <entry></entry>
2500 <entry>y<subscript>9</subscript></entry>
2501 <entry>y<subscript>8</subscript></entry>
2502 <entry>y<subscript>7</subscript></entry>
2503 <entry>y<subscript>6</subscript></entry>
2504 <entry>y<subscript>5</subscript></entry>
2505 <entry>y<subscript>4</subscript></entry>
2506 <entry>y<subscript>3</subscript></entry>
2507 <entry>y<subscript>2</subscript></entry>
2508 <entry>y<subscript>1</subscript></entry>
2509 <entry>y<subscript>0</subscript></entry>
2510 <entry>u<subscript>9</subscript></entry>
2511 <entry>u<subscript>8</subscript></entry>
2512 <entry>u<subscript>7</subscript></entry>
2513 <entry>u<subscript>6</subscript></entry>
2514 <entry>u<subscript>5</subscript></entry>
2515 <entry>u<subscript>4</subscript></entry>
2516 <entry>u<subscript>3</subscript></entry>
2517 <entry>u<subscript>2</subscript></entry>
2518 <entry>u<subscript>1</subscript></entry>
2519 <entry>u<subscript>0</subscript></entry>
2520 </row>
2521 </tbody>
2522 </tgroup>
2523 </table>
2524 </section>
2525
2526 <section>
2527 <title>JPEG Compressed Formats</title>
2528
2529 <para>Those data formats consist of an ordered sequence of 8-bit bytes
2530 obtained from JPEG compression process. Additionally to the
2531 <constant>_JPEG</constant> prefix the format code is made of
2532 the following information.
2533 <itemizedlist>
2534 <listitem><para>The number of bus samples per entropy encoded byte.</para></listitem>
2535 <listitem><para>The bus width.</para></listitem>
2536 </itemizedlist>
2537 </para>
2538
2539 <para>For instance, for a JPEG baseline process and an 8-bit bus width
2540 the format will be named <constant>V4L2_MBUS_FMT_JPEG_1X8</constant>.
2541 </para>
2542
2543 <para>The following table lists existing JPEG compressed formats.</para>
2544
2545 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-jpeg">
2546 <title>JPEG Formats</title>
2547 <tgroup cols="3">
2548 <colspec colname="id" align="left" />
2549 <colspec colname="code" align="left"/>
2550 <colspec colname="remarks" align="left"/>
2551 <thead>
2552 <row>
2553 <entry>Identifier</entry>
2554 <entry>Code</entry>
2555 <entry>Remarks</entry>
2556 </row>
2557 </thead>
2558 <tbody valign="top">
2559 <row id="V4L2-MBUS-FMT-JPEG-1X8">
2560 <entry>V4L2_MBUS_FMT_JPEG_1X8</entry>
2561 <entry>0x4001</entry>
2562 <entry>Besides of its usage for the parallel bus this format is
2563 recommended for transmission of JPEG data over MIPI CSI bus
2564 using the User Defined 8-bit Data types.
2565 </entry>
2566 </row>
2567 </tbody>
2568 </tgroup>
2569 </table>
2570 </section>
2571 </section>
2572</section>
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml
index 9288af96de3..a7fd76d0dac 100644
--- a/Documentation/DocBook/v4l/v4l2.xml
+++ b/Documentation/DocBook/v4l/v4l2.xml
@@ -85,6 +85,17 @@ Remote Controller chapter.</contrib>
85 </address> 85 </address>
86 </affiliation> 86 </affiliation>
87 </author> 87 </author>
88
89 <author>
90 <firstname>Pawel</firstname>
91 <surname>Osciak</surname>
92 <contrib>Designed and documented the multi-planar API.</contrib>
93 <affiliation>
94 <address>
95 <email>pawel AT osciak.com</email>
96 </address>
97 </affiliation>
98 </author>
88 </authorgroup> 99 </authorgroup>
89 100
90 <copyright> 101 <copyright>
@@ -102,7 +113,8 @@ Remote Controller chapter.</contrib>
102 <year>2010</year> 113 <year>2010</year>
103 <year>2011</year> 114 <year>2011</year>
104 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin 115 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
105Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> 116Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117 Pawel Osciak</holder>
106 </copyright> 118 </copyright>
107 <legalnotice> 119 <legalnotice>
108 <para>Except when explicitly stated as GPL, programming examples within 120 <para>Except when explicitly stated as GPL, programming examples within
@@ -116,6 +128,13 @@ structs, ioctls) must be noted in more detail in the history chapter
116applications. --> 128applications. -->
117 129
118 <revision> 130 <revision>
131 <revnumber>2.6.39</revnumber>
132 <date>2011-03-01</date>
133 <authorinitials>mcc, po</authorinitials>
134 <revremark>Removed VIDIOC_*_OLD from videodev2.h header and update it to reflect latest changes. Added the <link linkend="planar-apis">multi-planar API</link>.</revremark>
135 </revision>
136
137 <revision>
119 <revnumber>2.6.37</revnumber> 138 <revnumber>2.6.37</revnumber>
120 <date>2010-08-06</date> 139 <date>2010-08-06</date>
121 <authorinitials>hv</authorinitials> 140 <authorinitials>hv</authorinitials>
@@ -382,7 +401,7 @@ and discussions on the V4L mailing list.</revremark>
382</partinfo> 401</partinfo>
383 402
384<title>Video for Linux Two API Specification</title> 403<title>Video for Linux Two API Specification</title>
385 <subtitle>Revision 2.6.38</subtitle> 404 <subtitle>Revision 2.6.39</subtitle>
386 405
387 <chapter id="common"> 406 <chapter id="common">
388 &sub-common; 407 &sub-common;
@@ -411,6 +430,7 @@ and discussions on the V4L mailing list.</revremark>
411 <section id="radio"> &sub-dev-radio; </section> 430 <section id="radio"> &sub-dev-radio; </section>
412 <section id="rds"> &sub-dev-rds; </section> 431 <section id="rds"> &sub-dev-rds; </section>
413 <section id="event"> &sub-dev-event; </section> 432 <section id="event"> &sub-dev-event; </section>
433 <section id="subdev"> &sub-dev-subdev; </section>
414 </chapter> 434 </chapter>
415 435
416 <chapter id="driver"> 436 <chapter id="driver">
@@ -478,6 +498,12 @@ and discussions on the V4L mailing list.</revremark>
478 &sub-reqbufs; 498 &sub-reqbufs;
479 &sub-s-hw-freq-seek; 499 &sub-s-hw-freq-seek;
480 &sub-streamon; 500 &sub-streamon;
501 &sub-subdev-enum-frame-interval;
502 &sub-subdev-enum-frame-size;
503 &sub-subdev-enum-mbus-code;
504 &sub-subdev-g-crop;
505 &sub-subdev-g-fmt;
506 &sub-subdev-g-frame-interval;
481 &sub-subscribe-event; 507 &sub-subscribe-event;
482 <!-- End of ioctls. --> 508 <!-- End of ioctls. -->
483 &sub-mmap; 509 &sub-mmap;
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 325b23b6964..c50536a4f59 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -71,6 +71,7 @@
71 * Moved from videodev.h 71 * Moved from videodev.h
72 */ 72 */
73#define VIDEO_MAX_FRAME 32 73#define VIDEO_MAX_FRAME 32
74#define VIDEO_MAX_PLANES 8
74 75
75#ifndef __KERNEL__ 76#ifndef __KERNEL__
76 77
@@ -158,9 +159,23 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> {
158 /* Experimental */ 159 /* Experimental */
159 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, 160 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
160#endif 161#endif
162 V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
163 V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
161 V4L2_BUF_TYPE_PRIVATE = 0x80, 164 V4L2_BUF_TYPE_PRIVATE = 0x80,
162}; 165};
163 166
167#define V4L2_TYPE_IS_MULTIPLANAR(type) \
168 ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
169 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
170
171#define V4L2_TYPE_IS_OUTPUT(type) \
172 ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
173 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
174 || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
175 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
176 || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
177 || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)
178
164enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { 179enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> {
165 V4L2_TUNER_RADIO = 1, 180 V4L2_TUNER_RADIO = 1,
166 V4L2_TUNER_ANALOG_TV = 2, 181 V4L2_TUNER_ANALOG_TV = 2,
@@ -246,6 +261,11 @@ struct <link linkend="v4l2-capability">v4l2_capability</link> {
246#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ 261#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
247#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ 262#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
248 263
264/* Is a video capture device that supports multiplanar formats */
265#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
266/* Is a video output device that supports multiplanar formats */
267#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
268
249#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ 269#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
250#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ 270#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
251#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ 271#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
@@ -291,6 +311,9 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
291#define <link linkend="V4L2-PIX-FMT-Y10">V4L2_PIX_FMT_Y10</link> v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ 311#define <link linkend="V4L2-PIX-FMT-Y10">V4L2_PIX_FMT_Y10</link> v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
292#define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ 312#define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
293 313
314/* Grey bit-packed formats */
315#define <link linkend="V4L2-PIX-FMT-Y10BPACK">V4L2_PIX_FMT_Y10BPACK</link> v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */
316
294/* Palette formats */ 317/* Palette formats */
295#define <link linkend="V4L2-PIX-FMT-PAL8">V4L2_PIX_FMT_PAL8</link> v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ 318#define <link linkend="V4L2-PIX-FMT-PAL8">V4L2_PIX_FMT_PAL8</link> v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
296 319
@@ -313,6 +336,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
313#define <link linkend="V4L2-PIX-FMT-YUV420">V4L2_PIX_FMT_YUV420</link> v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ 336#define <link linkend="V4L2-PIX-FMT-YUV420">V4L2_PIX_FMT_YUV420</link> v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
314#define <link linkend="V4L2-PIX-FMT-HI240">V4L2_PIX_FMT_HI240</link> v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ 337#define <link linkend="V4L2-PIX-FMT-HI240">V4L2_PIX_FMT_HI240</link> v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
315#define <link linkend="V4L2-PIX-FMT-HM12">V4L2_PIX_FMT_HM12</link> v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ 338#define <link linkend="V4L2-PIX-FMT-HM12">V4L2_PIX_FMT_HM12</link> v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
339#define <link linkend="V4L2-PIX-FMT-M420">V4L2_PIX_FMT_M420</link> v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */
316 340
317/* two planes -- one Y, one Cr + Cb interleaved */ 341/* two planes -- one Y, one Cr + Cb interleaved */
318#define <link linkend="V4L2-PIX-FMT-NV12">V4L2_PIX_FMT_NV12</link> v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ 342#define <link linkend="V4L2-PIX-FMT-NV12">V4L2_PIX_FMT_NV12</link> v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
@@ -320,6 +344,13 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
320#define <link linkend="V4L2-PIX-FMT-NV16">V4L2_PIX_FMT_NV16</link> v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ 344#define <link linkend="V4L2-PIX-FMT-NV16">V4L2_PIX_FMT_NV16</link> v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
321#define <link linkend="V4L2-PIX-FMT-NV61">V4L2_PIX_FMT_NV61</link> v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ 345#define <link linkend="V4L2-PIX-FMT-NV61">V4L2_PIX_FMT_NV61</link> v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
322 346
347/* two non contiguous planes - one Y, one Cr + Cb interleaved */
348#define <link linkend="V4L2-PIX-FMT-NV12M">V4L2_PIX_FMT_NV12M</link> v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
349#define <link linkend="V4L2-PIX-FMT-NV12MT">V4L2_PIX_FMT_NV12MT</link> v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
350
351/* three non contiguous planes - Y, Cb, Cr */
352#define <link linkend="V4L2-PIX-FMT-YUV420M">V4L2_PIX_FMT_YUV420M</link> v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
353
323/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ 354/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
324#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 355#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
325#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 356#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
@@ -518,6 +549,62 @@ struct <link linkend="v4l2-requestbuffers">v4l2_requestbuffers</link> {
518 __u32 reserved[2]; 549 __u32 reserved[2];
519}; 550};
520 551
552/**
553 * struct <link linkend="v4l2-plane">v4l2_plane</link> - plane info for multi-planar buffers
554 * @bytesused: number of bytes occupied by data in the plane (payload)
555 * @length: size of this plane (NOT the payload) in bytes
556 * @mem_offset: when memory in the associated struct <link linkend="v4l2-buffer">v4l2_buffer</link> is
557 * V4L2_MEMORY_MMAP, equals the offset from the start of
558 * the device memory for this plane (or is a "cookie" that
559 * should be passed to mmap() called on the video node)
560 * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer
561 * pointing to this plane
562 * @data_offset: offset in the plane to the start of data; usually 0,
563 * unless there is a header in front of the data
564 *
565 * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
566 * with two planes can have one plane for Y, and another for interleaved CbCr
567 * components. Each plane can reside in a separate memory buffer, or even in
568 * a completely separate memory node (e.g. in embedded devices).
569 */
570struct <link linkend="v4l2-plane">v4l2_plane</link> {
571 __u32 bytesused;
572 __u32 length;
573 union {
574 __u32 mem_offset;
575 unsigned long userptr;
576 } m;
577 __u32 data_offset;
578 __u32 reserved[11];
579};
580
581/**
582 * struct <link linkend="v4l2-buffer">v4l2_buffer</link> - video buffer info
583 * @index: id number of the buffer
584 * @type: buffer type (type == *_MPLANE for multiplanar buffers)
585 * @bytesused: number of bytes occupied by data in the buffer (payload);
586 * unused (set to 0) for multiplanar buffers
587 * @flags: buffer informational flags
588 * @field: field order of the image in the buffer
589 * @timestamp: frame timestamp
590 * @timecode: frame timecode
591 * @sequence: sequence count of this frame
592 * @memory: the method, in which the actual video data is passed
593 * @offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
594 * offset from the start of the device memory for this plane,
595 * (or a "cookie" that should be passed to mmap() as offset)
596 * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
597 * a userspace pointer pointing to this buffer
598 * @planes: for multiplanar buffers; userspace pointer to the array of plane
599 * info structs for this buffer
600 * @length: size in bytes of the buffer (NOT its payload) for single-plane
601 * buffers (when type != *_MPLANE); number of elements in the
602 * planes array for multi-plane buffers
603 * @input: input number from which the video data has has been captured
604 *
605 * Contains data exchanged by application and driver using one of the Streaming
606 * I/O methods.
607 */
521struct <link linkend="v4l2-buffer">v4l2_buffer</link> { 608struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
522 __u32 index; 609 __u32 index;
523 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type; 610 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type;
@@ -533,6 +620,7 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
533 union { 620 union {
534 __u32 offset; 621 __u32 offset;
535 unsigned long userptr; 622 unsigned long userptr;
623 struct <link linkend="v4l2-plane">v4l2_plane</link> *planes;
536 } m; 624 } m;
537 __u32 length; 625 __u32 length;
538 __u32 input; 626 __u32 input;
@@ -1623,12 +1711,56 @@ struct <link linkend="v4l2-mpeg-vbi-fmt-ivtv">v4l2_mpeg_vbi_fmt_ivtv</link> {
1623 * A G G R E G A T E S T R U C T U R E S 1711 * A G G R E G A T E S T R U C T U R E S
1624 */ 1712 */
1625 1713
1626/* Stream data format 1714/**
1715 * struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> - additional, per-plane format definition
1716 * @sizeimage: maximum size in bytes required for data, for which
1717 * this plane will be used
1718 * @bytesperline: distance in bytes between the leftmost pixels in two
1719 * adjacent lines
1720 */
1721struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> {
1722 __u32 sizeimage;
1723 __u16 bytesperline;
1724 __u16 reserved[7];
1725} __attribute__ ((packed));
1726
1727/**
1728 * struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> - multiplanar format definition
1729 * @width: image width in pixels
1730 * @height: image height in pixels
1731 * @pixelformat: little endian four character code (fourcc)
1732 * @field: field order (for interlaced video)
1733 * @colorspace: supplemental to pixelformat
1734 * @plane_fmt: per-plane information
1735 * @num_planes: number of planes for this format
1736 */
1737struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> {
1738 __u32 width;
1739 __u32 height;
1740 __u32 pixelformat;
1741 enum <link linkend="v4l2-field">v4l2_field</link> field;
1742 enum <link linkend="v4l2-colorspace">v4l2_colorspace</link> colorspace;
1743
1744 struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> plane_fmt[VIDEO_MAX_PLANES];
1745 __u8 num_planes;
1746 __u8 reserved[11];
1747} __attribute__ ((packed));
1748
1749/**
1750 * struct <link linkend="v4l2-format">v4l2_format</link> - stream data format
1751 * @type: type of the data stream
1752 * @pix: definition of an image format
1753 * @pix_mp: definition of a multiplanar image format
1754 * @win: definition of an overlaid image
1755 * @vbi: raw VBI capture or output parameters
1756 * @sliced: sliced VBI capture or output parameters
1757 * @raw_data: placeholder for future extensions and custom formats
1627 */ 1758 */
1628struct <link linkend="v4l2-format">v4l2_format</link> { 1759struct <link linkend="v4l2-format">v4l2_format</link> {
1629 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type; 1760 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type;
1630 union { 1761 union {
1631 struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ 1762 struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
1763 struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
1632 struct <link linkend="v4l2-window">v4l2_window</link> win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ 1764 struct <link linkend="v4l2-window">v4l2_window</link> win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
1633 struct <link linkend="v4l2-vbi-format">v4l2_vbi_format</link> vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ 1765 struct <link linkend="v4l2-vbi-format">v4l2_vbi_format</link> vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
1634 struct <link linkend="v4l2-sliced-vbi-format">v4l2_sliced_vbi_format</link> sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ 1766 struct <link linkend="v4l2-sliced-vbi-format">v4l2_sliced_vbi_format</link> sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
@@ -1636,7 +1768,6 @@ struct <link linkend="v4l2-format">v4l2_format</link> {
1636 } fmt; 1768 } fmt;
1637}; 1769};
1638 1770
1639
1640/* Stream type-dependent parameters 1771/* Stream type-dependent parameters
1641 */ 1772 */
1642struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> { 1773struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> {
@@ -1809,16 +1940,6 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1809/* Reminder: when adding new ioctls please add support for them to 1940/* Reminder: when adding new ioctls please add support for them to
1810 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1941 drivers/media/video/v4l2-compat-ioctl32.c as well! */
1811 1942
1812#ifdef __OLD_VIDIOC_
1813/* for compatibility, will go away some day */
1814#define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int)
1815#define VIDIOC_S_PARM_OLD _IOW('V', 22, struct <link linkend="v4l2-streamparm">v4l2_streamparm</link>)
1816#define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct <link linkend="v4l2-control">v4l2_control</link>)
1817#define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct <link linkend="v4l2-audio">v4l2_audio</link>)
1818#define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct <link linkend="v4l2-audioout">v4l2_audioout</link>)
1819#define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct <link linkend="v4l2-cropcap">v4l2_cropcap</link>)
1820#endif
1821
1822#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ 1943#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
1823 1944
1824#endif /* __LINUX_VIDEODEV2_H */ 1945#endif /* __LINUX_VIDEODEV2_H */
diff --git a/Documentation/DocBook/v4l/vidioc-enum-fmt.xml b/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
index 960d44615ca..71d373b6d36 100644
--- a/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
+++ b/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
@@ -76,7 +76,9 @@ pixelformat</structfield> field.</entry>
76 <entry>Type of the data stream, set by the application. 76 <entry>Type of the data stream, set by the application.
77Only these types are valid here: 77Only these types are valid here:
78<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>, 78<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>,
79<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>,
79<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, 80<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
81<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>,
80<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver 82<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver
81defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> 83defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant>
82and higher.</entry> 84and higher.</entry>
diff --git a/Documentation/DocBook/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/v4l/vidioc-g-fmt.xml
index 7c7d1b72c40..a4ae59b664e 100644
--- a/Documentation/DocBook/v4l/vidioc-g-fmt.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-fmt.xml
@@ -60,11 +60,13 @@ application.</para>
60<structfield>type</structfield> field of a struct 60<structfield>type</structfield> field of a struct
61<structname>v4l2_format</structname> to the respective buffer (stream) 61<structname>v4l2_format</structname> to the respective buffer (stream)
62type. For example video capture devices use 62type. For example video capture devices use
63<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>. When the application 63<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> or
64<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. When the application
64calls the <constant>VIDIOC_G_FMT</constant> ioctl with a pointer to 65calls the <constant>VIDIOC_G_FMT</constant> ioctl with a pointer to
65this structure the driver fills the respective member of the 66this structure the driver fills the respective member of the
66<structfield>fmt</structfield> union. In case of video capture devices 67<structfield>fmt</structfield> union. In case of video capture devices
67that is the &v4l2-pix-format; <structfield>pix</structfield> member. 68that is either the &v4l2-pix-format; <structfield>pix</structfield> or
69the &v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member.
68When the requested buffer type is not supported drivers return an 70When the requested buffer type is not supported drivers return an
69&EINVAL;.</para> 71&EINVAL;.</para>
70 72
@@ -134,6 +136,15 @@ devices.</entry>
134 </row> 136 </row>
135 <row> 137 <row>
136 <entry></entry> 138 <entry></entry>
139 <entry>&v4l2-pix-format-mplane;</entry>
140 <entry><structfield>pix_mp</structfield></entry>
141 <entry>Definition of an image format, see <xref
142 linkend="pixfmt" />, used by video capture and output
143devices that support the <link linkend="planar-apis">multi-planar
144version of the API</link>.</entry>
145 </row>
146 <row>
147 <entry></entry>
137 <entry>&v4l2-window;</entry> 148 <entry>&v4l2-window;</entry>
138 <entry><structfield>win</structfield></entry> 149 <entry><structfield>win</structfield></entry>
139 <entry>Definition of an overlaid image, see <xref 150 <entry>Definition of an overlaid image, see <xref
diff --git a/Documentation/DocBook/v4l/vidioc-qbuf.xml b/Documentation/DocBook/v4l/vidioc-qbuf.xml
index ab691ebf3b9..f2b11f8a403 100644
--- a/Documentation/DocBook/v4l/vidioc-qbuf.xml
+++ b/Documentation/DocBook/v4l/vidioc-qbuf.xml
@@ -64,7 +64,8 @@ zero to the number of buffers allocated with &VIDIOC-REQBUFS;
64contents of the struct <structname>v4l2_buffer</structname> returned 64contents of the struct <structname>v4l2_buffer</structname> returned
65by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is 65by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is
66intended for output (<structfield>type</structfield> is 66intended for output (<structfield>type</structfield> is
67<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> or 67<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
68<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>, or
68<constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also 69<constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also
69initialize the <structfield>bytesused</structfield>, 70initialize the <structfield>bytesused</structfield>,
70<structfield>field</structfield> and 71<structfield>field</structfield> and
@@ -75,7 +76,11 @@ supports capturing from specific video inputs and you want to specify a video
75input, then <structfield>flags</structfield> should be set to 76input, then <structfield>flags</structfield> should be set to
76<constant>V4L2_BUF_FLAG_INPUT</constant> and the field 77<constant>V4L2_BUF_FLAG_INPUT</constant> and the field
77<structfield>input</structfield> must be initialized to the desired input. 78<structfield>input</structfield> must be initialized to the desired input.
78The <structfield>reserved</structfield> field must be set to 0. 79The <structfield>reserved</structfield> field must be set to 0. When using
80the <link linkend="planar-apis">multi-planar API</link>, the
81<structfield>m.planes</structfield> field must contain a userspace pointer
82to a filled-in array of &v4l2-plane; and the <structfield>length</structfield>
83field must be set to the number of elements in that array.
79</para> 84</para>
80 85
81 <para>To enqueue a <link linkend="mmap">memory mapped</link> 86 <para>To enqueue a <link linkend="mmap">memory mapped</link>
@@ -93,10 +98,13 @@ structure the driver sets the
93buffer applications set the <structfield>memory</structfield> 98buffer applications set the <structfield>memory</structfield>
94field to <constant>V4L2_MEMORY_USERPTR</constant>, the 99field to <constant>V4L2_MEMORY_USERPTR</constant>, the
95<structfield>m.userptr</structfield> field to the address of the 100<structfield>m.userptr</structfield> field to the address of the
96buffer and <structfield>length</structfield> to its size. 101buffer and <structfield>length</structfield> to its size. When the multi-planar
97When <constant>VIDIOC_QBUF</constant> is called with a pointer to this 102API is used, <structfield>m.userptr</structfield> and
98structure the driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> 103<structfield>length</structfield> members of the passed array of &v4l2-plane;
99flag and clears the <constant>V4L2_BUF_FLAG_MAPPED</constant> and 104have to be used instead. When <constant>VIDIOC_QBUF</constant> is called with
105a pointer to this structure the driver sets the
106<constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the
107<constant>V4L2_BUF_FLAG_MAPPED</constant> and
100<constant>V4L2_BUF_FLAG_DONE</constant> flags in the 108<constant>V4L2_BUF_FLAG_DONE</constant> flags in the
101<structfield>flags</structfield> field, or it returns an error code. 109<structfield>flags</structfield> field, or it returns an error code.
102This ioctl locks the memory pages of the buffer in physical memory, 110This ioctl locks the memory pages of the buffer in physical memory,
@@ -115,7 +123,9 @@ remaining fields or returns an error code. The driver may also set
115<constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield> 123<constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield>
116field. It indicates a non-critical (recoverable) streaming error. In such case 124field. It indicates a non-critical (recoverable) streaming error. In such case
117the application may continue as normal, but should be aware that data in the 125the application may continue as normal, but should be aware that data in the
118dequeued buffer might be corrupted.</para> 126dequeued buffer might be corrupted. When using the multi-planar API, the
127planes array does not have to be passed; the <structfield>m.planes</structfield>
128member must be set to NULL in that case.</para>
119 129
120 <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no 130 <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no
121buffer is in the outgoing queue. When the 131buffer is in the outgoing queue. When the
diff --git a/Documentation/DocBook/v4l/vidioc-querybuf.xml b/Documentation/DocBook/v4l/vidioc-querybuf.xml
index e649805a490..5c104d42d31 100644
--- a/Documentation/DocBook/v4l/vidioc-querybuf.xml
+++ b/Documentation/DocBook/v4l/vidioc-querybuf.xml
@@ -61,6 +61,10 @@ buffer at any time after buffers have been allocated with the
61to the number of buffers allocated with &VIDIOC-REQBUFS; 61to the number of buffers allocated with &VIDIOC-REQBUFS;
62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one. 62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.
63The <structfield>reserved</structfield> field should to set to 0. 63The <structfield>reserved</structfield> field should to set to 0.
64When using the <link linkend="planar-apis">multi-planar API</link>, the
65<structfield>m.planes</structfield> field must contain a userspace pointer to an
66array of &v4l2-plane; and the <structfield>length</structfield> field has
67to be set to the number of elements in that array.
64After calling <constant>VIDIOC_QUERYBUF</constant> with a pointer to 68After calling <constant>VIDIOC_QUERYBUF</constant> with a pointer to
65 this structure drivers return an error code or fill the rest of 69 this structure drivers return an error code or fill the rest of
66the structure.</para> 70the structure.</para>
@@ -70,11 +74,13 @@ the structure.</para>
70<constant>V4L2_BUF_FLAG_QUEUED</constant> and 74<constant>V4L2_BUF_FLAG_QUEUED</constant> and
71<constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The 75<constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The
72<structfield>memory</structfield> field will be set to the current 76<structfield>memory</structfield> field will be set to the current
73I/O method, the <structfield>m.offset</structfield> 77I/O method. For the single-planar API, the <structfield>m.offset</structfield>
74contains the offset of the buffer from the start of the device memory, 78contains the offset of the buffer from the start of the device memory,
75the <structfield>length</structfield> field its size. The driver may 79the <structfield>length</structfield> field its size. For the multi-planar API,
76or may not set the remaining fields and flags, they are meaningless in 80fields <structfield>m.mem_offset</structfield> and
77this context.</para> 81<structfield>length</structfield> in the <structfield>m.planes</structfield>
82array elements will be used instead. The driver may or may not set the remaining
83fields and flags, they are meaningless in this context.</para>
78 84
79 <para>The <structname>v4l2_buffer</structname> structure is 85 <para>The <structname>v4l2_buffer</structname> structure is
80 specified in <xref linkend="buffer" />.</para> 86 specified in <xref linkend="buffer" />.</para>
diff --git a/Documentation/DocBook/v4l/vidioc-querycap.xml b/Documentation/DocBook/v4l/vidioc-querycap.xml
index d499da93a45..f29f1b86213 100644
--- a/Documentation/DocBook/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/v4l/vidioc-querycap.xml
@@ -142,16 +142,30 @@ this array to zero.</entry>
142 <row> 142 <row>
143 <entry><constant>V4L2_CAP_VIDEO_CAPTURE</constant></entry> 143 <entry><constant>V4L2_CAP_VIDEO_CAPTURE</constant></entry>
144 <entry>0x00000001</entry> 144 <entry>0x00000001</entry>
145 <entry>The device supports the <link 145 <entry>The device supports the single-planar API through the <link
146linkend="capture">Video Capture</link> interface.</entry> 146linkend="capture">Video Capture</link> interface.</entry>
147 </row> 147 </row>
148 <row> 148 <row>
149 <entry><constant>V4L2_CAP_VIDEO_CAPTURE_MPLANE</constant></entry>
150 <entry>0x00001000</entry>
151 <entry>The device supports the
152 <link linkend="planar-apis">multi-planar API</link> through the
153 <link linkend="capture">Video Capture</link> interface.</entry>
154 </row>
155 <row>
149 <entry><constant>V4L2_CAP_VIDEO_OUTPUT</constant></entry> 156 <entry><constant>V4L2_CAP_VIDEO_OUTPUT</constant></entry>
150 <entry>0x00000002</entry> 157 <entry>0x00000002</entry>
151 <entry>The device supports the <link 158 <entry>The device supports the single-planar API through the <link
152linkend="output">Video Output</link> interface.</entry> 159linkend="output">Video Output</link> interface.</entry>
153 </row> 160 </row>
154 <row> 161 <row>
162 <entry><constant>V4L2_CAP_VIDEO_OUTPUT_MPLANE</constant></entry>
163 <entry>0x00002000</entry>
164 <entry>The device supports the
165 <link linkend="planar-apis">multi-planar API</link> through the
166 <link linkend="output">Video Output</link> interface.</entry>
167 </row>
168 <row>
155 <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry> 169 <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry>
156 <entry>0x00000004</entry> 170 <entry>0x00000004</entry>
157 <entry>The device supports the <link 171 <entry>The device supports the <link
diff --git a/Documentation/DocBook/v4l/vidioc-streamon.xml b/Documentation/DocBook/v4l/vidioc-streamon.xml
index e42bff1f2c0..75ed39bf4d2 100644
--- a/Documentation/DocBook/v4l/vidioc-streamon.xml
+++ b/Documentation/DocBook/v4l/vidioc-streamon.xml
@@ -93,6 +93,15 @@ synchronize with other events.</para>
93been allocated (memory mapping) or enqueued (output) yet.</para> 93been allocated (memory mapping) or enqueued (output) yet.</para>
94 </listitem> 94 </listitem>
95 </varlistentry> 95 </varlistentry>
96 <varlistentry>
97 <term><errorcode>EPIPE</errorcode></term>
98 <listitem>
99 <para>The driver implements <link
100 linkend="pad-level-formats">pad-level format configuration</link> and
101 the pipeline configuration is invalid.
102 </para>
103 </listitem>
104 </varlistentry>
96 </variablelist> 105 </variablelist>
97 </refsect1> 106 </refsect1>
98</refentry> 107</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml
new file mode 100644
index 00000000000..2f8f4f0a023
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml
@@ -0,0 +1,152 @@
1<refentry id="vidioc-subdev-enum-frame-interval">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refname>
9 <refpurpose>Enumerate frame intervals</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_frame_interval_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</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 lets applications enumerate available frame intervals on a
59 given sub-device pad. Frame intervals only makes sense for sub-devices that
60 can control the frame period on their own. This includes, for instance,
61 image sensors and TV tuners.</para>
62
63 <para>For the common use case of image sensors, the frame intervals
64 available on the sub-device output pad depend on the frame format and size
65 on the same pad. Applications must thus specify the desired format and size
66 when enumerating frame intervals.</para>
67
68 <para>To enumerate frame intervals applications initialize the
69 <structfield>index</structfield>, <structfield>pad</structfield>,
70 <structfield>code</structfield>, <structfield>width</structfield> and
71 <structfield>height</structfield> fields of
72 &v4l2-subdev-frame-interval-enum; and call the
73 <constant>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</constant> ioctl with a pointer
74 to this structure. Drivers fill the rest of the structure or return
75 an &EINVAL; if one of the input fields is invalid. All frame intervals are
76 enumerable by beginning at index zero and incrementing by one until
77 <errorcode>EINVAL</errorcode> is returned.</para>
78
79 <para>Available frame intervals may depend on the current 'try' formats
80 at other pads of the sub-device, as well as on the current active links. See
81 &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
82
83 <para>Sub-devices that support the frame interval enumeration ioctl should
84 implemented it on a single pad only. Its behaviour when supported on
85 multiple pads of the same sub-device is not defined.</para>
86
87 <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval-enum">
88 <title>struct <structname>v4l2_subdev_frame_interval_enum</structname></title>
89 <tgroup cols="3">
90 &cs-str;
91 <tbody valign="top">
92 <row>
93 <entry>__u32</entry>
94 <entry><structfield>index</structfield></entry>
95 <entry>Number of the format in the enumeration, set by the
96 application.</entry>
97 </row>
98 <row>
99 <entry>__u32</entry>
100 <entry><structfield>pad</structfield></entry>
101 <entry>Pad number as reported by the media controller API.</entry>
102 </row>
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>code</structfield></entry>
106 <entry>The media bus format code, as defined in
107 <xref linkend="v4l2-mbus-format" />.</entry>
108 </row>
109 <row>
110 <entry>__u32</entry>
111 <entry><structfield>width</structfield></entry>
112 <entry>Frame width, in pixels.</entry>
113 </row>
114 <row>
115 <entry>__u32</entry>
116 <entry><structfield>height</structfield></entry>
117 <entry>Frame height, in pixels.</entry>
118 </row>
119 <row>
120 <entry>&v4l2-fract;</entry>
121 <entry><structfield>interval</structfield></entry>
122 <entry>Period, in seconds, between consecutive video frames.</entry>
123 </row>
124 <row>
125 <entry>__u32</entry>
126 <entry><structfield>reserved</structfield>[9]</entry>
127 <entry>Reserved for future extensions. Applications and drivers must
128 set the array to zero.</entry>
129 </row>
130 </tbody>
131 </tgroup>
132 </table>
133 </refsect1>
134
135 <refsect1>
136 &return-value;
137
138 <variablelist>
139 <varlistentry>
140 <term><errorcode>EINVAL</errorcode></term>
141 <listitem>
142 <para>The &v4l2-subdev-frame-interval-enum;
143 <structfield>pad</structfield> references a non-existing pad, one of
144 the <structfield>code</structfield>, <structfield>width</structfield>
145 or <structfield>height</structfield> fields are invalid for the given
146 pad or the <structfield>index</structfield> field is out of bounds.
147 </para>
148 </listitem>
149 </varlistentry>
150 </variablelist>
151 </refsect1>
152</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml
new file mode 100644
index 00000000000..79ce42b7c60
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml
@@ -0,0 +1,154 @@
1<refentry id="vidioc-subdev-enum-frame-size">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refname>
9 <refpurpose>Enumerate media bus frame sizes</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_frame_size_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</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 allows applications to enumerate all frame sizes
59 supported by a sub-device on the given pad for the given media bus format.
60 Supported formats can be retrieved with the &VIDIOC-SUBDEV-ENUM-MBUS-CODE;
61 ioctl.</para>
62
63 <para>To enumerate frame sizes applications initialize the
64 <structfield>pad</structfield>, <structfield>code</structfield> and
65 <structfield>index</structfield> fields of the
66 &v4l2-subdev-mbus-code-enum; and call the
67 <constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant> ioctl with a pointer to
68 the structure. Drivers fill the minimum and maximum frame sizes or return
69 an &EINVAL; if one of the input parameters is invalid.</para>
70
71 <para>Sub-devices that only support discrete frame sizes (such as most
72 sensors) will return one or more frame sizes with identical minimum and
73 maximum values.</para>
74
75 <para>Not all possible sizes in given [minimum, maximum] ranges need to be
76 supported. For instance, a scaler that uses a fixed-point scaling ratio
77 might not be able to produce every frame size between the minimum and
78 maximum values. Applications must use the &VIDIOC-SUBDEV-S-FMT; ioctl to
79 try the sub-device for an exact supported frame size.</para>
80
81 <para>Available frame sizes may depend on the current 'try' formats at other
82 pads of the sub-device, as well as on the current active links and the
83 current values of V4L2 controls. See &VIDIOC-SUBDEV-G-FMT; for more
84 information about try formats.</para>
85
86 <table pgwide="1" frame="none" id="v4l2-subdev-frame-size-enum">
87 <title>struct <structname>v4l2_subdev_frame_size_enum</structname></title>
88 <tgroup cols="3">
89 &cs-str;
90 <tbody valign="top">
91 <row>
92 <entry>__u32</entry>
93 <entry><structfield>index</structfield></entry>
94 <entry>Number of the format in the enumeration, set by the
95 application.</entry>
96 </row>
97 <row>
98 <entry>__u32</entry>
99 <entry><structfield>pad</structfield></entry>
100 <entry>Pad number as reported by the media controller API.</entry>
101 </row>
102 <row>
103 <entry>__u32</entry>
104 <entry><structfield>code</structfield></entry>
105 <entry>The media bus format code, as defined in
106 <xref linkend="v4l2-mbus-format" />.</entry>
107 </row>
108 <row>
109 <entry>__u32</entry>
110 <entry><structfield>min_width</structfield></entry>
111 <entry>Minimum frame width, in pixels.</entry>
112 </row>
113 <row>
114 <entry>__u32</entry>
115 <entry><structfield>max_width</structfield></entry>
116 <entry>Maximum frame width, in pixels.</entry>
117 </row>
118 <row>
119 <entry>__u32</entry>
120 <entry><structfield>min_height</structfield></entry>
121 <entry>Minimum frame height, in pixels.</entry>
122 </row>
123 <row>
124 <entry>__u32</entry>
125 <entry><structfield>max_height</structfield></entry>
126 <entry>Maximum frame height, in pixels.</entry>
127 </row>
128 <row>
129 <entry>__u32</entry>
130 <entry><structfield>reserved</structfield>[9]</entry>
131 <entry>Reserved for future extensions. Applications and drivers must
132 set the array to zero.</entry>
133 </row>
134 </tbody>
135 </tgroup>
136 </table>
137 </refsect1>
138
139 <refsect1>
140 &return-value;
141
142 <variablelist>
143 <varlistentry>
144 <term><errorcode>EINVAL</errorcode></term>
145 <listitem>
146 <para>The &v4l2-subdev-frame-size-enum; <structfield>pad</structfield>
147 references a non-existing pad, the <structfield>code</structfield> is
148 invalid for the given pad or the <structfield>index</structfield>
149 field is out of bounds.</para>
150 </listitem>
151 </varlistentry>
152 </variablelist>
153 </refsect1>
154</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml
new file mode 100644
index 00000000000..a6b3432449f
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml
@@ -0,0 +1,119 @@
1<refentry id="vidioc-subdev-enum-mbus-code">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_MBUS_CODE</refname>
9 <refpurpose>Enumerate media bus formats</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_mbus_code_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_MBUS_CODE</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>To enumerate media bus formats available at a given sub-device pad
59 applications initialize the <structfield>pad</structfield> and
60 <structfield>index</structfield> fields of &v4l2-subdev-mbus-code-enum; and
61 call the <constant>VIDIOC_SUBDEV_ENUM_MBUS_CODE</constant> ioctl with a
62 pointer to this structure. Drivers fill the rest of the structure or return
63 an &EINVAL; if either the <structfield>pad</structfield> or
64 <structfield>index</structfield> are invalid. All media bus formats are
65 enumerable by beginning at index zero and incrementing by one until
66 <errorcode>EINVAL</errorcode> is returned.</para>
67
68 <para>Available media bus formats may depend on the current 'try' formats
69 at other pads of the sub-device, as well as on the current active links. See
70 &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
71
72 <table pgwide="1" frame="none" id="v4l2-subdev-mbus-code-enum">
73 <title>struct <structname>v4l2_subdev_mbus_code_enum</structname></title>
74 <tgroup cols="3">
75 &cs-str;
76 <tbody valign="top">
77 <row>
78 <entry>__u32</entry>
79 <entry><structfield>pad</structfield></entry>
80 <entry>Pad number as reported by the media controller API.</entry>
81 </row>
82 <row>
83 <entry>__u32</entry>
84 <entry><structfield>index</structfield></entry>
85 <entry>Number of the format in the enumeration, set by the
86 application.</entry>
87 </row>
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>code</structfield></entry>
91 <entry>The media bus format code, as defined in
92 <xref linkend="v4l2-mbus-format" />.</entry>
93 </row>
94 <row>
95 <entry>__u32</entry>
96 <entry><structfield>reserved</structfield>[9]</entry>
97 <entry>Reserved for future extensions. Applications and drivers must
98 set the array to zero.</entry>
99 </row>
100 </tbody>
101 </tgroup>
102 </table>
103 </refsect1>
104
105 <refsect1>
106 &return-value;
107
108 <variablelist>
109 <varlistentry>
110 <term><errorcode>EINVAL</errorcode></term>
111 <listitem>
112 <para>The &v4l2-subdev-mbus-code-enum; <structfield>pad</structfield>
113 references a non-existing pad, or the <structfield>index</structfield>
114 field is out of bounds.</para>
115 </listitem>
116 </varlistentry>
117 </variablelist>
118 </refsect1>
119</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml
new file mode 100644
index 00000000000..06197323a8c
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml
@@ -0,0 +1,155 @@
1<refentry id="vidioc-subdev-g-crop">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_CROP</refname>
9 <refname>VIDIOC_SUBDEV_S_CROP</refname>
10 <refpurpose>Get or set the crop rectangle on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_crop *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 <funcsynopsis>
23 <funcprototype>
24 <funcdef>int <function>ioctl</function></funcdef>
25 <paramdef>int <parameter>fd</parameter></paramdef>
26 <paramdef>int <parameter>request</parameter></paramdef>
27 <paramdef>const struct v4l2_subdev_crop *<parameter>argp</parameter></paramdef>
28 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Arguments</title>
34
35 <variablelist>
36 <varlistentry>
37 <term><parameter>fd</parameter></term>
38 <listitem>
39 <para>&fd;</para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>request</parameter></term>
44 <listitem>
45 <para>VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP</para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>argp</parameter></term>
50 <listitem>
51 <para></para>
52 </listitem>
53 </varlistentry>
54 </variablelist>
55 </refsect1>
56
57 <refsect1>
58 <title>Description</title>
59
60 <note>
61 <title>Experimental</title>
62 <para>This is an <link linkend="experimental">experimental</link>
63 interface and may change in the future.</para>
64 </note>
65
66 <para>To retrieve the current crop rectangle applications set the
67 <structfield>pad</structfield> field of a &v4l2-subdev-crop; to the
68 desired pad number as reported by the media API and the
69 <structfield>which</structfield> field to
70 <constant>V4L2_SUBDEV_FORMAT_ACTIVE</constant>. They then call the
71 <constant>VIDIOC_SUBDEV_G_CROP</constant> ioctl with a pointer to this
72 structure. The driver fills the members of the <structfield>rect</structfield>
73 field or returns &EINVAL; if the input arguments are invalid, or if cropping
74 is not supported on the given pad.</para>
75
76 <para>To change the current crop rectangle applications set both the
77 <structfield>pad</structfield> and <structfield>which</structfield> fields
78 and all members of the <structfield>rect</structfield> field. They then call
79 the <constant>VIDIOC_SUBDEV_S_CROP</constant> ioctl with a pointer to this
80 structure. The driver verifies the requested crop rectangle, adjusts it
81 based on the hardware capabilities and configures the device. Upon return
82 the &v4l2-subdev-crop; contains the current format as would be returned
83 by a <constant>VIDIOC_SUBDEV_G_CROP</constant> call.</para>
84
85 <para>Applications can query the device capabilities by setting the
86 <structfield>which</structfield> to
87 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. When set, 'try' crop
88 rectangles are not applied to the device by the driver, but are mangled
89 exactly as active crop rectangles and stored in the sub-device file handle.
90 Two applications querying the same sub-device would thus not interact with
91 each other.</para>
92
93 <para>Drivers must not return an error solely because the requested crop
94 rectangle doesn't match the device capabilities. They must instead modify
95 the rectangle to match what the hardware can provide. The modified format
96 should be as close as possible to the original request.</para>
97
98 <table pgwide="1" frame="none" id="v4l2-subdev-crop">
99 <title>struct <structname>v4l2_subdev_crop</structname></title>
100 <tgroup cols="3">
101 &cs-str;
102 <tbody valign="top">
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>pad</structfield></entry>
106 <entry>Pad number as reported by the media framework.</entry>
107 </row>
108 <row>
109 <entry>__u32</entry>
110 <entry><structfield>which</structfield></entry>
111 <entry>Crop rectangle to get or set, from
112 &v4l2-subdev-format-whence;.</entry>
113 </row>
114 <row>
115 <entry>&v4l2-rect;</entry>
116 <entry><structfield>rect</structfield></entry>
117 <entry>Crop rectangle boundaries, in pixels.</entry>
118 </row>
119 <row>
120 <entry>__u32</entry>
121 <entry><structfield>reserved</structfield>[8]</entry>
122 <entry>Reserved for future extensions. Applications and drivers must
123 set the array to zero.</entry>
124 </row>
125 </tbody>
126 </tgroup>
127 </table>
128 </refsect1>
129
130 <refsect1>
131 &return-value;
132
133 <variablelist>
134 <varlistentry>
135 <term><errorcode>EBUSY</errorcode></term>
136 <listitem>
137 <para>The crop rectangle can't be changed because the pad is currently
138 busy. This can be caused, for instance, by an active video stream on
139 the pad. The ioctl must not be retried without performing another
140 action to fix the problem first. Only returned by
141 <constant>VIDIOC_SUBDEV_S_CROP</constant></para>
142 </listitem>
143 </varlistentry>
144 <varlistentry>
145 <term><errorcode>EINVAL</errorcode></term>
146 <listitem>
147 <para>The &v4l2-subdev-crop; <structfield>pad</structfield>
148 references a non-existing pad, the <structfield>which</structfield>
149 field references a non-existing format, or cropping is not supported
150 on the given subdev pad.</para>
151 </listitem>
152 </varlistentry>
153 </variablelist>
154 </refsect1>
155</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml
new file mode 100644
index 00000000000..f367c570c53
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml
@@ -0,0 +1,180 @@
1<refentry id="vidioc-subdev-g-fmt">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_FMT</refname>
9 <refname>VIDIOC_SUBDEV_S_FMT</refname>
10 <refpurpose>Get or set the data format on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_format *<parameter>argp</parameter>
20 </paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52
53 <note>
54 <title>Experimental</title>
55 <para>This is an <link linkend="experimental">experimental</link>
56 interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls are used to negotiate the frame format at specific
60 subdev pads in the image pipeline.</para>
61
62 <para>To retrieve the current format applications set the
63 <structfield>pad</structfield> field of a &v4l2-subdev-format; to the
64 desired pad number as reported by the media API and the
65 <structfield>which</structfield> field to
66 <constant>V4L2_SUBDEV_FORMAT_ACTIVE</constant>. When they call the
67 <constant>VIDIOC_SUBDEV_G_FMT</constant> ioctl with a pointer to this
68 structure the driver fills the members of the <structfield>format</structfield>
69 field.</para>
70
71 <para>To change the current format applications set both the
72 <structfield>pad</structfield> and <structfield>which</structfield> fields
73 and all members of the <structfield>format</structfield> field. When they
74 call the <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl with a pointer to this
75 structure the driver verifies the requested format, adjusts it based on the
76 hardware capabilities and configures the device. Upon return the
77 &v4l2-subdev-format; contains the current format as would be returned by a
78 <constant>VIDIOC_SUBDEV_G_FMT</constant> call.</para>
79
80 <para>Applications can query the device capabilities by setting the
81 <structfield>which</structfield> to
82 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. When set, 'try' formats are not
83 applied to the device by the driver, but are changed exactly as active
84 formats and stored in the sub-device file handle. Two applications querying
85 the same sub-device would thus not interact with each other.</para>
86
87 <para>For instance, to try a format at the output pad of a sub-device,
88 applications would first set the try format at the sub-device input with the
89 <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl. They would then either
90 retrieve the default format at the output pad with the
91 <constant>VIDIOC_SUBDEV_G_FMT</constant> ioctl, or set the desired output
92 pad format with the <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl and check
93 the returned value.</para>
94
95 <para>Try formats do not depend on active formats, but can depend on the
96 current links configuration or sub-device controls value. For instance, a
97 low-pass noise filter might crop pixels at the frame boundaries, modifying
98 its output frame size.</para>
99
100 <para>Drivers must not return an error solely because the requested format
101 doesn't match the device capabilities. They must instead modify the format
102 to match what the hardware can provide. The modified format should be as
103 close as possible to the original request.</para>
104
105 <table pgwide="1" frame="none" id="v4l2-subdev-format">
106 <title>struct <structname>v4l2_subdev_format</structname></title>
107 <tgroup cols="3">
108 &cs-str;
109 <tbody valign="top">
110 <row>
111 <entry>__u32</entry>
112 <entry><structfield>pad</structfield></entry>
113 <entry>Pad number as reported by the media controller API.</entry>
114 </row>
115 <row>
116 <entry>__u32</entry>
117 <entry><structfield>which</structfield></entry>
118 <entry>Format to modified, from &v4l2-subdev-format-whence;.</entry>
119 </row>
120 <row>
121 <entry>&v4l2-mbus-framefmt;</entry>
122 <entry><structfield>format</structfield></entry>
123 <entry>Definition of an image format, see <xref
124 linkend="v4l2-mbus-framefmt" /> for details.</entry>
125 </row>
126 <row>
127 <entry>__u32</entry>
128 <entry><structfield>reserved</structfield>[8]</entry>
129 <entry>Reserved for future extensions. Applications and drivers must
130 set the array to zero.</entry>
131 </row>
132 </tbody>
133 </tgroup>
134 </table>
135
136 <table pgwide="1" frame="none" id="v4l2-subdev-format-whence">
137 <title>enum <structname>v4l2_subdev_format_whence</structname></title>
138 <tgroup cols="3">
139 &cs-def;
140 <tbody valign="top">
141 <row>
142 <entry>V4L2_SUBDEV_FORMAT_TRY</entry>
143 <entry>0</entry>
144 <entry>Try formats, used for querying device capabilities.</entry>
145 </row>
146 <row>
147 <entry>V4L2_SUBDEV_FORMAT_ACTIVE</entry>
148 <entry>1</entry>
149 <entry>Active formats, applied to the hardware.</entry>
150 </row>
151 </tbody>
152 </tgroup>
153 </table>
154 </refsect1>
155
156 <refsect1>
157 &return-value;
158
159 <variablelist>
160 <varlistentry>
161 <term><errorcode>EBUSY</errorcode></term>
162 <listitem>
163 <para>The format can't be changed because the pad is currently busy.
164 This can be caused, for instance, by an active video stream on the
165 pad. The ioctl must not be retried without performing another action
166 to fix the problem first. Only returned by
167 <constant>VIDIOC_SUBDEV_S_FMT</constant></para>
168 </listitem>
169 </varlistentry>
170 <varlistentry>
171 <term><errorcode>EINVAL</errorcode></term>
172 <listitem>
173 <para>The &v4l2-subdev-format; <structfield>pad</structfield>
174 references a non-existing pad, or the <structfield>which</structfield>
175 field references a non-existing format.</para>
176 </listitem>
177 </varlistentry>
178 </variablelist>
179 </refsect1>
180</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml
new file mode 100644
index 00000000000..0bc3ea22d31
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml
@@ -0,0 +1,141 @@
1<refentry id="vidioc-subdev-g-frame-interval">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_FRAME_INTERVAL</refname>
9 <refname>VIDIOC_SUBDEV_S_FRAME_INTERVAL</refname>
10 <refpurpose>Get or set the frame interval on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_frame_interval *<parameter>argp</parameter>
20 </paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52
53 <note>
54 <title>Experimental</title>
55 <para>This is an <link linkend="experimental">experimental</link>
56 interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls are used to get and set the frame interval at specific
60 subdev pads in the image pipeline. The frame interval only makes sense for
61 sub-devices that can control the frame period on their own. This includes,
62 for instance, image sensors and TV tuners. Sub-devices that don't support
63 frame intervals must not implement these ioctls.</para>
64
65 <para>To retrieve the current frame interval applications set the
66 <structfield>pad</structfield> field of a &v4l2-subdev-frame-interval; to
67 the desired pad number as reported by the media controller API. When they
68 call the <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> ioctl with a
69 pointer to this structure the driver fills the members of the
70 <structfield>interval</structfield> field.</para>
71
72 <para>To change the current frame interval applications set both the
73 <structfield>pad</structfield> field and all members of the
74 <structfield>interval</structfield> field. When they call the
75 <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant> ioctl with a pointer to
76 this structure the driver verifies the requested interval, adjusts it based
77 on the hardware capabilities and configures the device. Upon return the
78 &v4l2-subdev-frame-interval; contains the current frame interval as would be
79 returned by a <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> call.
80 </para>
81
82 <para>Drivers must not return an error solely because the requested interval
83 doesn't match the device capabilities. They must instead modify the interval
84 to match what the hardware can provide. The modified interval should be as
85 close as possible to the original request.</para>
86
87 <para>Sub-devices that support the frame interval ioctls should implement
88 them on a single pad only. Their behaviour when supported on multiple pads
89 of the same sub-device is not defined.</para>
90
91 <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval">
92 <title>struct <structname>v4l2_subdev_frame_interval</structname></title>
93 <tgroup cols="3">
94 &cs-str;
95 <tbody valign="top">
96 <row>
97 <entry>__u32</entry>
98 <entry><structfield>pad</structfield></entry>
99 <entry>Pad number as reported by the media controller API.</entry>
100 </row>
101 <row>
102 <entry>&v4l2-fract;</entry>
103 <entry><structfield>interval</structfield></entry>
104 <entry>Period, in seconds, between consecutive video frames.</entry>
105 </row>
106 <row>
107 <entry>__u32</entry>
108 <entry><structfield>reserved</structfield>[9]</entry>
109 <entry>Reserved for future extensions. Applications and drivers must
110 set the array to zero.</entry>
111 </row>
112 </tbody>
113 </tgroup>
114 </table>
115 </refsect1>
116
117 <refsect1>
118 &return-value;
119
120 <variablelist>
121 <varlistentry>
122 <term><errorcode>EBUSY</errorcode></term>
123 <listitem>
124 <para>The frame interval can't be changed because the pad is currently
125 busy. This can be caused, for instance, by an active video stream on
126 the pad. The ioctl must not be retried without performing another
127 action to fix the problem first. Only returned by
128 <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant></para>
129 </listitem>
130 </varlistentry>
131 <varlistentry>
132 <term><errorcode>EINVAL</errorcode></term>
133 <listitem>
134 <para>The &v4l2-subdev-frame-interval; <structfield>pad</structfield>
135 references a non-existing pad, or the pad doesn't support frame
136 intervals.</para>
137 </listitem>
138 </varlistentry>
139 </variablelist>
140 </refsect1>
141</refentry>
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index 0ba149de260..58ced2346e6 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -4784,7 +4784,7 @@ struct _snd_pcm_runtime {
4784 FM registers can be directly accessed through the direct-FM API, 4784 FM registers can be directly accessed through the direct-FM API,
4785 defined in <filename>&lt;sound/asound_fm.h&gt;</filename>. In 4785 defined in <filename>&lt;sound/asound_fm.h&gt;</filename>. In
4786 ALSA native mode, FM registers are accessed through 4786 ALSA native mode, FM registers are accessed through
4787 the Hardware-Dependant Device direct-FM extension API, whereas in 4787 the Hardware-Dependent Device direct-FM extension API, whereas in
4788 OSS compatible mode, FM registers can be accessed with the OSS 4788 OSS compatible mode, FM registers can be accessed with the OSS
4789 direct-FM compatible API in <filename>/dev/dmfmX</filename> device. 4789 direct-FM compatible API in <filename>/dev/dmfmX</filename> device.
4790 </para> 4790 </para>
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 365bda9a0d9..81bc1a9ab9d 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -209,7 +209,7 @@ tools. One such tool that is particularly recommended is the Linux
209Cross-Reference project, which is able to present source code in a 209Cross-Reference project, which is able to present source code in a
210self-referential, indexed webpage format. An excellent up-to-date 210self-referential, indexed webpage format. An excellent up-to-date
211repository of the kernel code may be found at: 211repository of the kernel code may be found at:
212 http://users.sosdg.org/~qiyong/lxr/ 212 http://lxr.linux.no/+trees
213 213
214 214
215The development process 215The development process
diff --git a/Documentation/IRQ-affinity.txt b/Documentation/IRQ-affinity.txt
index b4a615b7840..7890fae1852 100644
--- a/Documentation/IRQ-affinity.txt
+++ b/Documentation/IRQ-affinity.txt
@@ -4,10 +4,11 @@ ChangeLog:
4 4
5SMP IRQ affinity 5SMP IRQ affinity
6 6
7/proc/irq/IRQ#/smp_affinity specifies which target CPUs are permitted 7/proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify
8for a given IRQ source. It's a bitmask of allowed CPUs. It's not allowed 8which target CPUs are permitted for a given IRQ source. It's a bitmask
9to turn off all CPUs, and if an IRQ controller does not support IRQ 9(smp_affinity) or cpu list (smp_affinity_list) of allowed CPUs. It's not
10affinity then the value will not change from the default 0xffffffff. 10allowed to turn off all CPUs, and if an IRQ controller does not support
11IRQ affinity then the value will not change from the default of all cpus.
11 12
12/proc/irq/default_smp_affinity specifies default affinity mask that applies 13/proc/irq/default_smp_affinity specifies default affinity mask that applies
13to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask 14to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask
@@ -54,3 +55,11 @@ round-trip min/avg/max = 0.1/0.5/585.4 ms
54This time around IRQ44 was delivered only to the last four processors. 55This time around IRQ44 was delivered only to the last four processors.
55i.e counters for the CPU0-3 did not change. 56i.e counters for the CPU0-3 did not change.
56 57
58Here is an example of limiting that same irq (44) to cpus 1024 to 1031:
59
60[root@moon 44]# echo 1024-1031 > smp_affinity
61[root@moon 44]# cat smp_affinity
621024-1031
63
64Note that to do this with a bitmask would require 32 bitmasks of zero
65to follow the pertinent one.
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index dcf7acc720e..3f5e0b09bed 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -253,8 +253,8 @@ In constrast, MSI is restricted to a maximum of 32 interrupts (and
253must be a power of two). In addition, the MSI interrupt vectors must 253must be a power of two). In addition, the MSI interrupt vectors must
254be allocated consecutively, so the system may not be able to allocate 254be allocated consecutively, so the system may not be able to allocate
255as many vectors for MSI as it could for MSI-X. On some platforms, MSI 255as many vectors for MSI as it could for MSI-X. On some platforms, MSI
256interrupts must all be targetted at the same set of CPUs whereas MSI-X 256interrupts must all be targeted at the same set of CPUs whereas MSI-X
257interrupts can all be targetted at different CPUs. 257interrupts can all be targeted at different CPUs.
258 258
2594.5.2 Spinlocks 2594.5.2 Spinlocks
260 260
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX
index 71b6f500ddb..1d7a885761f 100644
--- a/Documentation/RCU/00-INDEX
+++ b/Documentation/RCU/00-INDEX
@@ -21,7 +21,7 @@ rcu.txt
21RTFP.txt 21RTFP.txt
22 - List of RCU papers (bibliography) going back to 1980. 22 - List of RCU papers (bibliography) going back to 1980.
23stallwarn.txt 23stallwarn.txt
24 - RCU CPU stall warnings (CONFIG_RCU_CPU_STALL_DETECTOR) 24 - RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress)
25torture.txt 25torture.txt
26 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) 26 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
27trace.txt 27trace.txt
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 862c08ef1fd..4e959208f73 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -1,22 +1,25 @@
1Using RCU's CPU Stall Detector 1Using RCU's CPU Stall Detector
2 2
3The CONFIG_RCU_CPU_STALL_DETECTOR kernel config parameter enables 3The rcu_cpu_stall_suppress module parameter enables RCU's CPU stall
4RCU's CPU stall detector, which detects conditions that unduly delay 4detector, which detects conditions that unduly delay RCU grace periods.
5RCU grace periods. The stall detector's idea of what constitutes 5This module parameter enables CPU stall detection by default, but
6"unduly delayed" is controlled by a set of C preprocessor macros: 6may be overridden via boot-time parameter or at runtime via sysfs.
7The stall detector's idea of what constitutes "unduly delayed" is
8controlled by a set of kernel configuration variables and cpp macros:
7 9
8RCU_SECONDS_TILL_STALL_CHECK 10CONFIG_RCU_CPU_STALL_TIMEOUT
9 11
10 This macro defines the period of time that RCU will wait from 12 This kernel configuration parameter defines the period of time
11 the beginning of a grace period until it issues an RCU CPU 13 that RCU will wait from the beginning of a grace period until it
12 stall warning. This time period is normally ten seconds. 14 issues an RCU CPU stall warning. This time period is normally
15 ten seconds.
13 16
14RCU_SECONDS_TILL_STALL_RECHECK 17RCU_SECONDS_TILL_STALL_RECHECK
15 18
16 This macro defines the period of time that RCU will wait after 19 This macro defines the period of time that RCU will wait after
17 issuing a stall warning until it issues another stall warning 20 issuing a stall warning until it issues another stall warning
18 for the same stall. This time period is normally set to thirty 21 for the same stall. This time period is normally set to three
19 seconds. 22 times the check interval plus thirty seconds.
20 23
21RCU_STALL_RAT_DELAY 24RCU_STALL_RAT_DELAY
22 25
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 6a8c73f55b8..8173cec473a 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -10,34 +10,46 @@ 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 five debugfs files under the 13These implementations of RCU provides several debugfs files under the
14top-level directory RCU: rcu/rcudata (which displays fields in struct 14top-level directory "rcu":
15rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of 15
16rcu/rcudata), rcu/rcugp (which displays grace-period counters), 16rcu/rcudata:
17rcu/rcuhier (which displays the struct rcu_node hierarchy), and 17 Displays fields in struct rcu_data.
18rcu/rcu_pending (which displays counts of the reasons that the 18rcu/rcudata.csv:
19rcu_pending() function decided that there was core RCU work to do). 19 Comma-separated values spreadsheet version of rcudata.
20rcu/rcugp:
21 Displays grace-period counters.
22rcu/rcuhier:
23 Displays the struct rcu_node hierarchy.
24rcu/rcu_pending:
25 Displays counts of the reasons rcu_pending() decided that RCU had
26 work to do.
27rcu/rcutorture:
28 Displays rcutorture test progress.
29rcu/rcuboost:
30 Displays RCU boosting statistics. Only present if
31 CONFIG_RCU_BOOST=y.
20 32
21The output of "cat rcu/rcudata" looks as follows: 33The output of "cat rcu/rcudata" looks as follows:
22 34
23rcu_sched: 35rcu_sched:
24 0 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=10951/1 dn=0 df=1101 of=0 ri=36 ql=0 b=10 36 0 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=545/1/0 df=50 of=0 ri=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0
25 1 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=16117/1 dn=0 df=1015 of=0 ri=0 ql=0 b=10 37 1 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=967/1/0 df=58 of=0 ri=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0
26 2 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1445/1 dn=0 df=1839 of=0 ri=0 ql=0 b=10 38 2 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=1081/1/0 df=175 of=0 ri=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0
27 3 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=6681/1 dn=0 df=1545 of=0 ri=0 ql=0 b=10 39 3 c=20942 g=20943 pq=1 pqc=20942 qp=1 dt=1846/0/0 df=404 of=0 ri=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0
28 4 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1003/1 dn=0 df=1992 of=0 ri=0 ql=0 b=10 40 4 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=369/1/0 df=83 of=0 ri=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0
29 5 c=17829 g=17830 pq=1 pqc=17829 qp=1 dt=3887/1 dn=0 df=3331 of=0 ri=4 ql=2 b=10 41 5 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=381/1/0 df=64 of=0 ri=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0
30 6 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=859/1 dn=0 df=3224 of=0 ri=0 ql=0 b=10 42 6 c=20972 g=20973 pq=1 pqc=20972 qp=0 dt=1037/1/0 df=183 of=0 ri=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0
31 7 c=17829 g=17830 pq=0 pqc=17829 qp=1 dt=3761/1 dn=0 df=1818 of=0 ri=0 ql=2 b=10 43 7 c=20897 g=20897 pq=1 pqc=20896 qp=0 dt=1572/0/0 df=382 of=0 ri=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0
32rcu_bh: 44rcu_bh:
33 0 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=10951/1 dn=0 df=0 of=0 ri=0 ql=0 b=10 45 0 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=545/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0
34 1 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=16117/1 dn=0 df=13 of=0 ri=0 ql=0 b=10 46 1 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=967/1/0 df=3 of=0 ri=1 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0
35 2 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1445/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 47 2 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=1081/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0
36 3 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=6681/1 dn=0 df=9 of=0 ri=0 ql=0 b=10 48 3 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=1846/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0
37 4 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1003/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 49 4 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=369/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0
38 5 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3887/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 50 5 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=381/1/0 df=4 of=0 ri=1 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0
39 6 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=859/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 51 6 c=1480 g=1480 pq=1 pqc=1479 qp=0 dt=1037/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0
40 7 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3761/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 52 7 c=1474 g=1474 pq=1 pqc=1473 qp=0 dt=1572/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0
41 53
42The first section lists the rcu_data structures for rcu_sched, the second 54The first section lists the rcu_data structures for rcu_sched, the second
43for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an 55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
@@ -52,17 +64,18 @@ o The number at the beginning of each line is the CPU number.
52 substantially larger than the number of actual CPUs. 64 substantially larger than the number of actual CPUs.
53 65
54o "c" is the count of grace periods that this CPU believes have 66o "c" is the count of grace periods that this CPU believes have
55 completed. CPUs in dynticks idle mode may lag quite a ways 67 completed. Offlined CPUs and CPUs in dynticks idle mode may
56 behind, for example, CPU 4 under "rcu_sched" above, which has 68 lag quite a ways behind, for example, CPU 6 under "rcu_sched"
57 slept through the past 25 RCU grace periods. It is not unusual 69 above, which has been offline through not quite 40,000 RCU grace
58 to see CPUs lagging by thousands of grace periods. 70 periods. It is not unusual to see CPUs lagging by thousands of
71 grace periods.
59 72
60o "g" is the count of grace periods that this CPU believes have 73o "g" is the count of grace periods that this CPU believes have
61 started. Again, CPUs in dynticks idle mode may lag behind. 74 started. Again, offlined CPUs and CPUs in dynticks idle mode
62 If the "c" and "g" values are equal, this CPU has already 75 may lag behind. If the "c" and "g" values are equal, this CPU
63 reported a quiescent state for the last RCU grace period that 76 has already reported a quiescent state for the last RCU grace
64 it is aware of, otherwise, the CPU believes that it owes RCU a 77 period that it is aware of, otherwise, the CPU believes that it
65 quiescent state. 78 owes RCU a quiescent state.
66 79
67o "pq" indicates that this CPU has passed through a quiescent state 80o "pq" indicates that this CPU has passed through a quiescent state
68 for the current grace period. It is possible for "pq" to be 81 for the current grace period. It is possible for "pq" to be
@@ -81,22 +94,16 @@ o "pqc" indicates which grace period the last-observed quiescent
81 the next grace period! 94 the next grace period!
82 95
83o "qp" indicates that RCU still expects a quiescent state from 96o "qp" indicates that RCU still expects a quiescent state from
84 this CPU. 97 this CPU. Offlined CPUs and CPUs in dyntick idle mode might
98 well have qp=1, which is OK: RCU is still ignoring them.
85 99
86o "dt" is the current value of the dyntick counter that is incremented 100o "dt" is the current value of the dyntick counter that is incremented
87 when entering or leaving dynticks idle state, either by the 101 when entering or leaving dynticks idle state, either by the
88 scheduler or by irq. The number after the "/" is the interrupt 102 scheduler or by irq. This number is even if the CPU is in
89 nesting depth when in dyntick-idle state, or one greater than 103 dyntick idle mode and odd otherwise. The number after the first
90 the interrupt-nesting depth otherwise. 104 "/" is the interrupt nesting depth when in dyntick-idle state,
91 105 or one greater than the interrupt-nesting depth otherwise.
92 This field is displayed only for CONFIG_NO_HZ kernels. 106 The number after the second "/" is the NMI nesting depth.
93
94o "dn" is the current value of the dyntick counter that is incremented
95 when entering or leaving dynticks idle state via NMI. If both
96 the "dt" and "dn" values are even, then this CPU is in dynticks
97 idle mode and may be ignored by RCU. If either of these two
98 counters is odd, then RCU must be alert to the possibility of
99 an RCU read-side critical section running on this CPU.
100 107
101 This field is displayed only for CONFIG_NO_HZ kernels. 108 This field is displayed only for CONFIG_NO_HZ kernels.
102 109
@@ -108,7 +115,7 @@ o "df" is the number of times that some other CPU has forced a
108 115
109o "of" is the number of times that some other CPU has forced a 116o "of" is the number of times that some other CPU has forced a
110 quiescent state on behalf of this CPU due to this CPU being 117 quiescent state on behalf of this CPU due to this CPU being
111 offline. In a perfect world, this might neve happen, but it 118 offline. In a perfect world, this might never happen, but it
112 turns out that offlining and onlining a CPU can take several grace 119 turns out that offlining and onlining a CPU can take several grace
113 periods, and so there is likely to be an extended period of time 120 periods, and so there is likely to be an extended period of time
114 when RCU believes that the CPU is online when it really is not. 121 when RCU believes that the CPU is online when it really is not.
@@ -125,6 +132,62 @@ o "ql" is the number of RCU callbacks currently residing on
125 of what state they are in (new, waiting for grace period to 132 of what state they are in (new, waiting for grace period to
126 start, waiting for grace period to end, ready to invoke). 133 start, waiting for grace period to end, ready to invoke).
127 134
135o "qs" gives an indication of the state of the callback queue
136 with four characters:
137
138 "N" Indicates that there are callbacks queued that are not
139 ready to be handled by the next grace period, and thus
140 will be handled by the grace period following the next
141 one.
142
143 "R" Indicates that there are callbacks queued that are
144 ready to be handled by the next grace period.
145
146 "W" Indicates that there are callbacks queued that are
147 waiting on the current grace period.
148
149 "D" Indicates that there are callbacks queued that have
150 already been handled by a prior grace period, and are
151 thus waiting to be invoked. Note that callbacks in
152 the process of being invoked are not counted here.
153 Callbacks in the process of being invoked are those
154 that have been removed from the rcu_data structures
155 queues by rcu_do_batch(), but which have not yet been
156 invoked.
157
158 If there are no callbacks in a given one of the above states,
159 the corresponding character is replaced by ".".
160
161o "kt" is the per-CPU kernel-thread state. The digit preceding
162 the first slash is zero if there is no work pending and 1
163 otherwise. The character between the first pair of slashes is
164 as follows:
165
166 "S" The kernel thread is stopped, in other words, all
167 CPUs corresponding to this rcu_node structure are
168 offline.
169
170 "R" The kernel thread is running.
171
172 "W" The kernel thread is waiting because there is no work
173 for it to do.
174
175 "O" The kernel thread is waiting because it has been
176 forced off of its designated CPU or because its
177 ->cpus_allowed mask permits it to run on other than
178 its designated CPU.
179
180 "Y" The kernel thread is yielding to avoid hogging CPU.
181
182 "?" Unknown value, indicates a bug.
183
184 The number after the final slash is the CPU that the kthread
185 is actually running on.
186
187o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
188 the number of times that this CPU's per-CPU kthread has gone
189 through its loop servicing invoke_rcu_cpu_kthread() requests.
190
128o "b" is the batch limit for this CPU. If more than this number 191o "b" is the batch limit for this CPU. If more than this number
129 of RCU callbacks is ready to invoke, then the remainder will 192 of RCU callbacks is ready to invoke, then the remainder will
130 be deferred. 193 be deferred.
@@ -174,14 +237,14 @@ o "gpnum" is the number of grace periods that have started. It is
174The output of "cat rcu/rcuhier" looks as follows, with very long lines: 237The output of "cat rcu/rcuhier" looks as follows, with very long lines:
175 238
176c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 239c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6
1771/1 .>. 0:127 ^0 2401/1 ..>. 0:127 ^0
1783/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 2413/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3
1793/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 2423/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
180rcu_bh: 243rcu_bh:
181c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 244c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
1820/1 .>. 0:127 ^0 2450/1 ..>. 0:127 ^0
1830/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 2460/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3
1840/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 2470/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
185 248
186This is once again split into "rcu_sched" and "rcu_bh" portions, 249This is once again split into "rcu_sched" and "rcu_bh" portions,
187and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional 250and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional
@@ -240,13 +303,20 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
240 current grace period. 303 current grace period.
241 304
242 o The characters separated by the ">" indicate the state 305 o The characters separated by the ">" indicate the state
243 of the blocked-tasks lists. A "T" preceding the ">" 306 of the blocked-tasks lists. A "G" preceding the ">"
244 indicates that at least one task blocked in an RCU 307 indicates that at least one task blocked in an RCU
245 read-side critical section blocks the current grace 308 read-side critical section blocks the current grace
246 period, while a "." preceding the ">" indicates otherwise. 309 period, while a "E" preceding the ">" indicates that
247 The character following the ">" indicates similarly for 310 at least one task blocked in an RCU read-side critical
248 the next grace period. A "T" should appear in this 311 section blocks the current expedited grace period.
249 field only for rcu-preempt. 312 A "T" character following the ">" indicates that at
313 least one task is blocked within an RCU read-side
314 critical section, regardless of whether any current
315 grace period (expedited or normal) is inconvenienced.
316 A "." character appears if the corresponding condition
317 does not hold, so that "..>." indicates that no tasks
318 are blocked. In contrast, "GE>T" indicates maximal
319 inconvenience from blocked tasks.
250 320
251 o The numbers separated by the ":" are the range of CPUs 321 o The numbers separated by the ":" are the range of CPUs
252 served by this struct rcu_node. This can be helpful 322 served by this struct rcu_node. This can be helpful
@@ -328,6 +398,113 @@ o "nn" is the number of times that this CPU needed nothing. Alert
328 is due to short-circuit evaluation in rcu_pending(). 398 is due to short-circuit evaluation in rcu_pending().
329 399
330 400
401The output of "cat rcu/rcutorture" looks as follows:
402
403rcutorture test sequence: 0 (test in progress)
404rcutorture update version number: 615
405
406The first line shows the number of rcutorture tests that have completed
407since boot. If a test is currently running, the "(test in progress)"
408string will appear as shown above. The second line shows the number of
409update cycles that the current test has started, or zero if there is
410no test in progress.
411
412
413The output of "cat rcu/rcuboost" looks as follows:
414
4150:5 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f
416 balk: nt=0 egt=989 bt=0 nb=0 ny=0 nos=16
4176:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f
418 balk: nt=0 egt=225 bt=0 nb=0 ny=0 nos=6
419
420This information is output only for rcu_preempt. Each two-line entry
421corresponds to a leaf rcu_node strcuture. The fields are as follows:
422
423o "n:m" is the CPU-number range for the corresponding two-line
424 entry. In the sample output above, the first entry covers
425 CPUs zero through five and the second entry covers CPUs 6
426 and 7.
427
428o "tasks=TNEB" gives the state of the various segments of the
429 rnp->blocked_tasks list:
430
431 "T" This indicates that there are some tasks that blocked
432 while running on one of the corresponding CPUs while
433 in an RCU read-side critical section.
434
435 "N" This indicates that some of the blocked tasks are preventing
436 the current normal (non-expedited) grace period from
437 completing.
438
439 "E" This indicates that some of the blocked tasks are preventing
440 the current expedited grace period from completing.
441
442 "B" This indicates that some of the blocked tasks are in
443 need of RCU priority boosting.
444
445 Each character is replaced with "." if the corresponding
446 condition does not hold.
447
448o "kt" is the state of the RCU priority-boosting kernel
449 thread associated with the corresponding rcu_node structure.
450 The state can be one of the following:
451
452 "S" The kernel thread is stopped, in other words, all
453 CPUs corresponding to this rcu_node structure are
454 offline.
455
456 "R" The kernel thread is running.
457
458 "W" The kernel thread is waiting because there is no work
459 for it to do.
460
461 "Y" The kernel thread is yielding to avoid hogging CPU.
462
463 "?" Unknown value, indicates a bug.
464
465o "ntb" is the number of tasks boosted.
466
467o "neb" is the number of tasks boosted in order to complete an
468 expedited grace period.
469
470o "nnb" is the number of tasks boosted in order to complete a
471 normal (non-expedited) grace period. When boosting a task
472 that was blocking both an expedited and a normal grace period,
473 it is counted against the expedited total above.
474
475o "j" is the low-order 16 bits of the jiffies counter in
476 hexadecimal.
477
478o "bt" is the low-order 16 bits of the value that the jiffies
479 counter will have when we next start boosting, assuming that
480 the current grace period does not end beforehand. This is
481 also in hexadecimal.
482
483o "balk: nt" counts the number of times we didn't boost (in
484 other words, we balked) even though it was time to boost because
485 there were no blocked tasks to boost. This situation occurs
486 when there is one blocked task on one rcu_node structure and
487 none on some other rcu_node structure.
488
489o "egt" counts the number of times we balked because although
490 there were blocked tasks, none of them were blocking the
491 current grace period, whether expedited or otherwise.
492
493o "bt" counts the number of times we balked because boosting
494 had already been initiated for the current grace period.
495
496o "nb" counts the number of times we balked because there
497 was at least one task blocking the current non-expedited grace
498 period that never had blocked. If it is already running, it
499 just won't help to boost its priority!
500
501o "ny" counts the number of times we balked because it was
502 not yet time to start boosting.
503
504o "nos" counts the number of times we balked for other
505 reasons, e.g., the grace period ended first.
506
507
331CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats 508CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats
332 509
333These implementations of RCU provides a single debugfs file under the 510These implementations of RCU provides a single debugfs file under the
@@ -394,9 +571,9 @@ o "neb" is the number of expedited grace periods that have had
394o "nnb" is the number of normal grace periods that have had 571o "nnb" is the number of normal grace periods that have had
395 to resort to RCU priority boosting since boot. 572 to resort to RCU priority boosting since boot.
396 573
397o "j" is the low-order 12 bits of the jiffies counter in hexadecimal. 574o "j" is the low-order 16 bits of the jiffies counter in hexadecimal.
398 575
399o "bt" is the low-order 12 bits of the value that the jiffies counter 576o "bt" is the low-order 16 bits of the value that the jiffies counter
400 will have at the next time that boosting is scheduled to begin. 577 will have at the next time that boosting is scheduled to begin.
401 578
402o In the line beginning with "normal balk", the fields are as follows: 579o In the line beginning with "normal balk", the fields are as follows:
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index cfaac34c455..6ef692667e2 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -849,6 +849,37 @@ All: lockdep-checked RCU-protected pointer access
849See the comment headers in the source code (or the docbook generated 849See the comment headers in the source code (or the docbook generated
850from them) for more information. 850from them) for more information.
851 851
852However, given that there are no fewer than four families of RCU APIs
853in the Linux kernel, how do you choose which one to use? The following
854list can be helpful:
855
856a. Will readers need to block? If so, you need SRCU.
857
858b. What about the -rt patchset? If readers would need to block
859 in an non-rt kernel, you need SRCU. If readers would block
860 in a -rt kernel, but not in a non-rt kernel, SRCU is not
861 necessary.
862
863c. Do you need to treat NMI handlers, hardirq handlers,
864 and code segments with preemption disabled (whether
865 via preempt_disable(), local_irq_save(), local_bh_disable(),
866 or some other mechanism) as if they were explicit RCU readers?
867 If so, you need RCU-sched.
868
869d. Do you need RCU grace periods to complete even in the face
870 of softirq monopolization of one or more of the CPUs? For
871 example, is your code subject to network-based denial-of-service
872 attacks? If so, you need RCU-bh.
873
874e. Is your workload too update-intensive for normal use of
875 RCU, but inappropriate for other synchronization mechanisms?
876 If so, consider SLAB_DESTROY_BY_RCU. But please be careful!
877
878f. Otherwise, use RCU.
879
880Of course, this all assumes that you have determined that RCU is in fact
881the right tool for your job.
882
852 883
8538. ANSWERS TO QUICK QUIZZES 8848. ANSWERS TO QUICK QUIZZES
854 885
diff --git a/Documentation/SecurityBugs b/Documentation/SecurityBugs
index 26c3b3635d9..a660d494c8e 100644
--- a/Documentation/SecurityBugs
+++ b/Documentation/SecurityBugs
@@ -28,7 +28,7 @@ expect these delays to be short, measurable in days, not weeks or months.
28A disclosure date is negotiated by the security team working with the 28A disclosure date is negotiated by the security team working with the
29bug submitter as well as vendors. However, the kernel security team 29bug submitter as well as vendors. However, the kernel security team
30holds the final say when setting a disclosure date. The timeframe for 30holds the final say when setting a disclosure date. The timeframe for
31disclosure is from immediate (esp. if it's already publically known) 31disclosure is from immediate (esp. if it's already publicly known)
32to a few weeks. As a basic default policy, we expect report date to 32to a few weeks. As a basic default policy, we expect report date to
33disclosure date to be on the order of 7 days. 33disclosure date to be on the order of 7 days.
34 34
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers
index 38d2aab59ca..319baa8b60d 100644
--- a/Documentation/SubmittingDrivers
+++ b/Documentation/SubmittingDrivers
@@ -101,7 +101,7 @@ PM support: Since Linux is used on many portable and desktop systems, your
101 complete overview of the power management issues related to 101 complete overview of the power management issues related to
102 drivers see Documentation/power/devices.txt . 102 drivers see Documentation/power/devices.txt .
103 103
104Control: In general if there is active maintainance of a driver by 104Control: In general if there is active maintenance of a driver by
105 the author then patches will be redirected to them unless 105 the author then patches will be redirected to them unless
106 they are totally obvious and without need of checking. 106 they are totally obvious and without need of checking.
107 If you want to be the contact and update point for the 107 If you want to be the contact and update point for the
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 689e2371095..569f3532e13 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -714,10 +714,11 @@ Jeff Garzik, "Linux kernel patch submission format".
714 <http://linux.yyz.us/patch-format.html> 714 <http://linux.yyz.us/patch-format.html>
715 715
716Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". 716Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".
717 <http://www.kroah.com/log/2005/03/31/> 717 <http://www.kroah.com/log/linux/maintainer.html>
718 <http://www.kroah.com/log/2005/07/08/> 718 <http://www.kroah.com/log/linux/maintainer-02.html>
719 <http://www.kroah.com/log/2005/10/19/> 719 <http://www.kroah.com/log/linux/maintainer-03.html>
720 <http://www.kroah.com/log/2006/01/11/> 720 <http://www.kroah.com/log/linux/maintainer-04.html>
721 <http://www.kroah.com/log/linux/maintainer-05.html>
721 722
722NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! 723NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!
723 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> 724 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
@@ -729,7 +730,7 @@ Linus Torvalds's mail on the canonical patch format:
729 <http://lkml.org/lkml/2005/4/7/183> 730 <http://lkml.org/lkml/2005/4/7/183>
730 731
731Andi Kleen, "On submitting kernel patches" 732Andi Kleen, "On submitting kernel patches"
732 Some strategies to get difficult or controversal changes in. 733 Some strategies to get difficult or controversial changes in.
733 http://halobates.de/on-submitting-patches.pdf 734 http://halobates.de/on-submitting-patches.pdf
734 735
735-- 736--
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index e9c77788a39..f6318f6d7ba 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -177,6 +177,8 @@ static int get_family_id(int sd)
177 rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY, 177 rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
178 CTRL_ATTR_FAMILY_NAME, (void *)name, 178 CTRL_ATTR_FAMILY_NAME, (void *)name,
179 strlen(TASKSTATS_GENL_NAME)+1); 179 strlen(TASKSTATS_GENL_NAME)+1);
180 if (rc < 0)
181 return 0; /* sendto() failure? */
180 182
181 rep_len = recv(sd, &ans, sizeof(ans), 0); 183 rep_len = recv(sd, &ans, sizeof(ans), 0);
182 if (ans.n.nlmsg_type == NLMSG_ERROR || 184 if (ans.n.nlmsg_type == NLMSG_ERROR ||
@@ -191,30 +193,37 @@ static int get_family_id(int sd)
191 return id; 193 return id;
192} 194}
193 195
196#define average_ms(t, c) (t / 1000000ULL / (c ? c : 1))
197
194static void print_delayacct(struct taskstats *t) 198static void print_delayacct(struct taskstats *t)
195{ 199{
196 printf("\n\nCPU %15s%15s%15s%15s\n" 200 printf("\n\nCPU %15s%15s%15s%15s%15s\n"
197 " %15llu%15llu%15llu%15llu\n" 201 " %15llu%15llu%15llu%15llu%15.3fms\n"
198 "IO %15s%15s\n" 202 "IO %15s%15s%15s\n"
199 " %15llu%15llu\n" 203 " %15llu%15llu%15llums\n"
200 "SWAP %15s%15s\n" 204 "SWAP %15s%15s%15s\n"
201 " %15llu%15llu\n" 205 " %15llu%15llu%15llums\n"
202 "RECLAIM %12s%15s\n" 206 "RECLAIM %12s%15s%15s\n"
203 " %15llu%15llu\n", 207 " %15llu%15llu%15llums\n",
204 "count", "real total", "virtual total", "delay total", 208 "count", "real total", "virtual total",
209 "delay total", "delay average",
205 (unsigned long long)t->cpu_count, 210 (unsigned long long)t->cpu_count,
206 (unsigned long long)t->cpu_run_real_total, 211 (unsigned long long)t->cpu_run_real_total,
207 (unsigned long long)t->cpu_run_virtual_total, 212 (unsigned long long)t->cpu_run_virtual_total,
208 (unsigned long long)t->cpu_delay_total, 213 (unsigned long long)t->cpu_delay_total,
209 "count", "delay total", 214 average_ms((double)t->cpu_delay_total, t->cpu_count),
215 "count", "delay total", "delay average",
210 (unsigned long long)t->blkio_count, 216 (unsigned long long)t->blkio_count,
211 (unsigned long long)t->blkio_delay_total, 217 (unsigned long long)t->blkio_delay_total,
212 "count", "delay total", 218 average_ms(t->blkio_delay_total, t->blkio_count),
219 "count", "delay total", "delay average",
213 (unsigned long long)t->swapin_count, 220 (unsigned long long)t->swapin_count,
214 (unsigned long long)t->swapin_delay_total, 221 (unsigned long long)t->swapin_delay_total,
215 "count", "delay total", 222 average_ms(t->swapin_delay_total, t->swapin_count),
223 "count", "delay total", "delay average",
216 (unsigned long long)t->freepages_count, 224 (unsigned long long)t->freepages_count,
217 (unsigned long long)t->freepages_delay_total); 225 (unsigned long long)t->freepages_delay_total,
226 average_ms(t->freepages_delay_total, t->freepages_count));
218} 227}
219 228
220static void task_context_switch_counts(struct taskstats *t) 229static void task_context_switch_counts(struct taskstats *t)
@@ -433,8 +442,6 @@ int main(int argc, char *argv[])
433 } 442 }
434 443
435 do { 444 do {
436 int i;
437
438 rep_len = recv(nl_sd, &msg, sizeof(msg), 0); 445 rep_len = recv(nl_sd, &msg, sizeof(msg), 0);
439 PRINTF("received %d bytes\n", rep_len); 446 PRINTF("received %d bytes\n", rep_len);
440 447
@@ -459,7 +466,6 @@ int main(int argc, char *argv[])
459 466
460 na = (struct nlattr *) GENLMSG_DATA(&msg); 467 na = (struct nlattr *) GENLMSG_DATA(&msg);
461 len = 0; 468 len = 0;
462 i = 0;
463 while (len < rep_len) { 469 while (len < rep_len) {
464 len += NLA_ALIGN(na->nla_len); 470 len += NLA_ALIGN(na->nla_len);
465 switch (na->nla_type) { 471 switch (na->nla_type) {
diff --git a/Documentation/acpi/apei/output_format.txt b/Documentation/acpi/apei/output_format.txt
index 9146952c612..0c49c197c47 100644
--- a/Documentation/acpi/apei/output_format.txt
+++ b/Documentation/acpi/apei/output_format.txt
@@ -92,6 +92,11 @@ vendor_id: <integer>, device_id: <integer>
92class_code: <integer>] 92class_code: <integer>]
93[serial number: <integer>, <integer>] 93[serial number: <integer>, <integer>]
94[bridge: secondary_status: <integer>, control: <integer>] 94[bridge: secondary_status: <integer>, control: <integer>]
95[aer_status: <integer>, aer_mask: <integer>
96<aer status string>
97[aer_uncor_severity: <integer>]
98aer_layer=<aer layer string>, aer_agent=<aer agent string>
99aer_tlp_header: <integer> <integer> <integer> <integer>]
95 100
96<pcie port type string>* := PCIe end point | legacy PCI end point | \ 101<pcie port type string>* := PCIe end point | legacy PCI end point | \
97unknown | unknown | root port | upstream switch port | \ 102unknown | unknown | root port | upstream switch port | \
@@ -99,6 +104,26 @@ downstream switch port | PCIe to PCI/PCI-X bridge | \
99PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \ 104PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \
100root complex event collector 105root complex event collector
101 106
107if section severity is fatal or recoverable
108<aer status string># :=
109unknown | unknown | unknown | unknown | Data Link Protocol | \
110unknown | unknown | unknown | unknown | unknown | unknown | unknown | \
111Poisoned TLP | Flow Control Protocol | Completion Timeout | \
112Completer Abort | Unexpected Completion | Receiver Overflow | \
113Malformed TLP | ECRC | Unsupported Request
114else
115<aer status string># :=
116Receiver Error | unknown | unknown | unknown | unknown | unknown | \
117Bad TLP | Bad DLLP | RELAY_NUM Rollover | unknown | unknown | unknown | \
118Replay Timer Timeout | Advisory Non-Fatal
119fi
120
121<aer layer string> :=
122Physical Layer | Data Link Layer | Transaction Layer
123
124<aer agent string> :=
125Receiver ID | Requester ID | Completer ID | Transmitter ID
126
102Where, [] designate corresponding content is optional 127Where, [] designate corresponding content is optional
103 128
104All <field string> description with * has the following format: 129All <field string> description with * has the following format:
diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting
index 76850295af8..4e686a2ed91 100644
--- a/Documentation/arm/Booting
+++ b/Documentation/arm/Booting
@@ -65,13 +65,19 @@ looks at the connected hardware is beyond the scope of this document.
65The boot loader must ultimately be able to provide a MACH_TYPE_xxx 65The boot loader must ultimately be able to provide a MACH_TYPE_xxx
66value to the kernel. (see linux/arch/arm/tools/mach-types). 66value to the kernel. (see linux/arch/arm/tools/mach-types).
67 67
68 684. Setup boot data
694. Setup the kernel tagged list 69------------------
70-------------------------------
71 70
72Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED 71Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED
73New boot loaders: MANDATORY 72New boot loaders: MANDATORY
74 73
74The boot loader must provide either a tagged list or a dtb image for
75passing configuration data to the kernel. The physical address of the
76boot data is passed to the kernel in register r2.
77
784a. Setup the kernel tagged list
79--------------------------------
80
75The boot loader must create and initialise the kernel tagged list. 81The boot loader must create and initialise the kernel tagged list.
76A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE. 82A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE.
77The ATAG_CORE tag may or may not be empty. An empty ATAG_CORE tag 83The ATAG_CORE tag may or may not be empty. An empty ATAG_CORE tag
@@ -101,6 +107,24 @@ The tagged list must be placed in a region of memory where neither
101the kernel decompressor nor initrd 'bootp' program will overwrite 107the kernel decompressor nor initrd 'bootp' program will overwrite
102it. The recommended placement is in the first 16KiB of RAM. 108it. The recommended placement is in the first 16KiB of RAM.
103 109
1104b. Setup the device tree
111-------------------------
112
113The boot loader must load a device tree image (dtb) into system ram
114at a 64bit aligned address and initialize it with the boot data. The
115dtb format is documented in Documentation/devicetree/booting-without-of.txt.
116The kernel will look for the dtb magic value of 0xd00dfeed at the dtb
117physical address to determine if a dtb has been passed instead of a
118tagged list.
119
120The boot loader must pass at a minimum the size and location of the
121system memory, and the root filesystem location. The dtb must be
122placed in a region of memory where the kernel decompressor will not
123overwrite it. The recommended placement is in the first 16KiB of RAM
124with the caveat that it may not be located at physical address 0 since
125the kernel interprets a value of 0 in r2 to mean neither a tagged list
126nor a dtb were passed.
127
1045. Calling the kernel image 1285. Calling the kernel image
105--------------------------- 129---------------------------
106 130
@@ -125,7 +149,8 @@ In either case, the following conditions must be met:
125- CPU register settings 149- CPU register settings
126 r0 = 0, 150 r0 = 0,
127 r1 = machine type number discovered in (3) above. 151 r1 = machine type number discovered in (3) above.
128 r2 = physical address of tagged list in system RAM. 152 r2 = physical address of tagged list in system RAM, or
153 physical address of device tree block (dtb) in system RAM
129 154
130- CPU mode 155- CPU mode
131 All forms of interrupts must be disabled (IRQs and FIQs) 156 All forms of interrupts must be disabled (IRQs and FIQs)
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
index 133c5fa6c7a..7b9351f2f55 100644
--- a/Documentation/arm/IXP4xx
+++ b/Documentation/arm/IXP4xx
@@ -36,7 +36,7 @@ Linux currently supports the following features on the IXP4xx chips:
36- Timers (watchdog, OS) 36- Timers (watchdog, OS)
37 37
38The following components of the chips are not supported by Linux and 38The following components of the chips are not supported by Linux and
39require the use of Intel's propietary CSR softare: 39require the use of Intel's proprietary CSR softare:
40 40
41- USB device interface 41- USB device interface
42- Network interfaces (HSS, Utopia, NPEs, etc) 42- Network interfaces (HSS, Utopia, NPEs, etc)
@@ -47,7 +47,7 @@ software from:
47 47
48 http://developer.intel.com/design/network/products/npfamily/ixp425.htm 48 http://developer.intel.com/design/network/products/npfamily/ixp425.htm
49 49
50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY 50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY
51SOFTWARE. 51SOFTWARE.
52 52
53There are several websites that provide directions/pointers on using 53There are several websites that provide directions/pointers on using
diff --git a/Documentation/arm/SH-Mobile/Makefile b/Documentation/arm/SH-Mobile/Makefile
new file mode 100644
index 00000000000..8771d832cf8
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/Makefile
@@ -0,0 +1,8 @@
1BIN := vrl4
2
3.PHONY: all
4all: $(BIN)
5
6.PHONY: clean
7clean:
8 rm -f *.o $(BIN)
diff --git a/Documentation/arm/SH-Mobile/vrl4.c b/Documentation/arm/SH-Mobile/vrl4.c
new file mode 100644
index 00000000000..e8a191358ad
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/vrl4.c
@@ -0,0 +1,169 @@
1/*
2 * vrl4 format generator
3 *
4 * Copyright (C) 2010 Simon Horman
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11/*
12 * usage: vrl4 < zImage > out
13 * dd if=out of=/dev/sdx bs=512 seek=1 # Write the image to sector 1
14 *
15 * Reads a zImage from stdin and writes a vrl4 image to stdout.
16 * In practice this means writing a padded vrl4 header to stdout followed
17 * by the zImage.
18 *
19 * The padding places the zImage at ALIGN bytes into the output.
20 * The vrl4 uses ALIGN + START_BASE as the start_address.
21 * This is where the mask ROM will jump to after verifying the header.
22 *
23 * The header sets copy_size to min(sizeof(zImage), MAX_BOOT_PROG_LEN) + ALIGN.
24 * That is, the mask ROM will load the padded header (ALIGN bytes)
25 * And then MAX_BOOT_PROG_LEN bytes of the image, or the entire image,
26 * whichever is smaller.
27 *
28 * The zImage is not modified in any way.
29 */
30
31#define _BSD_SOURCE
32#include <endian.h>
33#include <unistd.h>
34#include <stdint.h>
35#include <stdio.h>
36#include <errno.h>
37
38struct hdr {
39 uint32_t magic1;
40 uint32_t reserved1;
41 uint32_t magic2;
42 uint32_t reserved2;
43 uint16_t copy_size;
44 uint16_t boot_options;
45 uint32_t reserved3;
46 uint32_t start_address;
47 uint32_t reserved4;
48 uint32_t reserved5;
49 char reserved6[308];
50};
51
52#define DECLARE_HDR(h) \
53 struct hdr (h) = { \
54 .magic1 = htole32(0xea000000), \
55 .reserved1 = htole32(0x56), \
56 .magic2 = htole32(0xe59ff008), \
57 .reserved3 = htole16(0x1) }
58
59/* Align to 512 bytes, the MMCIF sector size */
60#define ALIGN_BITS 9
61#define ALIGN (1 << ALIGN_BITS)
62
63#define START_BASE 0xe55b0000
64
65/*
66 * With an alignment of 512 the header uses the first sector.
67 * There is a 128 sector (64kbyte) limit on the data loaded by the mask ROM.
68 * So there are 127 sectors left for the boot programme. But in practice
69 * Only a small portion of a zImage is needed, 16 sectors should be more
70 * than enough.
71 *
72 * Note that this sets how much of the zImage is copied by the mask ROM.
73 * The entire zImage is present after the header and is loaded
74 * by the code in the boot program (which is the first portion of the zImage).
75 */
76#define MAX_BOOT_PROG_LEN (16 * 512)
77
78#define ROUND_UP(x) ((x + ALIGN - 1) & ~(ALIGN - 1))
79
80ssize_t do_read(int fd, void *buf, size_t count)
81{
82 size_t offset = 0;
83 ssize_t l;
84
85 while (offset < count) {
86 l = read(fd, buf + offset, count - offset);
87 if (!l)
88 break;
89 if (l < 0) {
90 if (errno == EAGAIN || errno == EWOULDBLOCK)
91 continue;
92 perror("read");
93 return -1;
94 }
95 offset += l;
96 }
97
98 return offset;
99}
100
101ssize_t do_write(int fd, const void *buf, size_t count)
102{
103 size_t offset = 0;
104 ssize_t l;
105
106 while (offset < count) {
107 l = write(fd, buf + offset, count - offset);
108 if (l < 0) {
109 if (errno == EAGAIN || errno == EWOULDBLOCK)
110 continue;
111 perror("write");
112 return -1;
113 }
114 offset += l;
115 }
116
117 return offset;
118}
119
120ssize_t write_zero(int fd, size_t len)
121{
122 size_t i = len;
123
124 while (i--) {
125 const char x = 0;
126 if (do_write(fd, &x, 1) < 0)
127 return -1;
128 }
129
130 return len;
131}
132
133int main(void)
134{
135 DECLARE_HDR(hdr);
136 char boot_program[MAX_BOOT_PROG_LEN];
137 size_t aligned_hdr_len, alligned_prog_len;
138 ssize_t prog_len;
139
140 prog_len = do_read(0, boot_program, sizeof(boot_program));
141 if (prog_len <= 0)
142 return -1;
143
144 aligned_hdr_len = ROUND_UP(sizeof(hdr));
145 hdr.start_address = htole32(START_BASE + aligned_hdr_len);
146 alligned_prog_len = ROUND_UP(prog_len);
147 hdr.copy_size = htole16(aligned_hdr_len + alligned_prog_len);
148
149 if (do_write(1, &hdr, sizeof(hdr)) < 0)
150 return -1;
151 if (write_zero(1, aligned_hdr_len - sizeof(hdr)) < 0)
152 return -1;
153
154 if (do_write(1, boot_program, prog_len) < 0)
155 return 1;
156
157 /* Write out the rest of the kernel */
158 while (1) {
159 prog_len = do_read(0, boot_program, sizeof(boot_program));
160 if (prog_len < 0)
161 return 1;
162 if (prog_len == 0)
163 break;
164 if (do_write(1, boot_program, prog_len) < 0)
165 return 1;
166 }
167
168 return 0;
169}
diff --git a/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt b/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt
new file mode 100644
index 00000000000..efff8ae2713
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt
@@ -0,0 +1,29 @@
1ROM-able zImage boot from MMC
2-----------------------------
3
4An ROM-able zImage compiled with ZBOOT_ROM_MMCIF may be written to MMC and
5SuperH Mobile ARM will to boot directly from the MMCIF hardware block.
6
7This is achieved by the mask ROM loading the first portion of the image into
8MERAM and then jumping to it. This portion contains loader code which
9copies the entire image to SDRAM and jumps to it. From there the zImage
10boot code proceeds as normal, uncompressing the image into its final
11location and then jumping to it.
12
13This code has been tested on an AP4EB board using the developer 1A eMMC
14boot mode which is configured using the following jumper settings.
15The board used for testing required a patched mask ROM in order for
16this mode to function.
17
18 8 7 6 5 4 3 2 1
19 x|x|x|x|x| |x|
20S4 -+-+-+-+-+-+-+-
21 | | | | |x| |x on
22
23The zImage must be written to the MMC card at sector 1 (512 bytes) in
24vrl4 format. A utility vrl4 is supplied to accomplish this.
25
26e.g.
27 vrl4 < zImage | dd of=/dev/sdX bs=512 seek=1
28
29A dual-voltage MMC 4.0 card was used for testing.
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
index 7edd0e2e6c5..1ca63b3e563 100644
--- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
@@ -116,7 +116,7 @@ Configuration
116 Allows the entire memory to be checksummed before and after the 116 Allows the entire memory to be checksummed before and after the
117 suspend to see if there has been any corruption of the contents. 117 suspend to see if there has been any corruption of the contents.
118 118
119 Note, the time to calculate the CRC is dependant on the CPU speed 119 Note, the time to calculate the CRC is dependent on the CPU speed
120 and the size of memory. For an 64Mbyte RAM area on an 200MHz 120 and the size of memory. For an 64Mbyte RAM area on an 200MHz
121 S3C2410, this can take approximately 4 seconds to complete. 121 S3C2410, this can take approximately 4 seconds to complete.
122 122
diff --git a/Documentation/arm/Samsung/GPIO.txt b/Documentation/arm/Samsung/GPIO.txt
index 05850c62abe..513f2562c1a 100644
--- a/Documentation/arm/Samsung/GPIO.txt
+++ b/Documentation/arm/Samsung/GPIO.txt
@@ -5,7 +5,7 @@ Introduction
5------------ 5------------
6 6
7This outlines the Samsung GPIO implementation and the architecture 7This outlines the Samsung GPIO implementation and the architecture
8specfic calls provided alongisde the drivers/gpio core. 8specific calls provided alongisde the drivers/gpio core.
9 9
10 10
11S3C24XX (Legacy) 11S3C24XX (Legacy)
diff --git a/Documentation/arm/Samsung/Overview.txt b/Documentation/arm/Samsung/Overview.txt
index c3094ea51aa..658abb258ce 100644
--- a/Documentation/arm/Samsung/Overview.txt
+++ b/Documentation/arm/Samsung/Overview.txt
@@ -14,7 +14,6 @@ Introduction
14 - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list 14 - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list
15 - S3C64XX: S3C6400 and S3C6410 15 - S3C64XX: S3C6400 and S3C6410
16 - S5P6440 16 - S5P6440
17 - S5P6442
18 - S5PC100 17 - S5PC100
19 - S5PC110 / S5PV210 18 - S5PC110 / S5PV210
20 19
@@ -36,7 +35,6 @@ Configuration
36 unifying all the SoCs into one kernel. 35 unifying all the SoCs into one kernel.
37 36
38 s5p6440_defconfig - S5P6440 specific default configuration 37 s5p6440_defconfig - S5P6440 specific default configuration
39 s5p6442_defconfig - S5P6442 specific default configuration
40 s5pc100_defconfig - S5PC100 specific default configuration 38 s5pc100_defconfig - S5PC100 specific default configuration
41 s5pc110_defconfig - S5PC110 specific default configuration 39 s5pc110_defconfig - S5PC110 specific default configuration
42 s5pv210_defconfig - S5PV210 specific default configuration 40 s5pv210_defconfig - S5PV210 specific default configuration
diff --git a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen b/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen
deleted file mode 100644
index dc460f05564..00000000000
--- a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen
+++ /dev/null
@@ -1,61 +0,0 @@
1README on the ADC/Touchscreen Controller
2========================================
3
4The LH79524 and LH7A404 include a built-in Analog to Digital
5controller (ADC) that is used to process input from a touchscreen.
6The driver only implements a four-wire touch panel protocol.
7
8The touchscreen driver is maintenance free except for the pen-down or
9touch threshold. Some resistive displays and board combinations may
10require tuning of this threshold. The driver exposes some of its
11internal state in the sys filesystem. If the kernel is configured
12with it, CONFIG_SYSFS, and sysfs is mounted at /sys, there will be a
13directory
14
15 /sys/devices/platform/adc-lh7.0
16
17containing these files.
18
19 -r--r--r-- 1 root root 4096 Jan 1 00:00 samples
20 -rw-r--r-- 1 root root 4096 Jan 1 00:00 threshold
21 -r--r--r-- 1 root root 4096 Jan 1 00:00 threshold_range
22
23The threshold is the current touch threshold. It defaults to 750 on
24most targets.
25
26 # cat threshold
27 750
28
29The threshold_range contains the range of valid values for the
30threshold. Values outside of this range will be silently ignored.
31
32 # cat threshold_range
33 0 1023
34
35To change the threshold, write a value to the threshold file.
36
37 # echo 500 > threshold
38 # cat threshold
39 500
40
41The samples file contains the most recently sampled values from the
42ADC. There are 12. Below are typical of the last sampled values when
43the pen has been released. The first two and last two samples are for
44detecting whether or not the pen is down. The third through sixth are
45X coordinate samples. The seventh through tenth are Y coordinate
46samples.
47
48 # cat samples
49 1023 1023 0 0 0 0 530 529 530 529 1023 1023
50
51To determine a reasonable threshold, press on the touch panel with an
52appropriate stylus and read the values from samples.
53
54 # cat samples
55 1023 676 92 103 101 102 855 919 922 922 1023 679
56
57The first and eleventh samples are discarded. Thus, the important
58values are the second and twelfth which are used to determine if the
59pen is down. When both are below the threshold, the driver registers
60that the pen is down. When either is above the threshold, it
61registers then pen is up.
diff --git a/Documentation/arm/Sharp-LH/CompactFlash b/Documentation/arm/Sharp-LH/CompactFlash
deleted file mode 100644
index 8616d877df9..00000000000
--- a/Documentation/arm/Sharp-LH/CompactFlash
+++ /dev/null
@@ -1,32 +0,0 @@
1README on the Compact Flash for Card Engines
2============================================
3
4There are three challenges in supporting the CF interface of the Card
5Engines. First, every IO operation must be followed with IO to
6another memory region. Second, the slot is wired for one-to-one
7address mapping *and* it is wired for 16 bit access only. Second, the
8interrupt request line from the CF device isn't wired.
9
10The IOBARRIER issue is covered in README.IOBARRIER. This isn't an
11onerous problem. Enough said here.
12
13The addressing issue is solved in the
14arch/arm/mach-lh7a40x/ide-lpd7a40x.c file with some awkward
15work-arounds. We implement a special SELECT_DRIVE routine that is
16called before the IDE driver performs its own SELECT_DRIVE. Our code
17recognizes that the SELECT register cannot be modified without also
18writing a command. It send an IDLE_IMMEDIATE command on selecting a
19drive. The function also prevents drive select to the slave drive
20since there can be only one. The awkward part is that the IDE driver,
21even though we have a select procedure, also attempts to change the
22drive by writing directly the SELECT register. This attempt is
23explicitly blocked by the OUTB function--not pretty, but effective.
24
25The lack of interrupts is a more serious problem. Even though the CF
26card is fast when compared to a normal IDE device, we don't know that
27the CF is really flash. A user could use one of the very small hard
28drives being shipped with a CF interface. The IDE code includes a
29check for interfaces that lack an IRQ. In these cases, submitting a
30command to the IDE controller is followed by a call to poll for
31completion. If the device isn't immediately ready, it schedules a
32timer to poll again later.
diff --git a/Documentation/arm/Sharp-LH/IOBarrier b/Documentation/arm/Sharp-LH/IOBarrier
deleted file mode 100644
index 2e953e228f4..00000000000
--- a/Documentation/arm/Sharp-LH/IOBarrier
+++ /dev/null
@@ -1,45 +0,0 @@
1README on the IOBARRIER for CardEngine IO
2=========================================
3
4Due to an unfortunate oversight when the Card Engines were designed,
5the signals that control access to some peripherals, most notably the
6SMC91C9111 ethernet controller, are not properly handled.
7
8The symptom is that some back to back IO with the peripheral returns
9unreliable data. With the SMC chip, you'll see errors about the bank
10register being 'screwed'.
11
12The cause is that the AEN signal to the SMC chip does not transition
13for every memory access. It is driven through the CPLD from the CS7
14line of the CPU's static memory controller which is optimized to
15eliminate unnecessary transitions. Yet, the SMC requires a transition
16for every write access. The Sharp website has more information about
17the effect this power-conserving feature has on peripheral
18interfacing.
19
20The solution is to follow every write access to the SMC chip with an
21access to another memory region that will force the CPU to release the
22chip select line. It is important to guarantee that this access
23forces the CPU off-chip. We map a page of SDRAM as if it were an
24uncacheable IO device and read from it after every SMC IO write
25operation.
26
27 SMC IO
28 BARRIER IO
29
30Only this sequence is important. It does not matter that there is no
31BARRIER IO before the access to the SMC chip because the AEN latch
32only needs occurs after the SMC IO write cycle. The routines that
33implement this work-around make an additional concession which is to
34disable interrupts during the IO sequence. Other hardware devices
35(the LogicPD CPLD) have registers in the same physical memory
36region as the SMC chip. An interrupt might allow an access to one of
37those registers while SMC IO is being performed.
38
39You might be tempted to think that we have to access another device
40attached to the static memory controller, but the empirical evidence
41indicates that this is not so. Mapping 0x00000000 (flash) and
420xc0000000 (SDRAM) appear to have the same effect. Using SDRAM seems
43to be faster. Choosing to access an undecoded memory region is not
44desirable as there is no way to know how that chip select will be used
45in the future.
diff --git a/Documentation/arm/Sharp-LH/KEV7A400 b/Documentation/arm/Sharp-LH/KEV7A400
deleted file mode 100644
index be32b14cd53..00000000000
--- a/Documentation/arm/Sharp-LH/KEV7A400
+++ /dev/null
@@ -1,8 +0,0 @@
1README on Implementing Linux for Sharp's KEV7a400
2=================================================
3
4This product has been discontinued by Sharp. For the time being, the
5partially implemented code remains in the kernel. At some point in
6the future, either the code will be finished or it will be removed
7completely. This depends primarily on how many of the development
8boards are in the field.
diff --git a/Documentation/arm/Sharp-LH/LCDPanels b/Documentation/arm/Sharp-LH/LCDPanels
deleted file mode 100644
index fb1b21c2f2f..00000000000
--- a/Documentation/arm/Sharp-LH/LCDPanels
+++ /dev/null
@@ -1,59 +0,0 @@
1README on the LCD Panels
2========================
3
4Configuration options for several LCD panels, available from Logic PD,
5are included in the kernel source. This README will help you
6understand the configuration data and give you some guidance for
7adding support for other panels if you wish.
8
9
10lcd-panels.h
11------------
12
13There is no way, at present, to detect which panel is attached to the
14system at runtime. Thus the kernel configuration is static. The file
15arch/arm/mach-ld7a40x/lcd-panels.h (or similar) defines all of the
16panel specific parameters.
17
18It should be possible for this data to be shared among several device
19families. The current layout may be insufficiently general, but it is
20amenable to improvement.
21
22
23PIXEL_CLOCK
24-----------
25
26The panel data sheets will give a range of acceptable pixel clocks.
27The fundamental LCDCLK input frequency is divided down by a PCD
28constant in field '.tim2'. It may happen that it is impossible to set
29the pixel clock within this range. A clock which is too slow will
30tend to flicker. For the highest quality image, set the clock as high
31as possible.
32
33
34MARGINS
35-------
36
37These values may be difficult to glean from the panel data sheet. In
38the case of the Sharp panels, the upper margin is explicitly called
39out as a specific number of lines from the top of the frame. The
40other values may not matter as much as the panels tend to
41automatically center the image.
42
43
44Sync Sense
45----------
46
47The sense of the hsync and vsync pulses may be called out in the data
48sheet. On one panel, the sense of these pulses determine the height
49of the visible region on the panel. Most of the Sharp panels use
50negative sense sync pulses set by the TIM2_IHS and TIM2_IVS bits in
51'.tim2'.
52
53
54Pel Layout
55----------
56
57The Sharp color TFT panels are all configured for 16 bit direct color
58modes. The amba-lcd driver sets the pel mode to 565 for 5 bits of
59each red and blue and 6 bits of green.
diff --git a/Documentation/arm/Sharp-LH/LPD7A400 b/Documentation/arm/Sharp-LH/LPD7A400
deleted file mode 100644
index 3275b453bfd..00000000000
--- a/Documentation/arm/Sharp-LH/LPD7A400
+++ /dev/null
@@ -1,15 +0,0 @@
1README on Implementing Linux for the Logic PD LPD7A400-10
2=========================================================
3
4- CPLD memory mapping
5
6 The board designers chose to use high address lines for controlling
7 access to the CPLD registers. It turns out to be a big waste
8 because we're using an MMU and must map IO space into virtual
9 memory. The result is that we have to make a mapping for every
10 register.
11
12- Serial Console
13
14 It may be OK not to use the serial console option if the user passes
15 the console device name to the kernel. This deserves some exploration.
diff --git a/Documentation/arm/Sharp-LH/LPD7A40X b/Documentation/arm/Sharp-LH/LPD7A40X
deleted file mode 100644
index 8c29a27e208..00000000000
--- a/Documentation/arm/Sharp-LH/LPD7A40X
+++ /dev/null
@@ -1,16 +0,0 @@
1README on Implementing Linux for the Logic PD LPD7A40X-10
2=========================================================
3
4- CPLD memory mapping
5
6 The board designers chose to use high address lines for controlling
7 access to the CPLD registers. It turns out to be a big waste
8 because we're using an MMU and must map IO space into virtual
9 memory. The result is that we have to make a mapping for every
10 register.
11
12- Serial Console
13
14 It may be OK not to use the serial console option if the user passes
15 the console device name to the kernel. This deserves some exploration.
16
diff --git a/Documentation/arm/Sharp-LH/SDRAM b/Documentation/arm/Sharp-LH/SDRAM
deleted file mode 100644
index 93ddc23c2fa..00000000000
--- a/Documentation/arm/Sharp-LH/SDRAM
+++ /dev/null
@@ -1,51 +0,0 @@
1README on the SDRAM Controller for the LH7a40X
2==============================================
3
4The standard configuration for the SDRAM controller generates a sparse
5memory array. The precise layout is determined by the SDRAM chips. A
6default kernel configuration assembles the discontiguous memory
7regions into separate memory nodes via the NUMA (Non-Uniform Memory
8Architecture) facilities. In this default configuration, the kernel
9is forgiving about the precise layout. As long as it is given an
10accurate picture of available memory by the bootloader the kernel will
11execute correctly.
12
13The SDRC supports a mode where some of the chip select lines are
14swapped in order to make SDRAM look like a synchronous ROM. Setting
15this bit means that the RAM will present as a contiguous array. Some
16programmers prefer this to the discontiguous layout. Be aware that
17may be a penalty for this feature where some some configurations of
18memory are significantly reduced; i.e. 64MiB of RAM appears as only 32
19MiB.
20
21There are a couple of configuration options to override the default
22behavior. When the SROMLL bit is set and memory appears as a
23contiguous array, there is no reason to support NUMA.
24CONFIG_LH7A40X_CONTIGMEM disables NUMA support. When physical memory
25is discontiguous, the memory tables are organized such that there are
26two banks per nodes with a small gap between them. This layout wastes
27some kernel memory for page tables representing non-existent memory.
28CONFIG_LH7A40X_ONE_BANK_PER_NODE optimizes the node tables such that
29there are no gaps. These options control the low level organization
30of the memory management tables in ways that may prevent the kernel
31from booting or may cause the kernel to allocated excessively large
32page tables. Be warned. Only change these options if you know what
33you are doing. The default behavior is a reasonable compromise that
34will suit all users.
35
36--
37
38A typical 32MiB system with the default configuration options will
39find physical memory managed as follows.
40
41 node 0: 0xc0000000 4MiB
42 0xc1000000 4MiB
43 node 1: 0xc4000000 4MiB
44 0xc5000000 4MiB
45 node 2: 0xc8000000 4MiB
46 0xc9000000 4MiB
47 node 3: 0xcc000000 4MiB
48 0xcd000000 4MiB
49
50Setting CONFIG_LH7A40X_ONE_BANK_PER_NODE will put each bank into a
51separate node.
diff --git a/Documentation/arm/Sharp-LH/VectoredInterruptController b/Documentation/arm/Sharp-LH/VectoredInterruptController
deleted file mode 100644
index 23047e9861e..00000000000
--- a/Documentation/arm/Sharp-LH/VectoredInterruptController
+++ /dev/null
@@ -1,80 +0,0 @@
1README on the Vectored Interrupt Controller of the LH7A404
2==========================================================
3
4The 404 revision of the LH7A40X series comes with two vectored
5interrupts controllers. While the kernel does use some of the
6features of these devices, it is far from the purpose for which they
7were designed.
8
9When this README was written, the implementation of the VICs was in
10flux. It is possible that some details, especially with priorities,
11will change.
12
13The VIC support code is inspired by routines written by Sharp.
14
15
16Priority Control
17----------------
18
19The significant reason for using the VIC's vectoring is to control
20interrupt priorities. There are two tables in
21arch/arm/mach-lh7a40x/irq-lh7a404.c that look something like this.
22
23 static unsigned char irq_pri_vic1[] = { IRQ_GPIO3INTR, };
24 static unsigned char irq_pri_vic2[] = {
25 IRQ_T3UI, IRQ_GPIO7INTR,
26 IRQ_UART1INTR, IRQ_UART2INTR, IRQ_UART3INTR, };
27
28The initialization code reads these tables and inserts a vector
29address and enable for each indicated IRQ. Vectored interrupts have
30higher priority than non-vectored interrupts. So, on VIC1,
31IRQ_GPIO3INTR will be served before any other non-FIQ interrupt. Due
32to the way that the vectoring works, IRQ_T3UI is the next highest
33priority followed by the other vectored interrupts on VIC2. After
34that, the non-vectored interrupts are scanned in VIC1 then in VIC2.
35
36
37ISR
38---
39
40The interrupt service routine macro get_irqnr() in
41arch/arm/kernel/entry-armv.S scans the VICs for the next active
42interrupt. The vectoring makes this code somewhat larger than it was
43before using vectoring (refer to the LH7A400 implementation). In the
44case where an interrupt is vectored, the implementation will tend to
45be faster than the non-vectored version. However, the worst-case path
46is longer.
47
48It is worth noting that at present, there is no need to read
49VIC2_VECTADDR because the register appears to be shared between the
50controllers. The code is written such that if this changes, it ought
51to still work properly.
52
53
54Vector Addresses
55----------------
56
57The proper use of the vectoring hardware would jump to the ISR
58specified by the vectoring address. Linux isn't structured to take
59advantage of this feature, though it might be possible to change
60things to support it.
61
62In this implementation, the vectoring address is used to speed the
63search for the active IRQ. The address is coded such that the lowest
646 bits store the IRQ number for vectored interrupts. These numbers
65correspond to the bits in the interrupt status registers. IRQ zero is
66the lowest interrupt bit in VIC1. IRQ 32 is the lowest interrupt bit
67in VIC2. Because zero is a valid IRQ number and because we cannot
68detect whether or not there is a valid vectoring address if that
69address is zero, the eigth bit (0x100) is set for vectored interrupts.
70The address for IRQ 0x18 (VIC2) is 0x118. Only the ninth bit is set
71for the default handler on VIC1 and only the tenth bit is set for the
72default handler on VIC2.
73
74In other words.
75
76 0x000 - no active interrupt
77 0x1ii - vectored interrupt 0xii
78 0x2xx - unvectored interrupt on VIC1 (xx is don't care)
79 0x4xx - unvectored interrupt on VIC2 (xx is don't care)
80
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index ac4d4718712..3bd585b4492 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -12,7 +12,7 @@ Also, it should be made opaque such that any kind of cast to a normal
12C integer type will fail. Something like the following should 12C integer type will fail. Something like the following should
13suffice: 13suffice:
14 14
15 typedef struct { volatile int counter; } atomic_t; 15 typedef struct { int counter; } atomic_t;
16 16
17Historically, counter has been declared volatile. This is now discouraged. 17Historically, counter has been declared volatile. This is now discouraged.
18See Documentation/volatile-considered-harmful.txt for the complete rationale. 18See Documentation/volatile-considered-harmful.txt for the complete rationale.
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index b9a83dd2473..c6d84cfd2f5 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -497,7 +497,7 @@ The scatter gather list is in the form of an array of <page, offset, len>
497entries with their corresponding dma address mappings filled in at the 497entries with their corresponding dma address mappings filled in at the
498appropriate time. As an optimization, contiguous physical pages can be 498appropriate time. As an optimization, contiguous physical pages can be
499covered by a single entry where <page> refers to the first page and <len> 499covered by a single entry where <page> refers to the first page and <len>
500covers the range of pages (upto 16 contiguous pages could be covered this 500covers the range of pages (up to 16 contiguous pages could be covered this
501way). There is a helper routine (blk_rq_map_sg) which drivers can use to build 501way). There is a helper routine (blk_rq_map_sg) which drivers can use to build
502the sg list. 502the sg list.
503 503
@@ -565,7 +565,7 @@ struct request {
565 . 565 .
566 int tag; /* command tag associated with request */ 566 int tag; /* command tag associated with request */
567 void *special; /* same as before */ 567 void *special; /* same as before */
568 char *buffer; /* valid only for low memory buffers upto 568 char *buffer; /* valid only for low memory buffers up to
569 current_nr_sectors */ 569 current_nr_sectors */
570 . 570 .
571 . 571 .
@@ -963,11 +963,6 @@ elevator_dispatch_fn* fills the dispatch queue with ready requests.
963 963
964elevator_add_req_fn* called to add a new request into the scheduler 964elevator_add_req_fn* called to add a new request into the scheduler
965 965
966elevator_queue_empty_fn returns true if the merge queue is empty.
967 Drivers shouldn't use this, but rather check
968 if elv_next_request is NULL (without losing the
969 request if one exists!)
970
971elevator_former_req_fn 966elevator_former_req_fn
972elevator_latter_req_fn These return the request before or after the 967elevator_latter_req_fn These return the request before or after the
973 one specified in disk sort order. Used by the 968 one specified in disk sort order. Used by the
diff --git a/Documentation/blockdev/cciss.txt b/Documentation/blockdev/cciss.txt
index 89698e8df7d..c00c6a5ab21 100644
--- a/Documentation/blockdev/cciss.txt
+++ b/Documentation/blockdev/cciss.txt
@@ -169,3 +169,18 @@ is issued which positions the tape to a known position. Typically you
169must rewind the tape (by issuing "mt -f /dev/st0 rewind" for example) 169must rewind the tape (by issuing "mt -f /dev/st0 rewind" for example)
170before i/o can proceed again to a tape drive which was reset. 170before i/o can proceed again to a tape drive which was reset.
171 171
172There is a cciss_tape_cmds module parameter which can be used to make cciss
173allocate more commands for use by tape drives. Ordinarily only a few commands
174(6) are allocated for tape drives because tape drives are slow and
175infrequently used and the primary purpose of Smart Array controllers is to
176act as a RAID controller for disk drives, so the vast majority of commands
177are allocated for disk devices. However, if you have more than a few tape
178drives attached to a smart array, the default number of commands may not be
179enought (for example, if you have 8 tape drives, you could only rewind 6
180at one time with the default number of commands.) The cciss_tape_cmds module
181parameter allows more commands (up to 16 more) to be allocated for use by
182tape drives. For example:
183
184 insmod cciss.ko cciss_tape_cmds=16
185
186Or, as a kernel boot parameter passed in via grub: cciss.cciss_tape_cmds=8
diff --git a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt
index 9164ae3b83b..9b728dc1753 100644
--- a/Documentation/cachetlb.txt
+++ b/Documentation/cachetlb.txt
@@ -16,7 +16,7 @@ on all processors in the system. Don't let this scare you into
16thinking SMP cache/tlb flushing must be so inefficient, this is in 16thinking SMP cache/tlb flushing must be so inefficient, this is in
17fact an area where many optimizations are possible. For example, 17fact an area where many optimizations are possible. For example,
18if it can be proven that a user address space has never executed 18if it can be proven that a user address space has never executed
19on a cpu (see vma->cpu_vm_mask), one need not perform a flush 19on a cpu (see mm_cpumask()), one need not perform a flush
20for this address space on that cpu. 20for this address space on that cpu.
21 21
22First, the TLB flushing interfaces, since they are the simplest. The 22First, the TLB flushing interfaces, since they are the simplest. The
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 4ed7b5ceeed..465351d4cf8 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -140,7 +140,7 @@ Proportional weight policy files
140 - Specifies per cgroup weight. This is default weight of the group 140 - Specifies per cgroup weight. This is default weight of the group
141 on all the devices until and unless overridden by per device rule. 141 on all the devices until and unless overridden by per device rule.
142 (See blkio.weight_device). 142 (See blkio.weight_device).
143 Currently allowed range of weights is from 100 to 1000. 143 Currently allowed range of weights is from 10 to 1000.
144 144
145- blkio.weight_device 145- blkio.weight_device
146 - One can specify per cgroup per device rules using this interface. 146 - One can specify per cgroup per device rules using this interface.
@@ -343,34 +343,6 @@ Common files among various policies
343 343
344CFQ sysfs tunable 344CFQ sysfs tunable
345================= 345=================
346/sys/block/<disk>/queue/iosched/group_isolation
347-----------------------------------------------
348
349If group_isolation=1, it provides stronger isolation between groups at the
350expense of throughput. By default group_isolation is 0. In general that
351means that if group_isolation=0, expect fairness for sequential workload
352only. Set group_isolation=1 to see fairness for random IO workload also.
353
354Generally CFQ will put random seeky workload in sync-noidle category. CFQ
355will disable idling on these queues and it does a collective idling on group
356of such queues. Generally these are slow moving queues and if there is a
357sync-noidle service tree in each group, that group gets exclusive access to
358disk for certain period. That means it will bring the throughput down if
359group does not have enough IO to drive deeper queue depths and utilize disk
360capacity to the fullest in the slice allocated to it. But the flip side is
361that even a random reader should get better latencies and overall throughput
362if there are lots of sequential readers/sync-idle workload running in the
363system.
364
365If group_isolation=0, then CFQ automatically moves all the random seeky queues
366in the root group. That means there will be no service differentiation for
367that kind of workload. This leads to better throughput as we do collective
368idling on root sync-noidle tree.
369
370By default one should run with group_isolation=0. If that is not sufficient
371and one wants stronger isolation between groups, then set group_isolation=1
372but this will come at cost of reduced throughput.
373
374/sys/block/<disk>/queue/iosched/slice_idle 346/sys/block/<disk>/queue/iosched/slice_idle
375------------------------------------------ 347------------------------------------------
376On a faster hardware CFQ can be slow, especially with sequential workload. 348On a faster hardware CFQ can be slow, especially with sequential workload.
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 44b8b7af801..0ed99f08f1f 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -110,22 +110,22 @@ university server with various users - students, professors, system
110tasks etc. The resource planning for this server could be along the 110tasks etc. The resource planning for this server could be along the
111following lines: 111following lines:
112 112
113 CPU : Top cpuset 113 CPU : "Top cpuset"
114 / \ 114 / \
115 CPUSet1 CPUSet2 115 CPUSet1 CPUSet2
116 | | 116 | |
117 (Profs) (Students) 117 (Professors) (Students)
118 118
119 In addition (system tasks) are attached to topcpuset (so 119 In addition (system tasks) are attached to topcpuset (so
120 that they can run anywhere) with a limit of 20% 120 that they can run anywhere) with a limit of 20%
121 121
122 Memory : Professors (50%), students (30%), system (20%) 122 Memory : Professors (50%), Students (30%), system (20%)
123 123
124 Disk : Prof (50%), students (30%), system (20%) 124 Disk : Professors (50%), Students (30%), system (20%)
125 125
126 Network : WWW browsing (20%), Network File System (60%), others (20%) 126 Network : WWW browsing (20%), Network File System (60%), others (20%)
127 / \ 127 / \
128 Prof (15%) students (5%) 128 Professors (15%) students (5%)
129 129
130Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go 130Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go
131into NFS network class. 131into NFS network class.
@@ -236,7 +236,8 @@ containing the following files describing that cgroup:
236 - cgroup.procs: list of tgids in the cgroup. This list is not 236 - cgroup.procs: list of tgids in the cgroup. This list is not
237 guaranteed to be sorted or free of duplicate tgids, and userspace 237 guaranteed to be sorted or free of duplicate tgids, and userspace
238 should sort/uniquify the list if this property is required. 238 should sort/uniquify the list if this property is required.
239 This is a read-only file, for now. 239 Writing a thread group id into this file moves all threads in that
240 group into this cgroup.
240 - notify_on_release flag: run the release agent on exit? 241 - notify_on_release flag: run the release agent on exit?
241 - release_agent: the path to use for release notifications (this file 242 - release_agent: the path to use for release notifications (this file
242 exists in the top cgroup only) 243 exists in the top cgroup only)
@@ -349,6 +350,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
349The "xxx" is not interpreted by the cgroup code, but will appear in 350The "xxx" is not interpreted by the cgroup code, but will appear in
350/proc/mounts so may be any useful identifying string that you like. 351/proc/mounts so may be any useful identifying string that you like.
351 352
353Note: Some subsystems do not work without some user input first. For instance,
354if cpusets are enabled the user will have to populate the cpus and mems files
355for each new cgroup created before that group can be used.
356
352To mount a cgroup hierarchy with just the cpuset and memory 357To mount a cgroup hierarchy with just the cpuset and memory
353subsystems, type: 358subsystems, type:
354# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup 359# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +431,20 @@ You can attach the current shell task by echoing 0:
426 431
427# echo 0 > tasks 432# echo 0 > tasks
428 433
434You can use the cgroup.procs file instead of the tasks file to move all
435threads in a threadgroup at once. Echoing the pid of any task in a
436threadgroup to cgroup.procs causes all tasks in that threadgroup to be
437be attached to the cgroup. Writing 0 to cgroup.procs moves all tasks
438in the writing task's threadgroup.
439
440Note: Since every task is always a member of exactly one cgroup in each
441mounted hierarchy, to remove a task from its current cgroup you must
442move it into a new cgroup (possibly the root cgroup) by writing to the
443new cgroup's tasks file.
444
445Note: If the ns cgroup is active, moving a process to another cgroup can
446fail.
447
4292.3 Mounting hierarchies by name 4482.3 Mounting hierarchies by name
430-------------------------------- 449--------------------------------
431 450
@@ -563,7 +582,7 @@ rmdir() will fail with it. From this behavior, pre_destroy() can be
563called multiple times against a cgroup. 582called multiple times against a cgroup.
564 583
565int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 584int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
566 struct task_struct *task, bool threadgroup) 585 struct task_struct *task)
567(cgroup_mutex held by caller) 586(cgroup_mutex held by caller)
568 587
569Called prior to moving a task into a cgroup; if the subsystem 588Called prior to moving a task into a cgroup; if the subsystem
@@ -572,9 +591,14 @@ task is passed, then a successful result indicates that *any*
572unspecified task can be moved into the cgroup. Note that this isn't 591unspecified task can be moved into the cgroup. Note that this isn't
573called on a fork. If this method returns 0 (success) then this should 592called on a fork. If this method returns 0 (success) then this should
574remain valid while the caller holds cgroup_mutex and it is ensured that either 593remain valid while the caller holds cgroup_mutex and it is ensured that either
575attach() or cancel_attach() will be called in future. If threadgroup is 594attach() or cancel_attach() will be called in future.
576true, then a successful result indicates that all threads in the given 595
577thread's threadgroup can be moved together. 596int can_attach_task(struct cgroup *cgrp, struct task_struct *tsk);
597(cgroup_mutex held by caller)
598
599As can_attach, but for operations that must be run once per task to be
600attached (possibly many when using cgroup_attach_proc). Called after
601can_attach.
578 602
579void cancel_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 603void cancel_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
580 struct task_struct *task, bool threadgroup) 604 struct task_struct *task, bool threadgroup)
@@ -586,15 +610,24 @@ function, so that the subsystem can implement a rollback. If not, not necessary.
586This will be called only about subsystems whose can_attach() operation have 610This will be called only about subsystems whose can_attach() operation have
587succeeded. 611succeeded.
588 612
613void pre_attach(struct cgroup *cgrp);
614(cgroup_mutex held by caller)
615
616For any non-per-thread attachment work that needs to happen before
617attach_task. Needed by cpuset.
618
589void attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 619void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
590 struct cgroup *old_cgrp, struct task_struct *task, 620 struct cgroup *old_cgrp, struct task_struct *task)
591 bool threadgroup)
592(cgroup_mutex held by caller) 621(cgroup_mutex held by caller)
593 622
594Called after the task has been attached to the cgroup, to allow any 623Called after the task has been attached to the cgroup, to allow any
595post-attachment activity that requires memory allocations or blocking. 624post-attachment activity that requires memory allocations or blocking.
596If threadgroup is true, the subsystem should take care of all threads 625
597in the specified thread's threadgroup. Currently does not support any 626void attach_task(struct cgroup *cgrp, struct task_struct *tsk);
627(cgroup_mutex held by caller)
628
629As attach, but for operations that must be run once per task to be attached,
630like can_attach_task. Called before attach. Currently does not support any
598subsystem that might need the old_cgrp for every thread in the group. 631subsystem that might need the old_cgrp for every thread in the group.
599 632
600void fork(struct cgroup_subsy *ss, struct task_struct *task) 633void fork(struct cgroup_subsy *ss, struct task_struct *task)
@@ -618,7 +651,7 @@ always handled well.
618void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp) 651void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
619(cgroup_mutex held by caller) 652(cgroup_mutex held by caller)
620 653
621Called at the end of cgroup_clone() to do any parameter 654Called during cgroup_create() to do any parameter
622initialization which might be required before a task could attach. For 655initialization which might be required before a task could attach. For
623example in cpusets, no task may attach before 'cpus' and 'mems' are set 656example in cpusets, no task may attach before 'cpus' and 'mems' are set
624up. 657up.
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 5d0d5692a36..98a30829af7 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -693,7 +693,7 @@ There are ways to query or modify cpusets:
693 - via the C library libcgroup. 693 - via the C library libcgroup.
694 (http://sourceforge.net/projects/libcg/) 694 (http://sourceforge.net/projects/libcg/)
695 - via the python application cset. 695 - via the python application cset.
696 (http://developer.novell.com/wiki/index.php/Cpuset) 696 (http://code.google.com/p/cpuset/)
697 697
698The sched_setaffinity calls can also be done at the shell prompt using 698The sched_setaffinity calls can also be done at the shell prompt using
699SGI's runon or Robert Love's taskset. The mbind and set_mempolicy 699SGI's runon or Robert Love's taskset. The mbind and set_mempolicy
@@ -725,13 +725,14 @@ Now you want to do something with this cpuset.
725 725
726In this directory you can find several files: 726In this directory you can find several files:
727# ls 727# ls
728cpuset.cpu_exclusive cpuset.memory_spread_slab 728cgroup.clone_children cpuset.memory_pressure
729cpuset.cpus cpuset.mems 729cgroup.event_control cpuset.memory_spread_page
730cpuset.mem_exclusive cpuset.sched_load_balance 730cgroup.procs cpuset.memory_spread_slab
731cpuset.mem_hardwall cpuset.sched_relax_domain_level 731cpuset.cpu_exclusive cpuset.mems
732cpuset.memory_migrate notify_on_release 732cpuset.cpus cpuset.sched_load_balance
733cpuset.memory_pressure tasks 733cpuset.mem_exclusive cpuset.sched_relax_domain_level
734cpuset.memory_spread_page 734cpuset.mem_hardwall notify_on_release
735cpuset.memory_migrate tasks
735 736
736Reading them will give you information about the state of this cpuset: 737Reading them will give you information about the state of this cpuset:
737the CPUs and Memory Nodes it can use, the processes that are using 738the CPUs and Memory Nodes it can use, the processes that are using
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 7781857dc94..7c163477fcd 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -52,8 +52,10 @@ Brief summary of control files.
52 tasks # attach a task(thread) and show list of threads 52 tasks # attach a task(thread) and show list of threads
53 cgroup.procs # show list of processes 53 cgroup.procs # show list of processes
54 cgroup.event_control # an interface for event_fd() 54 cgroup.event_control # an interface for event_fd()
55 memory.usage_in_bytes # show current memory(RSS+Cache) usage. 55 memory.usage_in_bytes # show current res_counter usage for memory
56 memory.memsw.usage_in_bytes # show current memory+Swap usage 56 (See 5.5 for details)
57 memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap
58 (See 5.5 for details)
57 memory.limit_in_bytes # set/show limit of memory usage 59 memory.limit_in_bytes # set/show limit of memory usage
58 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage 60 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage
59 memory.failcnt # show the number of memory usage hits limits 61 memory.failcnt # show the number of memory usage hits limits
@@ -453,6 +455,15 @@ memory under it will be reclaimed.
453You can reset failcnt by writing 0 to failcnt file. 455You can reset failcnt by writing 0 to failcnt file.
454# echo 0 > .../memory.failcnt 456# echo 0 > .../memory.failcnt
455 457
4585.5 usage_in_bytes
459
460For efficiency, as other kernel components, memory cgroup uses some optimization
461to avoid unnecessary cacheline false sharing. usage_in_bytes is affected by the
462method and doesn't show 'exact' value of memory(and swap) usage, it's an fuzz
463value for efficient access. (Of course, when necessary, it's synchronized.)
464If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
465value in memory.stat(see 5.2).
466
4566. Hierarchy support 4676. Hierarchy support
457 468
458The memory controller supports a deep hierarchy and hierarchical accounting. 469The memory controller supports a deep hierarchy and hierarchical accounting.
@@ -485,8 +496,9 @@ The feature can be disabled by
485 496
486# echo 0 > memory.use_hierarchy 497# echo 0 > memory.use_hierarchy
487 498
488NOTE1: Enabling/disabling will fail if the cgroup already has other 499NOTE1: Enabling/disabling will fail if either the cgroup already has other
489 cgroups created below it. 500 cgroups created below it, or if the parent cgroup has use_hierarchy
501 enabled.
490 502
491NOTE2: When panic_on_oom is set to "2", the whole system will panic in 503NOTE2: When panic_on_oom is set to "2", the whole system will panic in
492 case of an OOM event in any cgroup. 504 case of an OOM event in any cgroup.
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 737988fca64..e74d0a2eb1c 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -158,6 +158,17 @@ intensive calculation on your laptop that you do not care how long it
158takes to complete as you can 'nice' it and prevent it from taking part 158takes to complete as you can 'nice' it and prevent it from taking part
159in the deciding process of whether to increase your CPU frequency. 159in the deciding process of whether to increase your CPU frequency.
160 160
161sampling_down_factor: this parameter controls the rate at which the
162kernel makes a decision on when to decrease the frequency while running
163at top speed. When set to 1 (the default) decisions to reevaluate load
164are made at the same interval regardless of current clock speed. But
165when set to greater than 1 (e.g. 100) it acts as a multiplier for the
166scheduling interval for reevaluating load when the CPU is at its top
167speed due to high load. This improves performance by reducing the overhead
168of load evaluation and helping the CPU stay at its top speed when truly
169busy, rather than shifting back and forth in speed. This tunable has no
170effect on behavior at lower speeds/lower CPU loads.
171
161 172
1622.5 Conservative 1732.5 Conservative
163---------------- 174----------------
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 45d5a217484..a20bfd415e4 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -196,7 +196,7 @@ the state as 0 when a cpu if offline and 1 when its online.
196 #To display the current cpu state. 196 #To display the current cpu state.
197 #cat /sys/devices/system/cpu/cpuX/online 197 #cat /sys/devices/system/cpu/cpuX/online
198 198
199Q: Why cant i remove CPU0 on some systems? 199Q: Why can't i remove CPU0 on some systems?
200A: Some architectures may have some special dependency on a certain CPU. 200A: Some architectures may have some special dependency on a certain CPU.
201 201
202For e.g in IA64 platforms we have ability to sent platform interrupts to the 202For e.g in IA64 platforms we have ability to sent platform interrupts to the
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt
index 15174985ad0..d262e22bdde 100644
--- a/Documentation/dell_rbu.txt
+++ b/Documentation/dell_rbu.txt
@@ -62,7 +62,7 @@ image file and then arrange all these packets back to back in to one single
62file. 62file.
63This file is then copied to /sys/class/firmware/dell_rbu/data. 63This file is then copied to /sys/class/firmware/dell_rbu/data.
64Once this file gets to the driver, the driver extracts packet_size data from 64Once this file gets to the driver, the driver extracts packet_size data from
65the file and spreads it accross the physical memory in contiguous packet_sized 65the file and spreads it across the physical memory in contiguous packet_sized
66space. 66space.
67This method makes sure that all the packets get to the driver in a single operation. 67This method makes sure that all the packets get to the driver in a single operation.
68 68
diff --git a/Documentation/development-process/1.Intro b/Documentation/development-process/1.Intro
index 8cc2cba2b10..9b614480aa8 100644
--- a/Documentation/development-process/1.Intro
+++ b/Documentation/development-process/1.Intro
@@ -56,13 +56,13 @@ information on kernel development.
56 56
571.2: WHAT THIS DOCUMENT IS ABOUT 571.2: WHAT THIS DOCUMENT IS ABOUT
58 58
59The Linux kernel, at over 6 million lines of code and well over 1000 active 59The Linux kernel, at over 8 million lines of code and well over 1000
60contributors, is one of the largest and most active free software projects 60contributors to each release, is one of the largest and most active free
61in existence. Since its humble beginning in 1991, this kernel has evolved 61software projects in existence. Since its humble beginning in 1991, this
62into a best-of-breed operating system component which runs on pocket-sized 62kernel has evolved into a best-of-breed operating system component which
63digital music players, desktop PCs, the largest supercomputers in 63runs on pocket-sized digital music players, desktop PCs, the largest
64existence, and all types of systems in between. It is a robust, efficient, 64supercomputers in existence, and all types of systems in between. It is a
65and scalable solution for almost any situation. 65robust, efficient, and scalable solution for almost any situation.
66 66
67With the growth of Linux has come an increase in the number of developers 67With the growth of Linux has come an increase in the number of developers
68(and companies) wishing to participate in its development. Hardware 68(and companies) wishing to participate in its development. Hardware
@@ -115,7 +115,7 @@ This document was written by Jonathan Corbet, corbet@lwn.net. It has been
115improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland 115improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland
116Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh, 116Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh,
117Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and 117Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and
118Jochen Voß. 118Jochen Voß.
119 119
120This work was supported by the Linux Foundation; thanks especially to 120This work was supported by the Linux Foundation; thanks especially to
121Amanda McPherson, who saw the value of this effort and made it all happen. 121Amanda McPherson, who saw the value of this effort and made it all happen.
@@ -221,7 +221,7 @@ include:
221- Everything that was said above about code review applies doubly to 221- Everything that was said above about code review applies doubly to
222 closed-source code. Since this code is not available at all, it cannot 222 closed-source code. Since this code is not available at all, it cannot
223 have been reviewed by the community and will, beyond doubt, have serious 223 have been reviewed by the community and will, beyond doubt, have serious
224 problems. 224 problems.
225 225
226Makers of embedded systems, in particular, may be tempted to disregard much 226Makers of embedded systems, in particular, may be tempted to disregard much
227of what has been said in this section in the belief that they are shipping 227of what has been said in this section in the belief that they are shipping
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process
index 911a4518634..4823577c650 100644
--- a/Documentation/development-process/2.Process
+++ b/Documentation/development-process/2.Process
@@ -14,16 +14,15 @@ The kernel developers use a loosely time-based release process, with a new
14major kernel release happening every two or three months. The recent 14major kernel release happening every two or three months. The recent
15release history looks like this: 15release history looks like this:
16 16
17 2.6.26 July 13, 2008 17 2.6.38 March 14, 2011
18 2.6.25 April 16, 2008 18 2.6.37 January 4, 2011
19 2.6.24 January 24, 2008 19 2.6.36 October 20, 2010
20 2.6.23 October 9, 2007 20 2.6.35 August 1, 2010
21 2.6.22 July 8, 2007 21 2.6.34 May 15, 2010
22 2.6.21 April 25, 2007 22 2.6.33 February 24, 2010
23 2.6.20 February 4, 2007
24 23
25Every 2.6.x release is a major kernel release with new features, internal 24Every 2.6.x release is a major kernel release with new features, internal
26API changes, and more. A typical 2.6 release can contain over 10,000 25API changes, and more. A typical 2.6 release can contain nearly 10,000
27changesets with changes to several hundred thousand lines of code. 2.6 is 26changesets with changes to several hundred thousand lines of code. 2.6 is
28thus the leading edge of Linux kernel development; the kernel uses a 27thus the leading edge of Linux kernel development; the kernel uses a
29rolling development model which is continually integrating major changes. 28rolling development model which is continually integrating major changes.
@@ -42,13 +41,13 @@ merge window do not come out of thin air; they have been collected, tested,
42and staged ahead of time. How that process works will be described in 41and staged ahead of time. How that process works will be described in
43detail later on). 42detail later on).
44 43
45The merge window lasts for two weeks. At the end of this time, Linus 44The merge window lasts for approximately two weeks. At the end of this
46Torvalds will declare that the window is closed and release the first of 45time, Linus Torvalds will declare that the window is closed and release the
47the "rc" kernels. For the kernel which is destined to be 2.6.26, for 46first of the "rc" kernels. For the kernel which is destined to be 2.6.40,
48example, the release which happens at the end of the merge window will be 47for example, the release which happens at the end of the merge window will
49called 2.6.26-rc1. The -rc1 release is the signal that the time to merge 48be called 2.6.40-rc1. The -rc1 release is the signal that the time to
50new features has passed, and that the time to stabilize the next kernel has 49merge new features has passed, and that the time to stabilize the next
51begun. 50kernel has begun.
52 51
53Over the next six to ten weeks, only patches which fix problems should be 52Over the next six to ten weeks, only patches which fix problems should be
54submitted to the mainline. On occasion a more significant change will be 53submitted to the mainline. On occasion a more significant change will be
@@ -66,20 +65,19 @@ will get up to somewhere between -rc6 and -rc9 before the kernel is
66considered to be sufficiently stable and the final 2.6.x release is made. 65considered to be sufficiently stable and the final 2.6.x release is made.
67At that point the whole process starts over again. 66At that point the whole process starts over again.
68 67
69As an example, here is how the 2.6.25 development cycle went (all dates in 68As an example, here is how the 2.6.38 development cycle went (all dates in
702008): 692011):
71 70
72 January 24 2.6.24 stable release 71 January 4 2.6.37 stable release
73 February 10 2.6.25-rc1, merge window closes 72 January 18 2.6.38-rc1, merge window closes
74 February 15 2.6.25-rc2 73 January 21 2.6.38-rc2
75 February 24 2.6.25-rc3 74 February 1 2.6.38-rc3
76 March 4 2.6.25-rc4 75 February 7 2.6.38-rc4
77 March 9 2.6.25-rc5 76 February 15 2.6.38-rc5
78 March 16 2.6.25-rc6 77 February 21 2.6.38-rc6
79 March 25 2.6.25-rc7 78 March 1 2.6.38-rc7
80 April 1 2.6.25-rc8 79 March 7 2.6.38-rc8
81 April 11 2.6.25-rc9 80 March 14 2.6.38 stable release
82 April 16 2.6.25 stable release
83 81
84How do the developers decide when to close the development cycle and create 82How do the developers decide when to close the development cycle and create
85the stable release? The most significant metric used is the list of 83the stable release? The most significant metric used is the list of
@@ -87,7 +85,7 @@ regressions from previous releases. No bugs are welcome, but those which
87break systems which worked in the past are considered to be especially 85break systems which worked in the past are considered to be especially
88serious. For this reason, patches which cause regressions are looked upon 86serious. For this reason, patches which cause regressions are looked upon
89unfavorably and are quite likely to be reverted during the stabilization 87unfavorably and are quite likely to be reverted during the stabilization
90period. 88period.
91 89
92The developers' goal is to fix all known regressions before the stable 90The developers' goal is to fix all known regressions before the stable
93release is made. In the real world, this kind of perfection is hard to 91release is made. In the real world, this kind of perfection is hard to
@@ -99,26 +97,34 @@ kernels go out with a handful of known regressions though, hopefully, none
99of them are serious. 97of them are serious.
100 98
101Once a stable release is made, its ongoing maintenance is passed off to the 99Once a stable release is made, its ongoing maintenance is passed off to the
102"stable team," currently comprised of Greg Kroah-Hartman and Chris Wright. 100"stable team," currently consisting of Greg Kroah-Hartman. The stable team
103The stable team will release occasional updates to the stable release using 101will release occasional updates to the stable release using the 2.6.x.y
104the 2.6.x.y numbering scheme. To be considered for an update release, a 102numbering scheme. To be considered for an update release, a patch must (1)
105patch must (1) fix a significant bug, and (2) already be merged into the 103fix a significant bug, and (2) already be merged into the mainline for the
106mainline for the next development kernel. Continuing our 2.6.25 example, 104next development kernel. Kernels will typically receive stable updates for
107the history (as of this writing) is: 105a little more than one development cycle past their initial release. So,
108 106for example, the 2.6.36 kernel's history looked like:
109 May 1 2.6.25.1 107
110 May 6 2.6.25.2 108 October 10 2.6.36 stable release
111 May 9 2.6.25.3 109 November 22 2.6.36.1
112 May 15 2.6.25.4 110 December 9 2.6.36.2
113 June 7 2.6.25.5 111 January 7 2.6.36.3
114 June 9 2.6.25.6 112 February 17 2.6.36.4
115 June 16 2.6.25.7 113
116 June 21 2.6.25.8 1142.6.36.4 was the final stable update for the 2.6.36 release.
117 June 24 2.6.25.9 115
118 116Some kernels are designated "long term" kernels; they will receive support
119Stable updates for a given kernel are made for approximately six months; 117for a longer period. As of this writing, the current long term kernels
120after that, the maintenance of stable releases is solely the responsibility 118and their maintainers are:
121of the distributors which have shipped that particular kernel. 119
120 2.6.27 Willy Tarreau (Deep-frozen stable kernel)
121 2.6.32 Greg Kroah-Hartman
122 2.6.35 Andi Kleen (Embedded flag kernel)
123
124The selection of a kernel for long-term support is purely a matter of a
125maintainer having the need and the time to maintain that release. There
126are no known plans for long-term support for any specific upcoming
127release.
122 128
123 129
1242.2: THE LIFECYCLE OF A PATCH 1302.2: THE LIFECYCLE OF A PATCH
@@ -130,7 +136,7 @@ each patch implements a change which is desirable to have in the mainline.
130This process can happen quickly for minor fixes, or, in the case of large 136This process can happen quickly for minor fixes, or, in the case of large
131and controversial changes, go on for years. Much developer frustration 137and controversial changes, go on for years. Much developer frustration
132comes from a lack of understanding of this process or from attempts to 138comes from a lack of understanding of this process or from attempts to
133circumvent it. 139circumvent it.
134 140
135In the hopes of reducing that frustration, this document will describe how 141In the hopes of reducing that frustration, this document will describe how
136a patch gets into the kernel. What follows below is an introduction which 142a patch gets into the kernel. What follows below is an introduction which
@@ -193,8 +199,8 @@ involved.
1932.3: HOW PATCHES GET INTO THE KERNEL 1992.3: HOW PATCHES GET INTO THE KERNEL
194 200
195There is exactly one person who can merge patches into the mainline kernel 201There is exactly one person who can merge patches into the mainline kernel
196repository: Linus Torvalds. But, of the over 12,000 patches which went 202repository: Linus Torvalds. But, of the over 9,500 patches which went
197into the 2.6.25 kernel, only 250 (around 2%) were directly chosen by Linus 203into the 2.6.38 kernel, only 112 (around 1.3%) were directly chosen by Linus
198himself. The kernel project has long since grown to a size where no single 204himself. The kernel project has long since grown to a size where no single
199developer could possibly inspect and select every patch unassisted. The 205developer could possibly inspect and select every patch unassisted. The
200way the kernel developers have addressed this growth is through the use of 206way the kernel developers have addressed this growth is through the use of
@@ -229,7 +235,7 @@ first in trees dedicated to network device drivers, wireless networking,
229etc. This chain of repositories can be arbitrarily long, though it rarely 235etc. This chain of repositories can be arbitrarily long, though it rarely
230exceeds two or three links. Since each maintainer in the chain trusts 236exceeds two or three links. Since each maintainer in the chain trusts
231those managing lower-level trees, this process is known as the "chain of 237those managing lower-level trees, this process is known as the "chain of
232trust." 238trust."
233 239
234Clearly, in a system like this, getting patches into the kernel depends on 240Clearly, in a system like this, getting patches into the kernel depends on
235finding the right maintainer. Sending patches directly to Linus is not 241finding the right maintainer. Sending patches directly to Linus is not
@@ -254,7 +260,7 @@ The answer comes in the form of -next trees, where subsystem trees are
254collected for testing and review. The older of these trees, maintained by 260collected for testing and review. The older of these trees, maintained by
255Andrew Morton, is called "-mm" (for memory management, which is how it got 261Andrew Morton, is called "-mm" (for memory management, which is how it got
256started). The -mm tree integrates patches from a long list of subsystem 262started). The -mm tree integrates patches from a long list of subsystem
257trees; it also has some patches aimed at helping with debugging. 263trees; it also has some patches aimed at helping with debugging.
258 264
259Beyond that, -mm contains a significant collection of patches which have 265Beyond that, -mm contains a significant collection of patches which have
260been selected by Andrew directly. These patches may have been posted on a 266been selected by Andrew directly. These patches may have been posted on a
@@ -264,8 +270,8 @@ subsystem tree of last resort; if there is no other obvious path for a
264patch into the mainline, it is likely to end up in -mm. Miscellaneous 270patch into the mainline, it is likely to end up in -mm. Miscellaneous
265patches which accumulate in -mm will eventually either be forwarded on to 271patches which accumulate in -mm will eventually either be forwarded on to
266an appropriate subsystem tree or be sent directly to Linus. In a typical 272an appropriate subsystem tree or be sent directly to Linus. In a typical
267development cycle, approximately 10% of the patches going into the mainline 273development cycle, approximately 5-10% of the patches going into the
268get there via -mm. 274mainline get there via -mm.
269 275
270The current -mm patch is available in the "mmotm" (-mm of the moment) 276The current -mm patch is available in the "mmotm" (-mm of the moment)
271directory at: 277directory at:
@@ -275,7 +281,7 @@ directory at:
275Use of the MMOTM tree is likely to be a frustrating experience, though; 281Use of the MMOTM tree is likely to be a frustrating experience, though;
276there is a definite chance that it will not even compile. 282there is a definite chance that it will not even compile.
277 283
278The other -next tree, started more recently, is linux-next, maintained by 284The primary tree for next-cycle patch merging is linux-next, maintained by
279Stephen Rothwell. The linux-next tree is, by design, a snapshot of what 285Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
280the mainline is expected to look like after the next merge window closes. 286the mainline is expected to look like after the next merge window closes.
281Linux-next trees are announced on the linux-kernel and linux-next mailing 287Linux-next trees are announced on the linux-kernel and linux-next mailing
@@ -287,25 +293,14 @@ Some information about linux-next has been gathered at:
287 293
288 http://linux.f-seidel.de/linux-next/pmwiki/ 294 http://linux.f-seidel.de/linux-next/pmwiki/
289 295
290How the linux-next tree will fit into the development process is still 296Linux-next has become an integral part of the kernel development process;
291changing. As of this writing, the first full development cycle involving 297all patches merged during a given merge window should really have found
292linux-next (2.6.26) is coming to an end; thus far, it has proved to be a 298their way into linux-next some time before the merge window opens.
293valuable resource for finding and fixing integration problems before the 299
294beginning of the merge window. See http://lwn.net/Articles/287155/ for
295more information on how linux-next has worked to set up the 2.6.27 merge
296window.
297
298Some developers have begun to suggest that linux-next should be used as the
299target for future development as well. The linux-next tree does tend to be
300far ahead of the mainline and is more representative of the tree into which
301any new work will be merged. The downside to this idea is that the
302volatility of linux-next tends to make it a difficult development target.
303See http://lwn.net/Articles/289013/ for more information on this topic, and
304stay tuned; much is still in flux where linux-next is involved.
305 300
3062.4.1: STAGING TREES 3012.4.1: STAGING TREES
307 302
308The kernel source tree now contains the drivers/staging/ directory, where 303The kernel source tree contains the drivers/staging/ directory, where
309many sub-directories for drivers or filesystems that are on their way to 304many sub-directories for drivers or filesystems that are on their way to
310being added to the kernel tree live. They remain in drivers/staging while 305being added to the kernel tree live. They remain in drivers/staging while
311they still need more work; once complete, they can be moved into the 306they still need more work; once complete, they can be moved into the
@@ -313,15 +308,23 @@ kernel proper. This is a way to keep track of drivers that aren't
313up to Linux kernel coding or quality standards, but people may want to use 308up to Linux kernel coding or quality standards, but people may want to use
314them and track development. 309them and track development.
315 310
316Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree. 311Greg Kroah-Hartman currently maintains the staging tree. Drivers that
317Drivers that still need work are sent to him, with each driver having 312still need work are sent to him, with each driver having its own
318its own subdirectory in drivers/staging/. Along with the driver source 313subdirectory in drivers/staging/. Along with the driver source files, a
319files, a TODO file should be present in the directory as well. The TODO 314TODO file should be present in the directory as well. The TODO file lists
320file lists the pending work that the driver needs for acceptance into 315the pending work that the driver needs for acceptance into the kernel
321the kernel proper, as well as a list of people that should be Cc'd for any 316proper, as well as a list of people that should be Cc'd for any patches to
322patches to the driver. Staging drivers that don't currently build should 317the driver. Current rules require that drivers contributed to staging
323have their config entries depend upon CONFIG_BROKEN. Once they can 318must, at a minimum, compile properly.
324be successfully built without outside patches, CONFIG_BROKEN can be removed. 319
320Staging can be a relatively easy way to get new drivers into the mainline
321where, with luck, they will come to the attention of other developers and
322improve quickly. Entry into staging is not the end of the story, though;
323code in staging which is not seeing regular progress will eventually be
324removed. Distributors also tend to be relatively reluctant to enable
325staging drivers. So staging is, at best, a stop on the way toward becoming
326a proper mainline driver.
327
325 328
3262.5: TOOLS 3292.5: TOOLS
327 330
@@ -347,11 +350,7 @@ page at:
347 350
348 http://git-scm.com/ 351 http://git-scm.com/
349 352
350That page has pointers to documentation and tutorials. One should be 353That page has pointers to documentation and tutorials.
351aware, in particular, of the Kernel Hacker's Guide to git, which has
352information specific to kernel development:
353
354 http://linux.yyz.us/git-howto.html
355 354
356Among the kernel developers who do not use git, the most popular choice is 355Among the kernel developers who do not use git, the most popular choice is
357almost certainly Mercurial: 356almost certainly Mercurial:
@@ -408,7 +407,7 @@ There are a few hints which can help with linux-kernel survival:
408 important to filter on both the topic of interest (though note that 407 important to filter on both the topic of interest (though note that
409 long-running conversations can drift away from the original subject 408 long-running conversations can drift away from the original subject
410 without changing the email subject line) and the people who are 409 without changing the email subject line) and the people who are
411 participating. 410 participating.
412 411
413- Do not feed the trolls. If somebody is trying to stir up an angry 412- Do not feed the trolls. If somebody is trying to stir up an angry
414 response, ignore them. 413 response, ignore them.
diff --git a/Documentation/development-process/3.Early-stage b/Documentation/development-process/3.Early-stage
index 307a159a70c..f87ba7b3fba 100644
--- a/Documentation/development-process/3.Early-stage
+++ b/Documentation/development-process/3.Early-stage
@@ -110,8 +110,8 @@ the kernel community's standards. Some examples include:
110 110
111 - The AppArmor security module made use of internal virtual filesystem 111 - The AppArmor security module made use of internal virtual filesystem
112 data structures in ways which were considered to be unsafe and 112 data structures in ways which were considered to be unsafe and
113 unreliable. This code has since been significantly reworked, but 113 unreliable. This concern (among others) kept AppArmor out of the
114 remains outside of the mainline. 114 mainline for years.
115 115
116In each of these cases, a great deal of pain and extra work could have been 116In each of these cases, a great deal of pain and extra work could have been
117avoided with some early discussion with the kernel developers. 117avoided with some early discussion with the kernel developers.
@@ -138,6 +138,19 @@ patches, and who, if anybody, is attaching Signed-off-by lines to those
138patches. Those are the people who will be best placed to help with a new 138patches. Those are the people who will be best placed to help with a new
139development project. 139development project.
140 140
141The task of finding the right maintainer is sometimes challenging enough
142that the kernel developers have added a script to ease the process:
143
144 .../scripts/get_maintainer.pl
145
146This script will return the current maintainer(s) for a given file or
147directory when given the "-f" option. If passed a patch on the
148command line, it will list the maintainers who should probably receive
149copies of the patch. There are a number of options regulating how hard
150get_maintainer.pl will search for maintainers; please be careful about
151using the more aggressive options as you may end up including developers
152who have no real interest in the code you are modifying.
153
141If all else fails, talking to Andrew Morton can be an effective way to 154If all else fails, talking to Andrew Morton can be an effective way to
142track down a maintainer for a specific piece of code. 155track down a maintainer for a specific piece of code.
143 156
@@ -155,11 +168,15 @@ reaction, but, instead, little or no reaction at all. The sad truth of the
155matter is (1) kernel developers tend to be busy, (2) there is no shortage 168matter is (1) kernel developers tend to be busy, (2) there is no shortage
156of people with grand plans and little code (or even prospect of code) to 169of people with grand plans and little code (or even prospect of code) to
157back them up, and (3) nobody is obligated to review or comment on ideas 170back them up, and (3) nobody is obligated to review or comment on ideas
158posted by others. If a request-for-comments posting yields little in the 171posted by others. Beyond that, high-level designs often hide problems
159way of comments, do not assume that it means there is no interest in the 172which are only reviewed when somebody actually tries to implement those
160project. Unfortunately, you also cannot assume that there are no problems 173designs; for that reason, kernel developers would rather see the code.
161with your idea. The best thing to do in this situation is to proceed, 174
162keeping the community informed as you go. 175If a request-for-comments posting yields little in the way of comments, do
176not assume that it means there is no interest in the project.
177Unfortunately, you also cannot assume that there are no problems with your
178idea. The best thing to do in this situation is to proceed, keeping the
179community informed as you go.
163 180
164 181
1653.5: GETTING OFFICIAL BUY-IN 1823.5: GETTING OFFICIAL BUY-IN
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding
index 2278693c8ff..f3f1a469443 100644
--- a/Documentation/development-process/4.Coding
+++ b/Documentation/development-process/4.Coding
@@ -131,6 +131,11 @@ classic time/space tradeoff taught in beginning data structures classes
131often does not apply to contemporary hardware. Space *is* time, in that a 131often does not apply to contemporary hardware. Space *is* time, in that a
132larger program will run slower than one which is more compact. 132larger program will run slower than one which is more compact.
133 133
134More recent compilers take an increasingly active role in deciding whether
135a given function should actually be inlined or not. So the liberal
136placement of "inline" keywords may not just be excessive; it could also be
137irrelevant.
138
134 139
135* Locking 140* Locking
136 141
@@ -285,6 +290,13 @@ be found at https://sparse.wiki.kernel.org/index.php/Main_Page if your
285distributor does not package it); it can then be run on the code by adding 290distributor does not package it); it can then be run on the code by adding
286"C=1" to your make command. 291"C=1" to your make command.
287 292
293The "Coccinelle" tool (http://coccinelle.lip6.fr/) is able to find a wide
294variety of potential coding problems; it can also propose fixes for those
295problems. Quite a few "semantic patches" for the kernel have been packaged
296under the scripts/coccinelle directory; running "make coccicheck" will run
297through those semantic patches and report on any problems found. See
298Documentation/coccinelle.txt for more information.
299
288Other kinds of portability errors are best found by compiling your code for 300Other kinds of portability errors are best found by compiling your code for
289other architectures. If you do not happen to have an S/390 system or a 301other architectures. If you do not happen to have an S/390 system or a
290Blackfin development board handy, you can still perform the compilation 302Blackfin development board handy, you can still perform the compilation
@@ -308,7 +320,9 @@ The first piece of documentation for any patch is its associated
308changelog. Log entries should describe the problem being solved, the form 320changelog. Log entries should describe the problem being solved, the form
309of the solution, the people who worked on the patch, any relevant 321of the solution, the people who worked on the patch, any relevant
310effects on performance, and anything else that might be needed to 322effects on performance, and anything else that might be needed to
311understand the patch. 323understand the patch. Be sure that the changelog says *why* the patch is
324worth applying; a surprising number of developers fail to provide that
325information.
312 326
313Any code which adds a new user-space interface - including new sysfs or 327Any code which adds a new user-space interface - including new sysfs or
314/proc files - should include documentation of that interface which enables 328/proc files - should include documentation of that interface which enables
@@ -321,7 +335,7 @@ boot-time parameters. Any patch which adds new parameters should add the
321appropriate entries to this file. 335appropriate entries to this file.
322 336
323Any new configuration options must be accompanied by help text which 337Any new configuration options must be accompanied by help text which
324clearly explains the options and when the user might want to select them. 338clearly explains the options and when the user might want to select them.
325 339
326Internal API information for many subsystems is documented by way of 340Internal API information for many subsystems is documented by way of
327specially-formatted comments; these comments can be extracted and formatted 341specially-formatted comments; these comments can be extracted and formatted
@@ -372,7 +386,8 @@ which is broken by the change. For a widely-used function, this duty can
372lead to literally hundreds or thousands of changes - many of which are 386lead to literally hundreds or thousands of changes - many of which are
373likely to conflict with work being done by other developers. Needless to 387likely to conflict with work being done by other developers. Needless to
374say, this can be a large job, so it is best to be sure that the 388say, this can be a large job, so it is best to be sure that the
375justification is solid. 389justification is solid. Note that the Coccinelle tool can help with
390wide-ranging API changes.
376 391
377When making an incompatible API change, one should, whenever possible, 392When making an incompatible API change, one should, whenever possible,
378ensure that code which has not been updated is caught by the compiler. 393ensure that code which has not been updated is caught by the compiler.
diff --git a/Documentation/development-process/5.Posting b/Documentation/development-process/5.Posting
index f622c1e9f0f..903a2546f13 100644
--- a/Documentation/development-process/5.Posting
+++ b/Documentation/development-process/5.Posting
@@ -60,12 +60,15 @@ even in the short term.
60 60
61Patches must be prepared against a specific version of the kernel. As a 61Patches must be prepared against a specific version of the kernel. As a
62general rule, a patch should be based on the current mainline as found in 62general rule, a patch should be based on the current mainline as found in
63Linus's git tree. It may become necessary to make versions against -mm, 63Linus's git tree. When basing on mainline, start with a well-known release
64linux-next, or a subsystem tree, though, to facilitate wider testing and 64point - a stable or -rc release - rather than branching off the mainline at
65review. Depending on the area of your patch and what is going on 65an arbitrary spot.
66elsewhere, basing a patch against these other trees can require a 66
67significant amount of work resolving conflicts and dealing with API 67It may become necessary to make versions against -mm, linux-next, or a
68changes. 68subsystem tree, though, to facilitate wider testing and review. Depending
69on the area of your patch and what is going on elsewhere, basing a patch
70against these other trees can require a significant amount of work
71resolving conflicts and dealing with API changes.
69 72
70Only the most simple changes should be formatted as a single patch; 73Only the most simple changes should be formatted as a single patch;
71everything else should be made as a logical series of changes. Splitting 74everything else should be made as a logical series of changes. Splitting
@@ -100,11 +103,11 @@ rules of thumb, however, which can help considerably:
100 result is a broken kernel, you will make life harder for developers and 103 result is a broken kernel, you will make life harder for developers and
101 users who are engaging in the noble work of tracking down problems. 104 users who are engaging in the noble work of tracking down problems.
102 105
103 - Do not overdo it, though. One developer recently posted a set of edits 106 - Do not overdo it, though. One developer once posted a set of edits
104 to a single file as 500 separate patches - an act which did not make him 107 to a single file as 500 separate patches - an act which did not make him
105 the most popular person on the kernel mailing list. A single patch can 108 the most popular person on the kernel mailing list. A single patch can
106 be reasonably large as long as it still contains a single *logical* 109 be reasonably large as long as it still contains a single *logical*
107 change. 110 change.
108 111
109 - It can be tempting to add a whole new infrastructure with a series of 112 - It can be tempting to add a whole new infrastructure with a series of
110 patches, but to leave that infrastructure unused until the final patch 113 patches, but to leave that infrastructure unused until the final patch
@@ -162,7 +165,8 @@ To that end, the summary line should describe the effects of and motivation
162for the change as well as possible given the one-line constraint. The 165for the change as well as possible given the one-line constraint. The
163detailed description can then amplify on those topics and provide any 166detailed description can then amplify on those topics and provide any
164needed additional information. If the patch fixes a bug, cite the commit 167needed additional information. If the patch fixes a bug, cite the commit
165which introduced the bug if possible. If a problem is associated with 168which introduced the bug if possible (and please provide both the commit ID
169and the title when citing commits). If a problem is associated with
166specific log or compiler output, include that output to help others 170specific log or compiler output, include that output to help others
167searching for a solution to the same problem. If the change is meant to 171searching for a solution to the same problem. If the change is meant to
168support other changes coming in later patch, say so. If internal APIs are 172support other changes coming in later patch, say so. If internal APIs are
@@ -230,7 +234,7 @@ take care of:
230 which have had gratuitous white-space changes or line wrapping performed 234 which have had gratuitous white-space changes or line wrapping performed
231 by the mail client will not apply at the other end, and often will not 235 by the mail client will not apply at the other end, and often will not
232 be examined in any detail. If there is any doubt at all, mail the patch 236 be examined in any detail. If there is any doubt at all, mail the patch
233 to yourself and convince yourself that it shows up intact. 237 to yourself and convince yourself that it shows up intact.
234 238
235 Documentation/email-clients.txt has some helpful hints on making 239 Documentation/email-clients.txt has some helpful hints on making
236 specific mail clients work for sending patches. 240 specific mail clients work for sending patches.
@@ -287,7 +291,7 @@ something like:
287 291
288where "nn" is the ordinal number of the patch, "mm" is the total number of 292where "nn" is the ordinal number of the patch, "mm" is the total number of
289patches in the series, and "subsys" is the name of the affected subsystem. 293patches in the series, and "subsys" is the name of the affected subsystem.
290Clearly, nn/mm can be omitted for a single, standalone patch. 294Clearly, nn/mm can be omitted for a single, standalone patch.
291 295
292If you have a significant series of patches, it is customary to send an 296If you have a significant series of patches, it is customary to send an
293introductory description as part zero. This convention is not universally 297introductory description as part zero. This convention is not universally
@@ -299,5 +303,5 @@ In general, the second and following parts of a multi-part patch should be
299sent as a reply to the first part so that they all thread together at the 303sent as a reply to the first part so that they all thread together at the
300receiving end. Tools like git and quilt have commands to mail out a set of 304receiving end. Tools like git and quilt have commands to mail out a set of
301patches with the proper threading. If you have a long series, though, and 305patches with the proper threading. If you have a long series, though, and
302are using git, please provide the --no-chain-reply-to option to avoid 306are using git, please stay away from the --chain-reply-to option to avoid
303creating exceptionally deep nesting. 307creating exceptionally deep nesting.
diff --git a/Documentation/development-process/6.Followthrough b/Documentation/development-process/6.Followthrough
index a8fba3d83a8..41d324a9420 100644
--- a/Documentation/development-process/6.Followthrough
+++ b/Documentation/development-process/6.Followthrough
@@ -66,6 +66,11 @@ be easy to become blinded by your own solution to a problem to the point
66that you don't realize that something is fundamentally wrong or, perhaps, 66that you don't realize that something is fundamentally wrong or, perhaps,
67you're not even solving the right problem. 67you're not even solving the right problem.
68 68
69Andrew Morton has suggested that every review comment which does not result
70in a code change should result in an additional code comment instead; that
71can help future reviewers avoid the questions which came up the first time
72around.
73
69One fatal mistake is to ignore review comments in the hope that they will 74One fatal mistake is to ignore review comments in the hope that they will
70go away. They will not go away. If you repost code without having 75go away. They will not go away. If you repost code without having
71responded to the comments you got the time before, you're likely to find 76responded to the comments you got the time before, you're likely to find
@@ -100,7 +105,7 @@ entry into a subsystem maintainer's tree. How that works varies from one
100subsystem to the next; each maintainer has his or her own way of doing 105subsystem to the next; each maintainer has his or her own way of doing
101things. In particular, there may be more than one tree - one, perhaps, 106things. In particular, there may be more than one tree - one, perhaps,
102dedicated to patches planned for the next merge window, and another for 107dedicated to patches planned for the next merge window, and another for
103longer-term work. 108longer-term work.
104 109
105For patches applying to areas for which there is no obvious subsystem tree 110For patches applying to areas for which there is no obvious subsystem tree
106(memory management patches, for example), the default tree often ends up 111(memory management patches, for example), the default tree often ends up
@@ -109,11 +114,10 @@ through the -mm tree.
109 114
110Inclusion into a subsystem tree can bring a higher level of visibility to a 115Inclusion into a subsystem tree can bring a higher level of visibility to a
111patch. Now other developers working with that tree will get the patch by 116patch. Now other developers working with that tree will get the patch by
112default. Subsystem trees typically feed into -mm and linux-next as well, 117default. Subsystem trees typically feed linux-next as well, making their
113making their contents visible to the development community as a whole. At 118contents visible to the development community as a whole. At this point,
114this point, there's a good chance that you will get more comments from a 119there's a good chance that you will get more comments from a new set of
115new set of reviewers; these comments need to be answered as in the previous 120reviewers; these comments need to be answered as in the previous round.
116round.
117 121
118What may also happen at this point, depending on the nature of your patch, 122What may also happen at this point, depending on the nature of your patch,
119is that conflicts with work being done by others turn up. In the worst 123is that conflicts with work being done by others turn up. In the worst
diff --git a/Documentation/development-process/7.AdvancedTopics b/Documentation/development-process/7.AdvancedTopics
index 837179447e1..26dc3fa196e 100644
--- a/Documentation/development-process/7.AdvancedTopics
+++ b/Documentation/development-process/7.AdvancedTopics
@@ -119,7 +119,7 @@ can affect your ability to get trees pulled in the future. Quoting Linus:
119 to trust things *without* then having to go and check every 119 to trust things *without* then having to go and check every
120 individual change by hand. 120 individual change by hand.
121 121
122(http://lwn.net/Articles/224135/). 122(http://lwn.net/Articles/224135/).
123 123
124To avoid this kind of situation, ensure that all patches within a given 124To avoid this kind of situation, ensure that all patches within a given
125branch stick closely to the associated topic; a "driver fixes" branch 125branch stick closely to the associated topic; a "driver fixes" branch
@@ -138,7 +138,7 @@ When requesting a pull, be sure to give all the relevant information: where
138your tree is, what branch to pull, and what changes will result from the 138your tree is, what branch to pull, and what changes will result from the
139pull. The git request-pull command can be helpful in this regard; it will 139pull. The git request-pull command can be helpful in this regard; it will
140format the request as other developers expect, and will also check to be 140format the request as other developers expect, and will also check to be
141sure that you have remembered to push those changes to the public server. 141sure that you have remembered to push those changes to the public server.
142 142
143 143
1447.2: REVIEWING PATCHES 1447.2: REVIEWING PATCHES
diff --git a/Documentation/device-mapper/dm-crypt.txt b/Documentation/device-mapper/dm-crypt.txt
index 59293ac4a5d..6b5c42dbbe8 100644
--- a/Documentation/device-mapper/dm-crypt.txt
+++ b/Documentation/device-mapper/dm-crypt.txt
@@ -41,7 +41,7 @@ Example scripts
41=============== 41===============
42LUKS (Linux Unified Key Setup) is now the preferred way to set up disk 42LUKS (Linux Unified Key Setup) is now the preferred way to set up disk
43encryption with dm-crypt using the 'cryptsetup' utility, see 43encryption with dm-crypt using the 'cryptsetup' utility, see
44http://clemens.endorphin.org/cryptography 44http://code.google.com/p/cryptsetup/
45 45
46[[ 46[[
47#!/bin/sh 47#!/bin/sh
diff --git a/Documentation/device-mapper/dm-flakey.txt b/Documentation/device-mapper/dm-flakey.txt
new file mode 100644
index 00000000000..c8efdfd19a6
--- /dev/null
+++ b/Documentation/device-mapper/dm-flakey.txt
@@ -0,0 +1,17 @@
1dm-flakey
2=========
3
4This target is the same as the linear target except that it returns I/O
5errors periodically. It's been found useful in simulating failing
6devices for testing purposes.
7
8Starting from the time the table is loaded, the device is available for
9<up interval> seconds, then returns errors for <down interval> seconds,
10and then this cycle repeats.
11
12Parameters: <dev path> <offset> <up interval> <down interval>
13 <dev path>: Full pathname to the underlying block-device, or a
14 "major:minor" device-number.
15 <offset>: Starting sector within the device.
16 <up interval>: Number of seconds device is available.
17 <down interval>: Number of seconds device returns errors.
diff --git a/Documentation/device-mapper/dm-service-time.txt b/Documentation/device-mapper/dm-service-time.txt
index 7d00668e97b..fb1d4a0cf12 100644
--- a/Documentation/device-mapper/dm-service-time.txt
+++ b/Documentation/device-mapper/dm-service-time.txt
@@ -37,7 +37,7 @@ Algorithm
37========= 37=========
38 38
39dm-service-time adds the I/O size to 'in-flight-size' when the I/O is 39dm-service-time adds the I/O size to 'in-flight-size' when the I/O is
40dispatched and substracts when completed. 40dispatched and subtracts when completed.
41Basically, dm-service-time selects a path having minimum service time 41Basically, dm-service-time selects a path having minimum service time
42which is calculated by: 42which is calculated by:
43 43
diff --git a/Documentation/devicetree/00-INDEX b/Documentation/devicetree/00-INDEX
new file mode 100644
index 00000000000..b78f691fd84
--- /dev/null
+++ b/Documentation/devicetree/00-INDEX
@@ -0,0 +1,10 @@
1Documentation for device trees, a data structure by which bootloaders pass
2hardware layout to Linux in a device-independent manner, simplifying hardware
3probing. This subsystem is maintained by Grant Likely
4<grant.likely@secretlab.ca> and has a mailing list at
5https://lists.ozlabs.org/listinfo/devicetree-discuss
6
700-INDEX
8 - this file
9booting-without-of.txt
10 - Booting Linux without Open Firmware, describes history and format of device trees.
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
new file mode 100644
index 00000000000..bf57ecd5d73
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -0,0 +1,397 @@
1=====================================================================
2SEC 4 Device Tree Binding
3Copyright (C) 2008-2011 Freescale Semiconductor Inc.
4
5 CONTENTS
6 -Overview
7 -SEC 4 Node
8 -Job Ring Node
9 -Run Time Integrity Check (RTIC) Node
10 -Run Time Integrity Check (RTIC) Memory Node
11 -Secure Non-Volatile Storage (SNVS) Node
12 -Full Example
13
14NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
15Accelerator and Assurance Module (CAAM).
16
17=====================================================================
18Overview
19
20DESCRIPTION
21
22SEC 4 h/w can process requests from 2 types of sources.
231. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
242. Job Rings (HW interface between cores & SEC 4 registers).
25
26High Speed Data Path Configuration:
27
28HW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
29such as the P4080. The number of simultaneous dequeues the QI can make is
30equal to the number of Descriptor Controller (DECO) engines in a particular
31SEC version. E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
32dequeue from 5 subportals simultaneously.
33
34Job Ring Data Path Configuration:
35
36Each JR is located on a separate 4k page, they may (or may not) be made visible
37in the memory partition devoted to a particular core. The P4080 has 4 JRs, so
38up to 4 JRs can be configured; and all 4 JRs process requests in parallel.
39
40=====================================================================
41SEC 4 Node
42
43Description
44
45 Node defines the base address of the SEC 4 block.
46 This block specifies the address range of all global
47 configuration registers for the SEC 4 block. It
48 also receives interrupts from the Run Time Integrity Check
49 (RTIC) function within the SEC 4 block.
50
51PROPERTIES
52
53 - compatible
54 Usage: required
55 Value type: <string>
56 Definition: Must include "fsl,sec-v4.0"
57
58 - #address-cells
59 Usage: required
60 Value type: <u32>
61 Definition: A standard property. Defines the number of cells
62 for representing physical addresses in child nodes.
63
64 - #size-cells
65 Usage: required
66 Value type: <u32>
67 Definition: A standard property. Defines the number of cells
68 for representing the size of physical addresses in
69 child nodes.
70
71 - reg
72 Usage: required
73 Value type: <prop-encoded-array>
74 Definition: A standard property. Specifies the physical
75 address and length of the SEC4 configuration registers.
76 registers
77
78 - ranges
79 Usage: required
80 Value type: <prop-encoded-array>
81 Definition: A standard property. Specifies the physical address
82 range of the SEC 4.0 register space (-SNVS not included). A
83 triplet that includes the child address, parent address, &
84 length.
85
86 - interrupts
87 Usage: required
88 Value type: <prop_encoded-array>
89 Definition: Specifies the interrupts generated by this
90 device. The value of the interrupts property
91 consists of one interrupt specifier. The format
92 of the specifier is defined by the binding document
93 describing the node's interrupt parent.
94
95 - interrupt-parent
96 Usage: (required if interrupt property is defined)
97 Value type: <phandle>
98 Definition: A single <phandle> value that points
99 to the interrupt parent to which the child domain
100 is being mapped.
101
102 Note: All other standard properties (see the ePAPR) are allowed
103 but are optional.
104
105
106EXAMPLE
107 crypto@300000 {
108 compatible = "fsl,sec-v4.0";
109 #address-cells = <1>;
110 #size-cells = <1>;
111 reg = <0x300000 0x10000>;
112 ranges = <0 0x300000 0x10000>;
113 interrupt-parent = <&mpic>;
114 interrupts = <92 2>;
115 };
116
117=====================================================================
118Job Ring (JR) Node
119
120 Child of the crypto node defines data processing interface to SEC 4
121 across the peripheral bus for purposes of processing
122 cryptographic descriptors. The specified address
123 range can be made visible to one (or more) cores.
124 The interrupt defined for this node is controlled within
125 the address range of this node.
126
127 - compatible
128 Usage: required
129 Value type: <string>
130 Definition: Must include "fsl,sec-v4.0-job-ring"
131
132 - reg
133 Usage: required
134 Value type: <prop-encoded-array>
135 Definition: Specifies a two JR parameters: an offset from
136 the parent physical address and the length the JR registers.
137
138 - fsl,liodn
139 Usage: optional-but-recommended
140 Value type: <prop-encoded-array>
141 Definition:
142 Specifies the LIODN to be used in conjunction with
143 the ppid-to-liodn table that specifies the PPID to LIODN mapping.
144 Needed if the PAMU is used. Value is a 12 bit value
145 where value is a LIODN ID for this JR. This property is
146 normally set by boot firmware.
147
148 - interrupts
149 Usage: required
150 Value type: <prop_encoded-array>
151 Definition: Specifies the interrupts generated by this
152 device. The value of the interrupts property
153 consists of one interrupt specifier. The format
154 of the specifier is defined by the binding document
155 describing the node's interrupt parent.
156
157 - interrupt-parent
158 Usage: (required if interrupt property is defined)
159 Value type: <phandle>
160 Definition: A single <phandle> value that points
161 to the interrupt parent to which the child domain
162 is being mapped.
163
164EXAMPLE
165 jr@1000 {
166 compatible = "fsl,sec-v4.0-job-ring";
167 reg = <0x1000 0x1000>;
168 fsl,liodn = <0x081>;
169 interrupt-parent = <&mpic>;
170 interrupts = <88 2>;
171 };
172
173
174=====================================================================
175Run Time Integrity Check (RTIC) Node
176
177 Child node of the crypto node. Defines a register space that
178 contains up to 5 sets of addresses and their lengths (sizes) that
179 will be checked at run time. After an initial hash result is
180 calculated, these addresses are checked by HW to monitor any
181 change. If any memory is modified, a Security Violation is
182 triggered (see SNVS definition).
183
184
185 - compatible
186 Usage: required
187 Value type: <string>
188 Definition: Must include "fsl,sec-v4.0-rtic".
189
190 - #address-cells
191 Usage: required
192 Value type: <u32>
193 Definition: A standard property. Defines the number of cells
194 for representing physical addresses in child nodes. Must
195 have a value of 1.
196
197 - #size-cells
198 Usage: required
199 Value type: <u32>
200 Definition: A standard property. Defines the number of cells
201 for representing the size of physical addresses in
202 child nodes. Must have a value of 1.
203
204 - reg
205 Usage: required
206 Value type: <prop-encoded-array>
207 Definition: A standard property. Specifies a two parameters:
208 an offset from the parent physical address and the length
209 the SEC4 registers.
210
211 - ranges
212 Usage: required
213 Value type: <prop-encoded-array>
214 Definition: A standard property. Specifies the physical address
215 range of the SEC 4 register space (-SNVS not included). A
216 triplet that includes the child address, parent address, &
217 length.
218
219EXAMPLE
220 rtic@6000 {
221 compatible = "fsl,sec-v4.0-rtic";
222 #address-cells = <1>;
223 #size-cells = <1>;
224 reg = <0x6000 0x100>;
225 ranges = <0x0 0x6100 0xe00>;
226 };
227
228=====================================================================
229Run Time Integrity Check (RTIC) Memory Node
230 A child node that defines individual RTIC memory regions that are used to
231 perform run-time integrity check of memory areas that should not modified.
232 The node defines a register that contains the memory address &
233 length (combined) and a second register that contains the hash result
234 in big endian format.
235
236 - compatible
237 Usage: required
238 Value type: <string>
239 Definition: Must include "fsl,sec-v4.0-rtic-memory".
240
241 - reg
242 Usage: required
243 Value type: <prop-encoded-array>
244 Definition: A standard property. Specifies two parameters:
245 an offset from the parent physical address and the length:
246
247 1. The location of the RTIC memory address & length registers.
248 2. The location RTIC hash result.
249
250 - fsl,rtic-region
251 Usage: optional-but-recommended
252 Value type: <prop-encoded-array>
253 Definition:
254 Specifies the HW address (36 bit address) for this region
255 followed by the length of the HW partition to be checked;
256 the address is represented as a 64 bit quantity followed
257 by a 32 bit length.
258
259 - fsl,liodn
260 Usage: optional-but-recommended
261 Value type: <prop-encoded-array>
262 Definition:
263 Specifies the LIODN to be used in conjunction with
264 the ppid-to-liodn table that specifies the PPID to LIODN
265 mapping. Needed if the PAMU is used. Value is a 12 bit value
266 where value is a LIODN ID for this RTIC memory region. This
267 property is normally set by boot firmware.
268
269EXAMPLE
270 rtic-a@0 {
271 compatible = "fsl,sec-v4.0-rtic-memory";
272 reg = <0x00 0x20 0x100 0x80>;
273 fsl,liodn = <0x03c>;
274 fsl,rtic-region = <0x12345678 0x12345678 0x12345678>;
275 };
276
277=====================================================================
278Secure Non-Volatile Storage (SNVS) Node
279
280 Node defines address range and the associated
281 interrupt for the SNVS function. This function
282 monitors security state information & reports
283 security violations.
284
285 - compatible
286 Usage: required
287 Value type: <string>
288 Definition: Must include "fsl,sec-v4.0-mon".
289
290 - reg
291 Usage: required
292 Value type: <prop-encoded-array>
293 Definition: A standard property. Specifies the physical
294 address and length of the SEC4 configuration
295 registers.
296
297 - interrupts
298 Usage: required
299 Value type: <prop_encoded-array>
300 Definition: Specifies the interrupts generated by this
301 device. The value of the interrupts property
302 consists of one interrupt specifier. The format
303 of the specifier is defined by the binding document
304 describing the node's interrupt parent.
305
306 - interrupt-parent
307 Usage: (required if interrupt property is defined)
308 Value type: <phandle>
309 Definition: A single <phandle> value that points
310 to the interrupt parent to which the child domain
311 is being mapped.
312
313EXAMPLE
314 sec_mon@314000 {
315 compatible = "fsl,sec-v4.0-mon";
316 reg = <0x314000 0x1000>;
317 interrupt-parent = <&mpic>;
318 interrupts = <93 2>;
319 };
320
321=====================================================================
322FULL EXAMPLE
323
324 crypto: crypto@300000 {
325 compatible = "fsl,sec-v4.0";
326 #address-cells = <1>;
327 #size-cells = <1>;
328 reg = <0x300000 0x10000>;
329 ranges = <0 0x300000 0x10000>;
330 interrupt-parent = <&mpic>;
331 interrupts = <92 2>;
332
333 sec_jr0: jr@1000 {
334 compatible = "fsl,sec-v4.0-job-ring";
335 reg = <0x1000 0x1000>;
336 interrupt-parent = <&mpic>;
337 interrupts = <88 2>;
338 };
339
340 sec_jr1: jr@2000 {
341 compatible = "fsl,sec-v4.0-job-ring";
342 reg = <0x2000 0x1000>;
343 interrupt-parent = <&mpic>;
344 interrupts = <89 2>;
345 };
346
347 sec_jr2: jr@3000 {
348 compatible = "fsl,sec-v4.0-job-ring";
349 reg = <0x3000 0x1000>;
350 interrupt-parent = <&mpic>;
351 interrupts = <90 2>;
352 };
353
354 sec_jr3: jr@4000 {
355 compatible = "fsl,sec-v4.0-job-ring";
356 reg = <0x4000 0x1000>;
357 interrupt-parent = <&mpic>;
358 interrupts = <91 2>;
359 };
360
361 rtic@6000 {
362 compatible = "fsl,sec-v4.0-rtic";
363 #address-cells = <1>;
364 #size-cells = <1>;
365 reg = <0x6000 0x100>;
366 ranges = <0x0 0x6100 0xe00>;
367
368 rtic_a: rtic-a@0 {
369 compatible = "fsl,sec-v4.0-rtic-memory";
370 reg = <0x00 0x20 0x100 0x80>;
371 };
372
373 rtic_b: rtic-b@20 {
374 compatible = "fsl,sec-v4.0-rtic-memory";
375 reg = <0x20 0x20 0x200 0x80>;
376 };
377
378 rtic_c: rtic-c@40 {
379 compatible = "fsl,sec-v4.0-rtic-memory";
380 reg = <0x40 0x20 0x300 0x80>;
381 };
382
383 rtic_d: rtic-d@60 {
384 compatible = "fsl,sec-v4.0-rtic-memory";
385 reg = <0x60 0x20 0x500 0x80>;
386 };
387 };
388 };
389
390 sec_mon: sec_mon@314000 {
391 compatible = "fsl,sec-v4.0-mon";
392 reg = <0x314000 0x1000>;
393 interrupt-parent = <&mpic>;
394 interrupts = <93 2>;
395 };
396
397=====================================================================
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/fb/sm501fb.txt
new file mode 100644
index 00000000000..9d9f0098092
--- /dev/null
+++ b/Documentation/devicetree/bindings/fb/sm501fb.txt
@@ -0,0 +1,34 @@
1* SM SM501
2
3The SM SM501 is a LCD controller, with proper hardware, it can also
4drive DVI monitors.
5
6Required properties:
7- compatible : should be "smi,sm501".
8- reg : contain two entries:
9 - First entry: System Configuration register
10 - Second entry: IO space (Display Controller register)
11- interrupts : SMI interrupt to the cpu should be described here.
12- interrupt-parent : the phandle for the interrupt controller that
13 services interrupts for this device.
14
15Optional properties:
16- mode : select a video mode:
17 <xres>x<yres>[-<bpp>][@<refresh>]
18- edid : verbatim EDID data block describing attached display.
19 Data from the detailed timing descriptor will be used to
20 program the display controller.
21- little-endian: available on big endian systems, to
22 set different foreign endian.
23- big-endian: available on little endian systems, to
24 set different foreign endian.
25
26Example for MPC5200:
27 display@1,0 {
28 compatible = "smi,sm501";
29 reg = <1 0x00000000 0x00800000
30 1 0x03e00000 0x00200000>;
31 interrupts = <1 1 3>;
32 mode = "640x480-32@60";
33 edid = [edid-data];
34 };
diff --git a/Documentation/devicetree/bindings/hwmon/ads1015.txt b/Documentation/devicetree/bindings/hwmon/ads1015.txt
new file mode 100644
index 00000000000..918a507d115
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ads1015.txt
@@ -0,0 +1,73 @@
1ADS1015 (I2C)
2
3This device is a 12-bit A-D converter with 4 inputs.
4
5The inputs can be used single ended or in certain differential combinations.
6
7For configuration all possible combinations are mapped to 8 channels:
8 0: Voltage over AIN0 and AIN1.
9 1: Voltage over AIN0 and AIN3.
10 2: Voltage over AIN1 and AIN3.
11 3: Voltage over AIN2 and AIN3.
12 4: Voltage over AIN0 and GND.
13 5: Voltage over AIN1 and GND.
14 6: Voltage over AIN2 and GND.
15 7: Voltage over AIN3 and GND.
16
17Each channel can be configured individually:
18 - pga is the programmable gain amplifier (values are full scale)
19 0: +/- 6.144 V
20 1: +/- 4.096 V
21 2: +/- 2.048 V (default)
22 3: +/- 1.024 V
23 4: +/- 0.512 V
24 5: +/- 0.256 V
25 - data_rate in samples per second
26 0: 128
27 1: 250
28 2: 490
29 3: 920
30 4: 1600 (default)
31 5: 2400
32 6: 3300
33
341) The /ads1015 node
35
36 Required properties:
37
38 - compatible : must be "ti,ads1015"
39 - reg : I2C bus address of the device
40 - #address-cells : must be <1>
41 - #size-cells : must be <0>
42
43 The node contains child nodes for each channel that the platform uses.
44
45 Example ADS1015 node:
46
47 ads1015@49 {
48 compatible = "ti,ads1015";
49 reg = <0x49>;
50 #address-cells = <1>;
51 #size-cells = <0>;
52
53 [ child node definitions... ]
54 }
55
562) channel nodes
57
58 Required properties:
59
60 - reg : the channel number
61
62 Optional properties:
63
64 - ti,gain : the programmable gain amplifier setting
65 - ti,datarate : the converter data rate
66
67 Example ADS1015 channel node:
68
69 channel@4 {
70 reg = <4>;
71 ti,gain = <3>;
72 ti,datarate = <5>;
73 };
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
new file mode 100644
index 00000000000..569b1624851
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
@@ -0,0 +1,93 @@
1CE4100 I2C
2----------
3
4CE4100 has one PCI device which is described as the I2C-Controller. This
5PCI device has three PCI-bars, each bar contains a complete I2C
6controller. So we have a total of three independent I2C-Controllers
7which share only an interrupt line.
8The driver is probed via the PCI-ID and is gathering the information of
9attached devices from the devices tree.
10Grant Likely recommended to use the ranges property to map the PCI-Bar
11number to its physical address and to use this to find the child nodes
12of the specific I2C controller. This were his exact words:
13
14 Here's where the magic happens. Each entry in
15 ranges describes how the parent pci address space
16 (middle group of 3) is translated to the local
17 address space (first group of 2) and the size of
18 each range (last cell). In this particular case,
19 the first cell of the local address is chosen to be
20 1:1 mapped to the BARs, and the second is the
21 offset from be base of the BAR (which would be
22 non-zero if you had 2 or more devices mapped off
23 the same BAR)
24
25 ranges allows the address mapping to be described
26 in a way that the OS can interpret without
27 requiring custom device driver code.
28
29This is an example which is used on FalconFalls:
30------------------------------------------------
31 i2c-controller@b,2 {
32 #address-cells = <2>;
33 #size-cells = <1>;
34 compatible = "pci8086,2e68.2",
35 "pci8086,2e68",
36 "pciclass,ff0000",
37 "pciclass,ff00";
38
39 reg = <0x15a00 0x0 0x0 0x0 0x0>;
40 interrupts = <16 1>;
41
42 /* as described by Grant, the first number in the group of
43 * three is the bar number followed by the 64bit bar address
44 * followed by size of the mapping. The bar address
45 * requires also a valid translation in parents ranges
46 * property.
47 */
48 ranges = <0 0 0x02000000 0 0xdffe0500 0x100
49 1 0 0x02000000 0 0xdffe0600 0x100
50 2 0 0x02000000 0 0xdffe0700 0x100>;
51
52 i2c@0 {
53 #address-cells = <1>;
54 #size-cells = <0>;
55 compatible = "intel,ce4100-i2c-controller";
56
57 /* The first number in the reg property is the
58 * number of the bar
59 */
60 reg = <0 0 0x100>;
61
62 /* This I2C controller has no devices */
63 };
64
65 i2c@1 {
66 #address-cells = <1>;
67 #size-cells = <0>;
68 compatible = "intel,ce4100-i2c-controller";
69 reg = <1 0 0x100>;
70
71 /* This I2C controller has one gpio controller */
72 gpio@26 {
73 #gpio-cells = <2>;
74 compatible = "ti,pcf8575";
75 reg = <0x26>;
76 gpio-controller;
77 };
78 };
79
80 i2c@2 {
81 #address-cells = <1>;
82 #size-cells = <0>;
83 compatible = "intel,ce4100-i2c-controller";
84 reg = <2 0 0x100>;
85
86 gpio@26 {
87 #gpio-cells = <2>;
88 compatible = "ti,pcf8575";
89 reg = <0x26>;
90 gpio-controller;
91 };
92 };
93 };
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
index c39ac289195..89a0084df2f 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
@@ -7,8 +7,13 @@ Required properties:
7- voltage-ranges : two cells are required, first cell specifies minimum 7- voltage-ranges : two cells are required, first cell specifies minimum
8 slot voltage (mV), second cell specifies maximum slot voltage (mV). 8 slot voltage (mV), second cell specifies maximum slot voltage (mV).
9 Several ranges could be specified. 9 Several ranges could be specified.
10- gpios : (optional) may specify GPIOs in this order: Card-Detect GPIO, 10
11Optional properties:
12- gpios : may specify GPIOs in this order: Card-Detect GPIO,
11 Write-Protect GPIO. 13 Write-Protect GPIO.
14- interrupts : the interrupt of a card detect interrupt.
15- interrupt-parent : the phandle for the interrupt controller that
16 services interrupts for this device.
12 17
13Example: 18Example:
14 19
@@ -20,4 +25,6 @@ Example:
20 &qe_pio_d 15 0>; 25 &qe_pio_d 15 0>;
21 voltage-ranges = <3300 3300>; 26 voltage-ranges = <3300 3300>;
22 spi-max-frequency = <50000000>; 27 spi-max-frequency = <50000000>;
28 interrupts = <42>;
29 interrupt-parent = <&PIC>;
23 }; 30 };
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
index a48b2cadc7f..00f1f546b32 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
@@ -15,7 +15,7 @@ Optional properties:
15- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins 15- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
16 (R/B#). For multi-chip devices, "n" GPIO definitions are required 16 (R/B#). For multi-chip devices, "n" GPIO definitions are required
17 according to the number of chips. 17 according to the number of chips.
18- chip-delay : chip dependent delay for transfering data from array to 18- chip-delay : chip dependent delay for transferring data from array to
19 read registers (tR). Required if property "gpios" is not used 19 read registers (tR). Required if property "gpios" is not used
20 (R/B# pins not connected). 20 (R/B# pins not connected).
21 21
diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
new file mode 100755
index 00000000000..1a729f08986
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -0,0 +1,61 @@
1CAN Device Tree Bindings
2------------------------
32011 Freescale Semiconductor, Inc.
4
5fsl,flexcan-v1.0 nodes
6-----------------------
7In addition to the required compatible-, reg- and interrupt-properties, you can
8also specify which clock source shall be used for the controller.
9
10CPI Clock- Can Protocol Interface Clock
11 This CLK_SRC bit of CTRL(control register) selects the clock source to
12 the CAN Protocol Interface(CPI) to be either the peripheral clock
13 (driven by the PLL) or the crystal oscillator clock. The selected clock
14 is the one fed to the prescaler to generate the Serial Clock (Sclock).
15 The PRESDIV field of CTRL(control register) controls a prescaler that
16 generates the Serial Clock (Sclock), whose period defines the
17 time quantum used to compose the CAN waveform.
18
19Can Engine Clock Source
20 There are two sources for CAN clock
21 - Platform Clock It represents the bus clock
22 - Oscillator Clock
23
24 Peripheral Clock (PLL)
25 --------------
26 |
27 --------- -------------
28 | |CPI Clock | Prescaler | Sclock
29 | |---------------->| (1.. 256) |------------>
30 --------- -------------
31 | |
32 -------------- ---------------------CLK_SRC
33 Oscillator Clock
34
35- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects
36 the peripheral clock. PLL clock is fed to the
37 prescaler to generate the Serial Clock (Sclock).
38 Valid values are "oscillator" and "platform"
39 "oscillator": CAN engine clock source is oscillator clock.
40 "platform" The CAN engine clock source is the bus clock
41 (platform clock).
42
43- fsl,flexcan-clock-divider : for the reference and system clock, an additional
44 clock divider can be specified.
45- clock-frequency: frequency required to calculate the bitrate for FlexCAN.
46
47Note:
48 - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.
49 - P1010 does not have oscillator as the Clock Source.So the default
50 Clock Source is platform clock.
51Examples:
52
53 can0@1c000 {
54 compatible = "fsl,flexcan-v1.0";
55 reg = <0x1c000 0x1000>;
56 interrupts = <48 0x2>;
57 interrupt-parent = <&mpic>;
58 fsl,flexcan-clock-source = "platform";
59 fsl,flexcan-clock-divider = <2>;
60 clock-frequency = <fixed by u-boot>;
61 };
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt
index d6d209ded93..c2dbcec0ee3 100644
--- a/Documentation/devicetree/bindings/net/can/sja1000.txt
+++ b/Documentation/devicetree/bindings/net/can/sja1000.txt
@@ -39,7 +39,7 @@ Optional properties:
39 39
40- nxp,no-comparator-bypass : Allows to disable the CAN input comperator. 40- nxp,no-comparator-bypass : Allows to disable the CAN input comperator.
41 41
42For futher information, please have a look to the SJA1000 data sheet. 42For further information, please have a look to the SJA1000 data sheet.
43 43
44Examples: 44Examples:
45 45
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
index edb7ae19e86..2c6be0377f5 100644
--- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
+++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
@@ -74,3 +74,57 @@ Example:
74 interrupt-parent = <&mpic>; 74 interrupt-parent = <&mpic>;
75 phy-handle = <&phy0> 75 phy-handle = <&phy0>
76 }; 76 };
77
78* Gianfar PTP clock nodes
79
80General Properties:
81
82 - compatible Should be "fsl,etsec-ptp"
83 - reg Offset and length of the register set for the device
84 - interrupts There should be at least two interrupts. Some devices
85 have as many as four PTP related interrupts.
86
87Clock Properties:
88
89 - fsl,tclk-period Timer reference clock period in nanoseconds.
90 - fsl,tmr-prsc Prescaler, divides the output clock.
91 - fsl,tmr-add Frequency compensation value.
92 - fsl,tmr-fiper1 Fixed interval period pulse generator.
93 - fsl,tmr-fiper2 Fixed interval period pulse generator.
94 - fsl,max-adj Maximum frequency adjustment in parts per billion.
95
96 These properties set the operational parameters for the PTP
97 clock. You must choose these carefully for the clock to work right.
98 Here is how to figure good values:
99
100 TimerOsc = system clock MHz
101 tclk_period = desired clock period nanoseconds
102 NominalFreq = 1000 / tclk_period MHz
103 FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0)
104 tmr_add = ceil(2^32 / FreqDivRatio)
105 OutputClock = NominalFreq / tmr_prsc MHz
106 PulseWidth = 1 / OutputClock microseconds
107 FiperFreq1 = desired frequency in Hz
108 FiperDiv1 = 1000000 * OutputClock / FiperFreq1
109 tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period
110 max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1
111
112 The calculation for tmr_fiper2 is the same as for tmr_fiper1. The
113 driver expects that tmr_fiper1 will be correctly set to produce a 1
114 Pulse Per Second (PPS) signal, since this will be offered to the PPS
115 subsystem to synchronize the Linux clock.
116
117Example:
118
119 ptp_clock@24E00 {
120 compatible = "fsl,etsec-ptp";
121 reg = <0x24E00 0xB0>;
122 interrupts = <12 0x8 13 0x8>;
123 interrupt-parent = < &ipic >;
124 fsl,tclk-period = <10>;
125 fsl,tmr-prsc = <100>;
126 fsl,tmr-add = <0x999999A4>;
127 fsl,tmr-fiper1 = <0x3B9AC9F6>;
128 fsl,tmr-fiper2 = <0x00018696>;
129 fsl,max-adj = <659999998>;
130 };
diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/open-pic.txt
new file mode 100644
index 00000000000..909a902dff8
--- /dev/null
+++ b/Documentation/devicetree/bindings/open-pic.txt
@@ -0,0 +1,98 @@
1* Open PIC Binding
2
3This binding specifies what properties must be available in the device tree
4representation of an Open PIC compliant interrupt controller. This binding is
5based on the binding defined for Open PIC in [1] and is a superset of that
6binding.
7
8Required properties:
9
10 NOTE: Many of these descriptions were paraphrased here from [1] to aid
11 readability.
12
13 - compatible: Specifies the compatibility list for the PIC. The type
14 shall be <string> and the value shall include "open-pic".
15
16 - reg: Specifies the base physical address(s) and size(s) of this
17 PIC's addressable register space. The type shall be <prop-encoded-array>.
18
19 - interrupt-controller: The presence of this property identifies the node
20 as an Open PIC. No property value shall be defined.
21
22 - #interrupt-cells: Specifies the number of cells needed to encode an
23 interrupt source. The type shall be a <u32> and the value shall be 2.
24
25 - #address-cells: Specifies the number of cells needed to encode an
26 address. The type shall be <u32> and the value shall be 0. As such,
27 'interrupt-map' nodes do not have to specify a parent unit address.
28
29Optional properties:
30
31 - pic-no-reset: The presence of this property indicates that the PIC
32 shall not be reset during runtime initialization. No property value shall
33 be defined. The presence of this property also mandates that any
34 initialization related to interrupt sources shall be limited to sources
35 explicitly referenced in the device tree.
36
37* Interrupt Specifier Definition
38
39 Interrupt specifiers consists of 2 cells encoded as
40 follows:
41
42 - <1st-cell>: The interrupt-number that identifies the interrupt source.
43
44 - <2nd-cell>: The level-sense information, encoded as follows:
45 0 = low-to-high edge triggered
46 1 = active low level-sensitive
47 2 = active high level-sensitive
48 3 = high-to-low edge triggered
49
50* Examples
51
52Example 1:
53
54 /*
55 * An Open PIC interrupt controller
56 */
57 mpic: pic@40000 {
58 // This is an interrupt controller node.
59 interrupt-controller;
60
61 // No address cells so that 'interrupt-map' nodes which reference
62 // this Open PIC node do not need a parent address specifier.
63 #address-cells = <0>;
64
65 // Two cells to encode interrupt sources.
66 #interrupt-cells = <2>;
67
68 // Offset address of 0x40000 and size of 0x40000.
69 reg = <0x40000 0x40000>;
70
71 // Compatible with Open PIC.
72 compatible = "open-pic";
73
74 // The PIC shall not be reset.
75 pic-no-reset;
76 };
77
78Example 2:
79
80 /*
81 * An interrupt generating device that is wired to an Open PIC.
82 */
83 serial0: serial@4500 {
84 // Interrupt source '42' that is active high level-sensitive.
85 // Note that there are only two cells as specified in the interrupt
86 // parent's '#interrupt-cells' property.
87 interrupts = <42 2>;
88
89 // The interrupt controller that this device is wired to.
90 interrupt-parent = <&mpic>;
91 };
92
93* References
94
95[1] Power.org (TM) Standard for Embedded Power Architecture (TM) Platform
96 Requirements (ePAPR), Version 1.0, July 2008.
97 (http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf)
98
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt b/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt
new file mode 100644
index 00000000000..781955f5217
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt
@@ -0,0 +1,20 @@
1* Freescale PQ3 and QorIQ based Cache SRAM
2
3Freescale's mpc85xx and some QorIQ platforms provide an
4option of configuring a part of (or full) cache memory
5as SRAM. This cache SRAM representation in the device
6tree should be done as under:-
7
8Required properties:
9
10- compatible : should be "fsl,p2020-cache-sram"
11- fsl,cache-sram-ctlr-handle : points to the L2 controller
12- reg : offset and length of the cache-sram.
13
14Example:
15
16cache-sram@fff00000 {
17 fsl,cache-sram-ctlr-handle = <&L2>;
18 reg = <0 0xfff00000 0 0x10000>;
19 compatible = "fsl,p2020-cache-sram";
20};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt b/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
new file mode 100644
index 00000000000..939a26d541f
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
@@ -0,0 +1,76 @@
1Integrated Flash Controller
2
3Properties:
4- name : Should be ifc
5- compatible : should contain "fsl,ifc". The version of the integrated
6 flash controller can be found in the IFC_REV register at
7 offset zero.
8
9- #address-cells : Should be either two or three. The first cell is the
10 chipselect number, and the remaining cells are the
11 offset into the chipselect.
12- #size-cells : Either one or two, depending on how large each chipselect
13 can be.
14- reg : Offset and length of the register set for the device
15- interrupts : IFC has two interrupts. The first one is the "common"
16 interrupt(CM_EVTER_STAT), and second is the NAND interrupt
17 (NAND_EVTER_STAT).
18
19- ranges : Each range corresponds to a single chipselect, and covers
20 the entire access window as configured.
21
22Child device nodes describe the devices connected to IFC such as NOR (e.g.
23cfi-flash) and NAND (fsl,ifc-nand). There might be board specific devices
24like FPGAs, CPLDs, etc.
25
26Example:
27
28 ifc@ffe1e000 {
29 compatible = "fsl,ifc", "simple-bus";
30 #address-cells = <2>;
31 #size-cells = <1>;
32 reg = <0x0 0xffe1e000 0 0x2000>;
33 interrupts = <16 2 19 2>;
34
35 /* NOR, NAND Flashes and CPLD on board */
36 ranges = <0x0 0x0 0x0 0xee000000 0x02000000
37 0x1 0x0 0x0 0xffa00000 0x00010000
38 0x3 0x0 0x0 0xffb00000 0x00020000>;
39
40 flash@0,0 {
41 #address-cells = <1>;
42 #size-cells = <1>;
43 compatible = "cfi-flash";
44 reg = <0x0 0x0 0x2000000>;
45 bank-width = <2>;
46 device-width = <1>;
47
48 partition@0 {
49 /* 32MB for user data */
50 reg = <0x0 0x02000000>;
51 label = "NOR Data";
52 };
53 };
54
55 flash@1,0 {
56 #address-cells = <1>;
57 #size-cells = <1>;
58 compatible = "fsl,ifc-nand";
59 reg = <0x1 0x0 0x10000>;
60
61 partition@0 {
62 /* This location must not be altered */
63 /* 1MB for u-boot Bootloader Image */
64 reg = <0x0 0x00100000>;
65 label = "NAND U-Boot Image";
66 read-only;
67 };
68 };
69
70 cpld@3,0 {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 compatible = "fsl,p1010rdb-cpld";
74 reg = <0x3 0x0 0x000001f>;
75 };
76 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt
new file mode 100644
index 00000000000..df41958140e
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt
@@ -0,0 +1,38 @@
1* Freescale MPIC timers
2
3Required properties:
4- compatible: "fsl,mpic-global-timer"
5
6- reg : Contains two regions. The first is the main timer register bank
7 (GTCCRxx, GTBCRxx, GTVPRxx, GTDRxx). The second is the timer control
8 register (TCRx) for the group.
9
10- fsl,available-ranges: use <start count> style section to define which
11 timer interrupts can be used. This property is optional; without this,
12 all timers within the group can be used.
13
14- interrupts: one interrupt per timer in the group, in order, starting
15 with timer zero. If timer-available-ranges is present, only the
16 interrupts that correspond to available timers shall be present.
17
18Example:
19 /* Note that this requires #interrupt-cells to be 4 */
20 timer0: timer@41100 {
21 compatible = "fsl,mpic-global-timer";
22 reg = <0x41100 0x100 0x41300 4>;
23
24 /* Another AMP partition is using timers 0 and 1 */
25 fsl,available-ranges = <2 2>;
26
27 interrupts = <2 0 3 0
28 3 0 3 0>;
29 };
30
31 timer1: timer@42100 {
32 compatible = "fsl,mpic-global-timer";
33 reg = <0x42100 0x100 0x42300 4>;
34 interrupts = <4 0 3 0
35 5 0 3 0
36 6 0 3 0
37 7 0 3 0>;
38 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
index 71e39cf3215..2cf38bd841f 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
@@ -1,42 +1,211 @@
1* OpenPIC and its interrupt numbers on Freescale's e500/e600 cores 1=====================================================================
2 2Freescale MPIC Interrupt Controller Node
3The OpenPIC specification does not specify which interrupt source has to 3Copyright (C) 2010,2011 Freescale Semiconductor Inc.
4become which interrupt number. This is up to the software implementation 4=====================================================================
5of the interrupt controller. The only requirement is that every 5
6interrupt source has to have an unique interrupt number / vector number. 6The Freescale MPIC interrupt controller is found on all PowerQUICC
7To accomplish this the current implementation assigns the number zero to 7and QorIQ processors and is compatible with the Open PIC. The
8the first source, the number one to the second source and so on until 8notable difference from Open PIC binding is the addition of 2
9all interrupt sources have their unique number. 9additional cells in the interrupt specifier defining interrupt type
10Usually the assigned vector number equals the interrupt number mentioned 10information.
11in the documentation for a given core / CPU. This is however not true 11
12for the e500 cores (MPC85XX CPUs) where the documentation distinguishes 12PROPERTIES
13between internal and external interrupt sources and starts counting at 13
14zero for both of them. 14 - compatible
15 15 Usage: required
16So what to write for external interrupt source X or internal interrupt 16 Value type: <string>
17source Y into the device tree? Here is an example: 17 Definition: Shall include "fsl,mpic". Freescale MPIC
18 18 controllers compatible with this binding have Block
19The memory map for the interrupt controller in the MPC8544[0] shows, 19 Revision Registers BRR1 and BRR2 at offset 0x0 and
20that the first interrupt source starts at 0x5_0000 (PIC Register Address 20 0x10 in the MPIC.
21Map-Interrupt Source Configuration Registers). This source becomes the 21
22number zero therefore: 22 - reg
23 External interrupt 0 = interrupt number 0 23 Usage: required
24 External interrupt 1 = interrupt number 1 24 Value type: <prop-encoded-array>
25 External interrupt 2 = interrupt number 2 25 Definition: A standard property. Specifies the physical
26 ... 26 offset and length of the device's registers within the
27Every interrupt number allocates 0x20 bytes register space. So to get 27 CCSR address space.
28its number it is sufficient to shift the lower 16bits to right by five. 28
29So for the external interrupt 10 we have: 29 - interrupt-controller
30 0x0140 >> 5 = 10 30 Usage: required
31 31 Value type: <empty>
32After the external sources, the internal sources follow. The in core I2C 32 Definition: Specifies that this node is an interrupt
33controller on the MPC8544 for instance has the internal source number 33 controller
3427. Oo obtain its interrupt number we take the lower 16bits of its memory 34
35address (0x5_0560) and shift it right: 35 - #interrupt-cells
36 0x0560 >> 5 = 43 36 Usage: required
37 37 Value type: <u32>
38Therefore the I2C device node for the MPC8544 CPU has to have the 38 Definition: Shall be 2 or 4. A value of 2 means that interrupt
39interrupt number 43 specified in the device tree. 39 specifiers do not contain the interrupt-type or type-specific
40 40 information cells.
41[0] MPC8544E PowerQUICCTM III, Integrated Host Processor Family Reference Manual 41
42 MPC8544ERM Rev. 1 10/2007 42 - #address-cells
43 Usage: required
44 Value type: <u32>
45 Definition: Shall be 0.
46
47 - pic-no-reset
48 Usage: optional
49 Value type: <empty>
50 Definition: The presence of this property specifies that the
51 MPIC must not be reset by the client program, and that
52 the boot program has initialized all interrupt source
53 configuration registers to a sane state-- masked or
54 directed at other cores. This ensures that the client
55 program will not receive interrupts for sources not belonging
56 to the client. The presence of this property also mandates
57 that any initialization related to interrupt sources shall
58 be limited to sources explicitly referenced in the device tree.
59
60INTERRUPT SPECIFIER DEFINITION
61
62 Interrupt specifiers consists of 4 cells encoded as
63 follows:
64
65 <1st-cell> interrupt-number
66
67 Identifies the interrupt source. The meaning
68 depends on the type of interrupt.
69
70 Note: If the interrupt-type cell is undefined
71 (i.e. #interrupt-cells = 2), this cell
72 should be interpreted the same as for
73 interrupt-type 0-- i.e. an external or
74 normal SoC device interrupt.
75
76 <2nd-cell> level-sense information, encoded as follows:
77 0 = low-to-high edge triggered
78 1 = active low level-sensitive
79 2 = active high level-sensitive
80 3 = high-to-low edge triggered
81
82 <3rd-cell> interrupt-type
83
84 The following types are supported:
85
86 0 = external or normal SoC device interrupt
87
88 The interrupt-number cell contains
89 the SoC device interrupt number. The
90 type-specific cell is undefined. The
91 interrupt-number is derived from the
92 MPIC a block of registers referred to as
93 the "Interrupt Source Configuration Registers".
94 Each source has 32-bytes of registers
95 (vector/priority and destination) in this
96 region. So interrupt 0 is at offset 0x0,
97 interrupt 1 is at offset 0x20, and so on.
98
99 1 = error interrupt
100
101 The interrupt-number cell contains
102 the SoC device interrupt number for
103 the error interrupt. The type-specific
104 cell identifies the specific error
105 interrupt number.
106
107 2 = MPIC inter-processor interrupt (IPI)
108
109 The interrupt-number cell identifies
110 the MPIC IPI number. The type-specific
111 cell is undefined.
112
113 3 = MPIC timer interrupt
114
115 The interrupt-number cell identifies
116 the MPIC timer number. The type-specific
117 cell is undefined.
118
119 <4th-cell> type-specific information
120
121 The type-specific cell is encoded as follows:
122
123 - For interrupt-type 1 (error interrupt),
124 the type-specific cell contains the
125 bit number of the error interrupt in the
126 Error Interrupt Summary Register.
127
128EXAMPLE 1
129 /*
130 * mpic interrupt controller with 4 cells per specifier
131 */
132 mpic: pic@40000 {
133 compatible = "fsl,mpic";
134 interrupt-controller;
135 #interrupt-cells = <4>;
136 #address-cells = <0>;
137 reg = <0x40000 0x40000>;
138 };
139
140EXAMPLE 2
141 /*
142 * The MPC8544 I2C controller node has an internal
143 * interrupt number of 27. As per the reference manual
144 * this corresponds to interrupt source configuration
145 * registers at 0x5_0560.
146 *
147 * The interrupt source configuration registers begin
148 * at 0x5_0000.
149 *
150 * To compute the interrupt specifier interrupt number
151 *
152 * 0x560 >> 5 = 43
153 *
154 * The interrupt source configuration registers begin
155 * at 0x5_0000, and so the i2c vector/priority registers
156 * are at 0x5_0560.
157 */
158 i2c@3000 {
159 #address-cells = <1>;
160 #size-cells = <0>;
161 cell-index = <0>;
162 compatible = "fsl-i2c";
163 reg = <0x3000 0x100>;
164 interrupts = <43 2>;
165 interrupt-parent = <&mpic>;
166 dfsrr;
167 };
168
169
170EXAMPLE 3
171 /*
172 * Definition of a node defining the 4
173 * MPIC IPI interrupts. Note the interrupt
174 * type of 2.
175 */
176 ipi@410a0 {
177 compatible = "fsl,mpic-ipi";
178 reg = <0x40040 0x10>;
179 interrupts = <0 0 2 0
180 1 0 2 0
181 2 0 2 0
182 3 0 2 0>;
183 };
184
185EXAMPLE 4
186 /*
187 * Definition of a node defining the MPIC
188 * global timers. Note the interrupt
189 * type of 3.
190 */
191 timer0: timer@41100 {
192 compatible = "fsl,mpic-global-timer";
193 reg = <0x41100 0x100 0x41300 4>;
194 interrupts = <0 0 3 0
195 1 0 3 0
196 2 0 3 0
197 3 0 3 0>;
198 };
199
200EXAMPLE 5
201 /*
202 * Definition of an error interrupt (interrupt type 1).
203 * SoC interrupt number is 16 and the specific error
204 * interrupt bit in the error interrupt summary register
205 * is 23.
206 */
207 memory-controller@8000 {
208 compatible = "fsl,p4080-memory-controller";
209 reg = <0x8000 0x1000>;
210 interrupts = <16 2 1 23>;
211 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
index bcc30bac683..70558c3f368 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
@@ -5,14 +5,21 @@ Required properties:
5 first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572, 5 first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572,
6 etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on 6 etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
7 the parent type. 7 the parent type.
8
8- reg : should contain the address and the length of the shared message 9- reg : should contain the address and the length of the shared message
9 interrupt register set. 10 interrupt register set.
11
10- msi-available-ranges: use <start count> style section to define which 12- msi-available-ranges: use <start count> style section to define which
11 msi interrupt can be used in the 256 msi interrupts. This property is 13 msi interrupt can be used in the 256 msi interrupts. This property is
12 optional, without this, all the 256 MSI interrupts can be used. 14 optional, without this, all the 256 MSI interrupts can be used.
15 Each available range must begin and end on a multiple of 32 (i.e.
16 no splitting an individual MSI register or the associated PIC interrupt).
17
13- interrupts : each one of the interrupts here is one entry per 32 MSIs, 18- interrupts : each one of the interrupts here is one entry per 32 MSIs,
14 and routed to the host interrupt controller. the interrupts should 19 and routed to the host interrupt controller. the interrupts should
15 be set as edge sensitive. 20 be set as edge sensitive. If msi-available-ranges is present, only
21 the interrupts that correspond to available ranges shall be present.
22
16- interrupt-parent: the phandle for the interrupt controller 23- interrupt-parent: the phandle for the interrupt controller
17 that services interrupts for this device. for 83xx cpu, the interrupts 24 that services interrupts for this device. for 83xx cpu, the interrupts
18 are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed 25 are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed
diff --git a/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt
index a7e155a023b..36afa322b04 100644
--- a/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt
+++ b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt
@@ -127,7 +127,7 @@ Nintendo Wii device tree
127 - reg : should contain the SDHCI registers location and length 127 - reg : should contain the SDHCI registers location and length
128 - interrupts : should contain the SDHCI interrupt 128 - interrupts : should contain the SDHCI interrupt
129 129
1301.j) The Inter-Processsor Communication (IPC) node 1301.j) The Inter-Processor Communication (IPC) node
131 131
132 Represent the Inter-Processor Communication interface. This interface 132 Represent the Inter-Processor Communication interface. This interface
133 enables communications between the Broadway and the Starlet processors. 133 enables communications between the Broadway and the Starlet processors.
diff --git a/Documentation/devicetree/bindings/rtc/rtc-cmos.txt b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
new file mode 100644
index 00000000000..7382989b305
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
@@ -0,0 +1,28 @@
1 Motorola mc146818 compatible RTC
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4Required properties:
5 - compatible : "motorola,mc146818"
6 - reg : should contain registers location and length.
7
8Optional properties:
9 - interrupts : should contain interrupt.
10 - interrupt-parent : interrupt source phandle.
11 - ctrl-reg : Contains the initial value of the control register also
12 called "Register B".
13 - freq-reg : Contains the initial value of the frequency register also
14 called "Regsiter A".
15
16"Register A" and "B" are usually initialized by the firmware (BIOS for
17instance). If this is not done, it can be performed by the driver.
18
19ISA Example:
20
21 rtc@70 {
22 compatible = "motorola,mc146818";
23 interrupts = <8 3>;
24 interrupt-parent = <&ioapic1>;
25 ctrl-reg = <2>;
26 freq-reg = <0x26>;
27 reg = <1 0x70 2>;
28 };
diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 00000000000..c152f65f9a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -0,0 +1,4 @@
1Altera JTAG UART
2
3Required properties:
4- compatible : should be "ALTR,juart-1.0"
diff --git a/Documentation/devicetree/bindings/serial/altera_uart.txt b/Documentation/devicetree/bindings/serial/altera_uart.txt
new file mode 100644
index 00000000000..71cae3f7010
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_uart.txt
@@ -0,0 +1,7 @@
1Altera UART
2
3Required properties:
4- compatible : should be "ALTR,uart-1.0"
5
6Optional properties:
7- clock-frequency : frequency of the clock input to the UART
diff --git a/Documentation/devicetree/bindings/serio/altera_ps2.txt b/Documentation/devicetree/bindings/serio/altera_ps2.txt
new file mode 100644
index 00000000000..4d9eecc2ef7
--- /dev/null
+++ b/Documentation/devicetree/bindings/serio/altera_ps2.txt
@@ -0,0 +1,4 @@
1Altera UP PS/2 controller
2
3Required properties:
4- compatible : should be "ALTR,ps2-1.0".
diff --git a/Documentation/devicetree/bindings/spi/spi_altera.txt b/Documentation/devicetree/bindings/spi/spi_altera.txt
new file mode 100644
index 00000000000..dda37594350
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi_altera.txt
@@ -0,0 +1,4 @@
1Altera SPI
2
3Required properties:
4- compatible : should be "ALTR,spi-1.0".
diff --git a/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt b/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt
new file mode 100644
index 00000000000..d95c0b367a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt
@@ -0,0 +1,12 @@
1OpenCores tiny SPI
2
3Required properties:
4- compatible : should be "opencores,tiny-spi-rtlsvn2".
5- gpios : should specify GPIOs used for chipselect.
6Optional properties:
7- clock-frequency : input clock frequency to the core.
8- baud-width: width, in bits, of the programmable divider used to scale
9 the input clock to SCLK.
10
11The clock-frequency and baud-width properties are needed only if the divider
12is programmable. They are not needed if the divider is fixed.
diff --git a/Documentation/devicetree/bindings/x86/ce4100.txt b/Documentation/devicetree/bindings/x86/ce4100.txt
new file mode 100644
index 00000000000..b49ae593a60
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/ce4100.txt
@@ -0,0 +1,38 @@
1CE4100 Device Tree Bindings
2---------------------------
3
4The CE4100 SoC uses for in core peripherals the following compatible
5format: <vendor>,<chip>-<device>.
6Many of the "generic" devices like HPET or IO APIC have the ce4100
7name in their compatible property because they first appeared in this
8SoC.
9
10The CPU node
11------------
12 cpu@0 {
13 device_type = "cpu";
14 compatible = "intel,ce4100";
15 reg = <0>;
16 lapic = <&lapic0>;
17 };
18
19The reg property describes the CPU number. The lapic property points to
20the local APIC timer.
21
22The SoC node
23------------
24
25This node describes the in-core peripherals. Required property:
26 compatible = "intel,ce4100-cp";
27
28The PCI node
29------------
30This node describes the PCI bus on the SoC. Its property should be
31 compatible = "intel,ce4100-pci", "pci";
32
33If the OS is using the IO-APIC for interrupt routing then the reported
34interrupt numbers for devices is no longer true. In order to obtain the
35correct interrupt number, the child node which represents the device has
36to contain the interrupt property. Besides the interrupt property it has
37to contain at least the reg property containing the PCI bus address and
38compatible property according to "PCI Bus Binding Revision 2.1".
diff --git a/Documentation/devicetree/bindings/x86/interrupt.txt b/Documentation/devicetree/bindings/x86/interrupt.txt
new file mode 100644
index 00000000000..7d19f494f19
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/interrupt.txt
@@ -0,0 +1,26 @@
1Interrupt chips
2---------------
3
4* Intel I/O Advanced Programmable Interrupt Controller (IO APIC)
5
6 Required properties:
7 --------------------
8 compatible = "intel,ce4100-ioapic";
9 #interrupt-cells = <2>;
10
11 Device's interrupt property:
12
13 interrupts = <P S>;
14
15 The first number (P) represents the interrupt pin which is wired to the
16 IO APIC. The second number (S) represents the sense of interrupt which
17 should be configured and can be one of:
18 0 - Edge Rising
19 1 - Level Low
20 2 - Level High
21 3 - Edge Falling
22
23* Local APIC
24 Required property:
25
26 compatible = "intel,ce4100-lapic";
diff --git a/Documentation/devicetree/bindings/x86/timer.txt b/Documentation/devicetree/bindings/x86/timer.txt
new file mode 100644
index 00000000000..c688af58e3b
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/timer.txt
@@ -0,0 +1,6 @@
1Timers
2------
3
4* High Precision Event Timer (HPET)
5 Required property:
6 compatible = "intel,ce4100-hpet";
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 28b1c9d3d35..7c1329de059 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -12,7 +12,9 @@ Table of Contents
12================= 12=================
13 13
14 I - Introduction 14 I - Introduction
15 1) Entry point for arch/powerpc 15 1) Entry point for arch/arm
16 2) Entry point for arch/powerpc
17 3) Entry point for arch/x86
16 18
17 II - The DT block format 19 II - The DT block format
18 1) Header 20 1) Header
@@ -137,7 +139,7 @@ and properties to be present. This will be described in detail in
137section III, but, for example, the kernel does not require you to 139section III, but, for example, the kernel does not require you to
138create a node for every PCI device in the system. It is a requirement 140create a node for every PCI device in the system. It is a requirement
139to have a node for PCI host bridges in order to provide interrupt 141to have a node for PCI host bridges in order to provide interrupt
140routing informations and memory/IO ranges, among others. It is also 142routing information and memory/IO ranges, among others. It is also
141recommended to define nodes for on chip devices and other buses that 143recommended to define nodes for on chip devices and other buses that
142don't specifically fit in an existing OF specification. This creates a 144don't specifically fit in an existing OF specification. This creates a
143great flexibility in the way the kernel can then probe those and match 145great flexibility in the way the kernel can then probe those and match
@@ -147,7 +149,46 @@ upgrades without significantly impacting the kernel code or cluttering
147it with special cases. 149it with special cases.
148 150
149 151
1501) Entry point for arch/powerpc 1521) Entry point for arch/arm
153---------------------------
154
155 There is one single entry point to the kernel, at the start
156 of the kernel image. That entry point supports two calling
157 conventions. A summary of the interface is described here. A full
158 description of the boot requirements is documented in
159 Documentation/arm/Booting
160
161 a) ATAGS interface. Minimal information is passed from firmware
162 to the kernel with a tagged list of predefined parameters.
163
164 r0 : 0
165
166 r1 : Machine type number
167
168 r2 : Physical address of tagged list in system RAM
169
170 b) Entry with a flattened device-tree block. Firmware loads the
171 physical address of the flattened device tree block (dtb) into r2,
172 r1 is not used, but it is considered good practise to use a valid
173 machine number as described in Documentation/arm/Booting.
174
175 r0 : 0
176
177 r1 : Valid machine type number. When using a device tree,
178 a single machine type number will often be assigned to
179 represent a class or family of SoCs.
180
181 r2 : physical pointer to the device-tree block
182 (defined in chapter II) in RAM. Device tree can be located
183 anywhere in system RAM, but it should be aligned on a 64 bit
184 boundary.
185
186 The kernel will differentiate between ATAGS and device tree booting by
187 reading the memory pointed to by r2 and looking for either the flattened
188 device tree block magic value (0xd00dfeed) or the ATAG_CORE value at
189 offset 0x4 from r2 (0x54410001).
190
1912) Entry point for arch/powerpc
151------------------------------- 192-------------------------------
152 193
153 There is one single entry point to the kernel, at the start 194 There is one single entry point to the kernel, at the start
@@ -225,6 +266,25 @@ it with special cases.
225 cannot support both configurations with Book E and configurations 266 cannot support both configurations with Book E and configurations
226 with classic Powerpc architectures. 267 with classic Powerpc architectures.
227 268
2693) Entry point for arch/x86
270-------------------------------
271
272 There is one single 32bit entry point to the kernel at code32_start,
273 the decompressor (the real mode entry point goes to the same 32bit
274 entry point once it switched into protected mode). That entry point
275 supports one calling convention which is documented in
276 Documentation/x86/boot.txt
277 The physical pointer to the device-tree block (defined in chapter II)
278 is passed via setup_data which requires at least boot protocol 2.09.
279 The type filed is defined as
280
281 #define SETUP_DTB 2
282
283 This device-tree is used as an extension to the "boot page". As such it
284 does not parse / consider data which is already covered by the boot
285 page. This includes memory size, reserved ranges, command line arguments
286 or initrd address. It simply holds information which can not be retrieved
287 otherwise like interrupt routing or a list of devices behind an I2C bus.
228 288
229II - The DT block format 289II - The DT block format
230======================== 290========================
@@ -365,7 +425,7 @@ struct boot_param_header {
365 among others, by kexec. If you are on an SMP system, this value 425 among others, by kexec. If you are on an SMP system, this value
366 should match the content of the "reg" property of the CPU node in 426 should match the content of the "reg" property of the CPU node in
367 the device-tree corresponding to the CPU calling the kernel entry 427 the device-tree corresponding to the CPU calling the kernel entry
368 point (see further chapters for more informations on the required 428 point (see further chapters for more information on the required
369 device-tree contents) 429 device-tree contents)
370 430
371 - size_dt_strings 431 - size_dt_strings
@@ -533,7 +593,7 @@ looks like in practice.
533 593
534This tree is almost a minimal tree. It pretty much contains the 594This tree is almost a minimal tree. It pretty much contains the
535minimal set of required nodes and properties to boot a linux kernel; 595minimal set of required nodes and properties to boot a linux kernel;
536that is, some basic model informations at the root, the CPUs, and the 596that is, some basic model information at the root, the CPUs, and the
537physical memory layout. It also includes misc information passed 597physical memory layout. It also includes misc information passed
538through /chosen, like in this example, the platform type (mandatory) 598through /chosen, like in this example, the platform type (mandatory)
539and the kernel command line arguments (optional). 599and the kernel command line arguments (optional).
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine.txt
index 0c1c2f63c0a..5a0cb1ef616 100644
--- a/Documentation/dmaengine.txt
+++ b/Documentation/dmaengine.txt
@@ -1 +1,96 @@
1See Documentation/crypto/async-tx-api.txt 1 DMA Engine API Guide
2 ====================
3
4 Vinod Koul <vinod dot koul at intel.com>
5
6NOTE: For DMA Engine usage in async_tx please see:
7 Documentation/crypto/async-tx-api.txt
8
9
10Below is a guide to device driver writers on how to use the Slave-DMA API of the
11DMA Engine. This is applicable only for slave DMA usage only.
12
13The slave DMA usage consists of following steps
141. Allocate a DMA slave channel
152. Set slave and controller specific parameters
163. Get a descriptor for transaction
174. Submit the transaction and wait for callback notification
18
191. Allocate a DMA slave channel
20Channel allocation is slightly different in the slave DMA context, client
21drivers typically need a channel from a particular DMA controller only and even
22in some cases a specific channel is desired. To request a channel
23dma_request_channel() API is used.
24
25Interface:
26struct dma_chan *dma_request_channel(dma_cap_mask_t mask,
27 dma_filter_fn filter_fn,
28 void *filter_param);
29where dma_filter_fn is defined as:
30typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
31
32When the optional 'filter_fn' parameter is set to NULL dma_request_channel
33simply returns the first channel that satisfies the capability mask. Otherwise,
34when the mask parameter is insufficient for specifying the necessary channel,
35the filter_fn routine can be used to disposition the available channels in the
36system. The filter_fn routine is called once for each free channel in the
37system. Upon seeing a suitable channel filter_fn returns DMA_ACK which flags
38that channel to be the return value from dma_request_channel. A channel
39allocated via this interface is exclusive to the caller, until
40dma_release_channel() is called.
41
422. Set slave and controller specific parameters
43Next step is always to pass some specific information to the DMA driver. Most of
44the generic information which a slave DMA can use is in struct dma_slave_config.
45It allows the clients to specify DMA direction, DMA addresses, bus widths, DMA
46burst lengths etc. If some DMA controllers have more parameters to be sent then
47they should try to embed struct dma_slave_config in their controller specific
48structure. That gives flexibility to client to pass more parameters, if
49required.
50
51Interface:
52int dmaengine_slave_config(struct dma_chan *chan,
53 struct dma_slave_config *config)
54
553. Get a descriptor for transaction
56For slave usage the various modes of slave transfers supported by the
57DMA-engine are:
58slave_sg - DMA a list of scatter gather buffers from/to a peripheral
59dma_cyclic - Perform a cyclic DMA operation from/to a peripheral till the
60 operation is explicitly stopped.
61The non NULL return of this transfer API represents a "descriptor" for the given
62transaction.
63
64Interface:
65struct dma_async_tx_descriptor *(*chan->device->device_prep_dma_sg)(
66 struct dma_chan *chan,
67 struct scatterlist *dst_sg, unsigned int dst_nents,
68 struct scatterlist *src_sg, unsigned int src_nents,
69 unsigned long flags);
70struct dma_async_tx_descriptor *(*chan->device->device_prep_dma_cyclic)(
71 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
72 size_t period_len, enum dma_data_direction direction);
73
744. Submit the transaction and wait for callback notification
75To schedule the transaction to be scheduled by dma device, the "descriptor"
76returned in above (3) needs to be submitted.
77To tell the dma driver that a transaction is ready to be serviced, the
78descriptor->submit() callback needs to be invoked. This chains the descriptor to
79the pending queue.
80The transactions in the pending queue can be activated by calling the
81issue_pending API. If channel is idle then the first transaction in queue is
82started and subsequent ones queued up.
83On completion of the DMA operation the next in queue is submitted and a tasklet
84triggered. The tasklet would then call the client driver completion callback
85routine for notification, if set.
86Interface:
87void dma_async_issue_pending(struct dma_chan *chan);
88
89==============================================================================
90
91Additional usage notes for dma driver writers
921/ Although DMA engine specifies that completion callback routines cannot submit
93any new operations, but typically for slave DMA subsequent transaction may not
94be available for submit prior to callback routine being called. This requirement
95is not a requirement for DMA-slave devices. But they should take care to drop
96the spin-lock they might be holding before calling the callback routine
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 470d3dba1a6..dfa6fc6e4b2 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -1,6 +1,8 @@
1*.a 1*.a
2*.aux 2*.aux
3*.bin 3*.bin
4*.bz2
5*.cis
4*.cpio 6*.cpio
5*.csp 7*.csp
6*.dsp 8*.dsp
@@ -8,6 +10,8 @@
8*.elf 10*.elf
9*.eps 11*.eps
10*.fw 12*.fw
13*.gcno
14*.gcov
11*.gen.S 15*.gen.S
12*.gif 16*.gif
13*.grep 17*.grep
@@ -19,14 +23,20 @@
19*.ko 23*.ko
20*.log 24*.log
21*.lst 25*.lst
26*.lzma
27*.lzo
28*.mo
22*.moc 29*.moc
23*.mod.c 30*.mod.c
24*.o 31*.o
25*.o.* 32*.o.*
33*.order
26*.orig 34*.orig
27*.out 35*.out
36*.patch
28*.pdf 37*.pdf
29*.png 38*.png
39*.pot
30*.ps 40*.ps
31*.rej 41*.rej
32*.s 42*.s
@@ -39,16 +49,22 @@
39*.tex 49*.tex
40*.ver 50*.ver
41*.xml 51*.xml
52*.xz
42*_MODULES 53*_MODULES
43*_vga16.c 54*_vga16.c
44*~ 55*~
56\#*#
45*.9 57*.9
46*.9.gz
47.* 58.*
59.*.d
48.mm 60.mm
4953c700_d.h 6153c700_d.h
50CVS 62CVS
51ChangeSet 63ChangeSet
64GPATH
65GRTAGS
66GSYMS
67GTAGS
52Image 68Image
53Kerntypes 69Kerntypes
54Module.markers 70Module.markers
@@ -57,15 +73,14 @@ PENDING
57SCCS 73SCCS
58System.map* 74System.map*
59TAGS 75TAGS
76aconf
77af_names.h
60aic7*reg.h* 78aic7*reg.h*
61aic7*reg_print.c* 79aic7*reg_print.c*
62aic7*seq.h* 80aic7*seq.h*
63aicasm 81aicasm
64aicdb.h* 82aicdb.h*
65altivec1.c 83altivec*.c
66altivec2.c
67altivec4.c
68altivec8.c
69asm-offsets.h 84asm-offsets.h
70asm_offsets.h 85asm_offsets.h
71autoconf.h* 86autoconf.h*
@@ -80,6 +95,7 @@ btfixupprep
80build 95build
81bvmlinux 96bvmlinux
82bzImage* 97bzImage*
98capability_names.h
83capflags.c 99capflags.c
84classlist.h* 100classlist.h*
85comp*.log 101comp*.log
@@ -88,7 +104,8 @@ conf
88config 104config
89config-* 105config-*
90config_data.h* 106config_data.h*
91config_data.gz* 107config.mak
108config.mak.autogen
92conmakehash 109conmakehash
93consolemap_deftbl.c* 110consolemap_deftbl.c*
94cpustr.h 111cpustr.h
@@ -96,7 +113,9 @@ crc32table.h*
96cscope.* 113cscope.*
97defkeymap.c 114defkeymap.c
98devlist.h* 115devlist.h*
116dnotify_test
99docproc 117docproc
118dslm
100elf2ecoff 119elf2ecoff
101elfconfig.h* 120elfconfig.h*
102evergreen_reg_safe.h 121evergreen_reg_safe.h
@@ -105,6 +124,7 @@ flask.h
105fore200e_mkfirm 124fore200e_mkfirm
106fore200e_pca_fw.c* 125fore200e_pca_fw.c*
107gconf 126gconf
127gconf.glade.h
108gen-devlist 128gen-devlist
109gen_crc32table 129gen_crc32table
110gen_init_cpio 130gen_init_cpio
@@ -112,11 +132,12 @@ generated
112genheaders 132genheaders
113genksyms 133genksyms
114*_gray256.c 134*_gray256.c
135hpet_example
136hugepage-mmap
137hugepage-shm
115ihex2fw 138ihex2fw
116ikconfig.h* 139ikconfig.h*
117inat-tables.c 140inat-tables.c
118initramfs_data.cpio
119initramfs_data.cpio.gz
120initramfs_list 141initramfs_list
121int16.c 142int16.c
122int1.c 143int1.c
@@ -133,15 +154,19 @@ kxgettext
133lkc_defs.h 154lkc_defs.h
134lex.c 155lex.c
135lex.*.c 156lex.*.c
157linux
136logo_*.c 158logo_*.c
137logo_*_clut224.c 159logo_*_clut224.c
138logo_*_mono.c 160logo_*_mono.c
139lxdialog 161lxdialog
162mach
140mach-types 163mach-types
141mach-types.h 164mach-types.h
142machtypes.h 165machtypes.h
143map 166map
167map_hugetlb
144maui_boot.h 168maui_boot.h
169media
145mconf 170mconf
146miboot* 171miboot*
147mk_elfconfig 172mk_elfconfig
@@ -150,23 +175,29 @@ mkbugboot
150mkcpustr 175mkcpustr
151mkdep 176mkdep
152mkprep 177mkprep
178mkregtable
153mktables 179mktables
154mktree 180mktree
155modpost 181modpost
156modules.builtin 182modules.builtin
157modules.order 183modules.order
158modversions.h* 184modversions.h*
185nconf
159ncscope.* 186ncscope.*
160offset.h 187offset.h
161offsets.h 188offsets.h
162oui.c* 189oui.c*
190page-types
163parse.c 191parse.c
164parse.h 192parse.h
165patches* 193patches*
166pca200e.bin 194pca200e.bin
167pca200e_ecd.bin2 195pca200e_ecd.bin2
168piggy.gz 196perf.data
197perf.data.old
198perf-archive
169piggyback 199piggyback
200piggy.gzip
170piggy.S 201piggy.S
171pnmtologo 202pnmtologo
172ppc_defs.h* 203ppc_defs.h*
@@ -177,10 +208,9 @@ r200_reg_safe.h
177r300_reg_safe.h 208r300_reg_safe.h
178r420_reg_safe.h 209r420_reg_safe.h
179r600_reg_safe.h 210r600_reg_safe.h
180raid6altivec*.c 211recordmcount
181raid6int*.c
182raid6tables.c
183relocs 212relocs
213rlim_names.h
184rn50_reg_safe.h 214rn50_reg_safe.h
185rs600_reg_safe.h 215rs600_reg_safe.h
186rv515_reg_safe.h 216rv515_reg_safe.h
@@ -194,6 +224,7 @@ split-include
194syscalltab.h 224syscalltab.h
195tables.c 225tables.c
196tags 226tags
227test_get_len
197tftpboot.img 228tftpboot.img
198timeconst.h 229timeconst.h
199times.h* 230times.h*
@@ -210,10 +241,13 @@ vdso32.so.dbg
210vdso64.lds 241vdso64.lds
211vdso64.so.dbg 242vdso64.so.dbg
212version.h* 243version.h*
244vmImage
213vmlinux 245vmlinux
214vmlinux-* 246vmlinux-*
215vmlinux.aout 247vmlinux.aout
248vmlinux.bin.all
216vmlinux.lds 249vmlinux.lds
250vmlinuz
217voffset.h 251voffset.h
218vsyscall.lds 252vsyscall.lds
219vsyscall_32.lds 253vsyscall_32.lds
diff --git a/Documentation/driver-model/bus.txt b/Documentation/driver-model/bus.txt
index 5001b751162..6754b2df8aa 100644
--- a/Documentation/driver-model/bus.txt
+++ b/Documentation/driver-model/bus.txt
@@ -3,24 +3,7 @@ Bus Types
3 3
4Definition 4Definition
5~~~~~~~~~~ 5~~~~~~~~~~
6 6See the kerneldoc for the struct bus_type.
7struct bus_type {
8 char * name;
9
10 struct subsystem subsys;
11 struct kset drivers;
12 struct kset devices;
13
14 struct bus_attribute * bus_attrs;
15 struct device_attribute * dev_attrs;
16 struct driver_attribute * drv_attrs;
17
18 int (*match)(struct device * dev, struct device_driver * drv);
19 int (*hotplug) (struct device *dev, char **envp,
20 int num_envp, char *buffer, int buffer_size);
21 int (*suspend)(struct device * dev, pm_message_t state);
22 int (*resume)(struct device * dev);
23};
24 7
25int bus_register(struct bus_type * bus); 8int bus_register(struct bus_type * bus);
26 9
diff --git a/Documentation/driver-model/class.txt b/Documentation/driver-model/class.txt
index 548505f14aa..1fefc480a80 100644
--- a/Documentation/driver-model/class.txt
+++ b/Documentation/driver-model/class.txt
@@ -27,22 +27,7 @@ The device class structure looks like:
27typedef int (*devclass_add)(struct device *); 27typedef int (*devclass_add)(struct device *);
28typedef void (*devclass_remove)(struct device *); 28typedef void (*devclass_remove)(struct device *);
29 29
30struct device_class { 30See the kerneldoc for the struct class.
31 char * name;
32 rwlock_t lock;
33 u32 devnum;
34 struct list_head node;
35
36 struct list_head drivers;
37 struct list_head intf_list;
38
39 struct driver_dir_entry dir;
40 struct driver_dir_entry device_dir;
41 struct driver_dir_entry driver_dir;
42
43 devclass_add add_device;
44 devclass_remove remove_device;
45};
46 31
47A typical device class definition would look like: 32A typical device class definition would look like:
48 33
diff --git a/Documentation/driver-model/device.txt b/Documentation/driver-model/device.txt
index a124f3126b0..b2ff42685bc 100644
--- a/Documentation/driver-model/device.txt
+++ b/Documentation/driver-model/device.txt
@@ -2,96 +2,7 @@
2The Basic Device Structure 2The Basic Device Structure
3~~~~~~~~~~~~~~~~~~~~~~~~~~ 3~~~~~~~~~~~~~~~~~~~~~~~~~~
4 4
5struct device { 5See the kerneldoc for the struct device.
6 struct list_head g_list;
7 struct list_head node;
8 struct list_head bus_list;
9 struct list_head driver_list;
10 struct list_head intf_list;
11 struct list_head children;
12 struct device * parent;
13
14 char name[DEVICE_NAME_SIZE];
15 char bus_id[BUS_ID_SIZE];
16
17 spinlock_t lock;
18 atomic_t refcount;
19
20 struct bus_type * bus;
21 struct driver_dir_entry dir;
22
23 u32 class_num;
24
25 struct device_driver *driver;
26 void *driver_data;
27 void *platform_data;
28
29 u32 current_state;
30 unsigned char *saved_state;
31
32 void (*release)(struct device * dev);
33};
34
35Fields
36~~~~~~
37g_list: Node in the global device list.
38
39node: Node in device's parent's children list.
40
41bus_list: Node in device's bus's devices list.
42
43driver_list: Node in device's driver's devices list.
44
45intf_list: List of intf_data. There is one structure allocated for
46 each interface that the device supports.
47
48children: List of child devices.
49
50parent: *** FIXME ***
51
52name: ASCII description of device.
53 Example: " 3Com Corporation 3c905 100BaseTX [Boomerang]"
54
55bus_id: ASCII representation of device's bus position. This
56 field should be a name unique across all devices on the
57 bus type the device belongs to.
58
59 Example: PCI bus_ids are in the form of
60 <bus number>:<slot number>.<function number>
61 This name is unique across all PCI devices in the system.
62
63lock: Spinlock for the device.
64
65refcount: Reference count on the device.
66
67bus: Pointer to struct bus_type that device belongs to.
68
69dir: Device's sysfs directory.
70
71class_num: Class-enumerated value of the device.
72
73driver: Pointer to struct device_driver that controls the device.
74
75driver_data: Driver-specific data.
76
77platform_data: Platform data specific to the device.
78
79 Example: for devices on custom boards, as typical of embedded
80 and SOC based hardware, Linux often uses platform_data to point
81 to board-specific structures describing devices and how they
82 are wired. That can include what ports are available, chip
83 variants, which GPIO pins act in what additional roles, and so
84 on. This shrinks the "Board Support Packages" (BSPs) and
85 minimizes board-specific #ifdefs in drivers.
86
87current_state: Current power state of the device.
88
89saved_state: Pointer to saved state of the device. This is usable by
90 the device driver controlling the device.
91
92release: Callback to free the device after all references have
93 gone away. This should be set by the allocator of the
94 device (i.e. the bus driver that discovered the device).
95 6
96 7
97Programming Interface 8Programming Interface
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt
index d2cd6fb8ba9..4421135826a 100644
--- a/Documentation/driver-model/driver.txt
+++ b/Documentation/driver-model/driver.txt
@@ -1,23 +1,7 @@
1 1
2Device Drivers 2Device Drivers
3 3
4struct device_driver { 4See the kerneldoc for the struct device_driver.
5 char * name;
6 struct bus_type * bus;
7
8 struct completion unloaded;
9 struct kobject kobj;
10 list_t devices;
11
12 struct module *owner;
13
14 int (*probe) (struct device * dev);
15 int (*remove) (struct device * dev);
16
17 int (*suspend) (struct device * dev, pm_message_t state);
18 int (*resume) (struct device * dev);
19};
20
21 5
22 6
23Allocation 7Allocation
diff --git a/Documentation/dvb/README.dvb-usb b/Documentation/dvb/README.dvb-usb
index c8238e44ed6..c4d963a67d6 100644
--- a/Documentation/dvb/README.dvb-usb
+++ b/Documentation/dvb/README.dvb-usb
@@ -138,7 +138,7 @@ Hotplug is able to load the driver, when it is needed (because you plugged
138in the device). 138in the device).
139 139
140If you want to enable debug output, you have to load the driver manually and 140If you want to enable debug output, you have to load the driver manually and
141from withing the dvb-kernel cvs repository. 141from within the dvb-kernel cvs repository.
142 142
143first have a look, which debug level are available: 143first have a look, which debug level are available:
144 144
diff --git a/Documentation/dvb/ci.txt b/Documentation/dvb/ci.txt
index 4a0c2b56e69..6c3bda50f7d 100644
--- a/Documentation/dvb/ci.txt
+++ b/Documentation/dvb/ci.txt
@@ -47,7 +47,7 @@ so on.
47 47
48* CI modules that are supported 48* CI modules that are supported
49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50The CI module support is largely dependant upon the firmware on the cards 50The CI module support is largely dependent upon the firmware on the cards
51Some cards do support almost all of the available CI modules. There is 51Some cards do support almost all of the available CI modules. There is
52nothing much that can be done in order to make additional CI modules 52nothing much that can be done in order to make additional CI modules
53working with these cards. 53working with these cards.
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt
index 121832e5d89..97b1373f242 100644
--- a/Documentation/dvb/faq.txt
+++ b/Documentation/dvb/faq.txt
@@ -106,7 +106,7 @@ Some very frequently asked questions about linuxtv-dvb
1065. The dvb_net device doesn't give me any packets at all 1065. The dvb_net device doesn't give me any packets at all
107 107
108 Run tcpdump on the dvb0_0 interface. This sets the interface 108 Run tcpdump on the dvb0_0 interface. This sets the interface
109 into promiscous mode so it accepts any packets from the PID 109 into promiscuous mode so it accepts any packets from the PID
110 you have configured with the dvbnet utility. Check if there 110 you have configured with the dvbnet utility. Check if there
111 are any packets with the IP addr and MAC addr you have 111 are any packets with the IP addr and MAC addr you have
112 configured with ifconfig. 112 configured with ifconfig.
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index 59690de8ebf..3348d313fbe 100644
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -556,6 +556,9 @@ sub ngene {
556 my $hash1 = "d798d5a757121174f0dbc5f2833c0c85"; 556 my $hash1 = "d798d5a757121174f0dbc5f2833c0c85";
557 my $file2 = "ngene_17.fw"; 557 my $file2 = "ngene_17.fw";
558 my $hash2 = "26b687136e127b8ac24b81e0eeafc20b"; 558 my $hash2 = "26b687136e127b8ac24b81e0eeafc20b";
559 my $url2 = "http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/";
560 my $file3 = "ngene_18.fw";
561 my $hash3 = "ebce3ea769a53e3e0b0197c3b3f127e3";
559 562
560 checkstandard(); 563 checkstandard();
561 564
@@ -565,7 +568,10 @@ sub ngene {
565 wgetfile($file2, $url . $file2); 568 wgetfile($file2, $url . $file2);
566 verify($file2, $hash2); 569 verify($file2, $hash2);
567 570
568 "$file1, $file2"; 571 wgetfile($file3, $url2 . $file3);
572 verify($file3, $hash3);
573
574 "$file1, $file2, $file3";
569} 575}
570 576
571sub az6027{ 577sub az6027{
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt
index 64188650420..10b5f041138 100644
--- a/Documentation/dvb/lmedm04.txt
+++ b/Documentation/dvb/lmedm04.txt
@@ -4,7 +4,7 @@ following file(s) to this directory.
4for DM04+/QQBOX LME2510C (Sharp 7395 Tuner) 4for DM04+/QQBOX LME2510C (Sharp 7395 Tuner)
5------------------------------------------- 5-------------------------------------------
6 6
7The Sharp 7395 driver can be found in windows/system32/driver 7The Sharp 7395 driver can be found in windows/system32/drivers
8 8
9US2A0D.sys (dated 17 Mar 2009) 9US2A0D.sys (dated 17 Mar 2009)
10 10
@@ -44,7 +44,7 @@ and run
44 44
45 45
46Other LG firmware can be extracted manually from US280D.sys 46Other LG firmware can be extracted manually from US280D.sys
47only found in windows/system32/driver. 47only found in windows/system32/drivers
48 48
49dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw 49dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw
50 50
@@ -55,4 +55,16 @@ dd if=US280D.sys ibs=1 skip=35200 count=3850 of=dvb-usb-lme2510c-lg.fw
55 55
56--------------------------------------------------------------------- 56---------------------------------------------------------------------
57 57
58The Sharp 0194 tuner driver can be found in windows/system32/drivers
59
60US290D.sys (dated 09 Apr 2009)
61
62For LME2510
63dd if=US290D.sys ibs=1 skip=36856 count=3976 of=dvb-usb-lme2510-s0194.fw
64
65
66For LME2510C
67dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw
68
69
58Copy the firmware file(s) to /lib/firmware 70Copy the firmware file(s) to /lib/firmware
diff --git a/Documentation/dvb/udev.txt b/Documentation/dvb/udev.txt
index 68ee224b6aa..412305b7c55 100644
--- a/Documentation/dvb/udev.txt
+++ b/Documentation/dvb/udev.txt
@@ -1,7 +1,7 @@
1The DVB subsystem currently registers to the sysfs subsystem using the 1The DVB subsystem currently registers to the sysfs subsystem using the
2"class_simple" interface. 2"class_simple" interface.
3 3
4This means that only the basic informations like module loading parameters 4This means that only the basic information like module loading parameters
5are presented through sysfs. Other things that might be interesting are 5are presented through sysfs. Other things that might be interesting are
6currently *not* available. 6currently *not* available.
7 7
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 58ea64a9616..f959909d715 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -6,7 +6,7 @@ This document describes how to use the dynamic debug (ddebug) feature.
6 6
7Dynamic debug is designed to allow you to dynamically enable/disable kernel 7Dynamic debug is designed to allow you to dynamically enable/disable kernel
8code to obtain additional kernel information. Currently, if 8code to obtain additional kernel information. Currently, if
9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be 9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can be
10dynamically enabled per-callsite. 10dynamically enabled per-callsite.
11 11
12Dynamic debug has even more useful features: 12Dynamic debug has even more useful features:
@@ -26,7 +26,7 @@ Dynamic debug has even more useful features:
26Controlling dynamic debug Behaviour 26Controlling dynamic debug Behaviour
27=================================== 27===================================
28 28
29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a 29The behaviour of pr_debug()/dev_dbg()s are controlled via writing to a
30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs 30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
31filesystem, in order to make use of this feature. Subsequently, we refer to the 31filesystem, in order to make use of this feature. Subsequently, we refer to the
32control file as: <debugfs>/dynamic_debug/control. For example, if you want to 32control file as: <debugfs>/dynamic_debug/control. For example, if you want to
@@ -205,12 +205,20 @@ of the characters:
205 205
206The flags are: 206The flags are:
207 207
208f
209 Include the function name in the printed message
210l
211 Include line number in the printed message
212m
213 Include module name in the printed message
208p 214p
209 Causes a printk() message to be emitted to dmesg 215 Causes a printk() message to be emitted to dmesg
216t
217 Include thread ID in messages not generated from interrupt context
210 218
211Note the regexp ^[-+=][scp]+$ matches a flags specification. 219Note the regexp ^[-+=][flmpt]+$ matches a flags specification.
212Note also that there is no convenient syntax to remove all 220Note also that there is no convenient syntax to remove all
213the flags at once, you need to use "-psc". 221the flags at once, you need to use "-flmpt".
214 222
215 223
216Debug messages during boot process 224Debug messages during boot process
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 9ee774de57c..249822cde82 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -311,7 +311,7 @@ Total Correctable Errors count attribute file:
311 'ce_noinfo_count' 311 'ce_noinfo_count'
312 312
313 This attribute file displays the number of CEs that 313 This attribute file displays the number of CEs that
314 have occurred wherewith no informations as to which DIMM slot 314 have occurred wherewith no information as to which DIMM slot
315 is having errors. Memory is handicapped, but operational, 315 is having errors. Memory is handicapped, but operational,
316 yet no information is available to indicate which slot 316 yet no information is available to indicate which slot
317 the failing memory is in. This count field should be also 317 the failing memory is in. This count field should be also
@@ -741,7 +741,7 @@ were done at i7core_edac driver. This chapter will cover those differences
741 As EDAC API maps the minimum unity is csrows, the driver sequencially 741 As EDAC API maps the minimum unity is csrows, the driver sequencially
742 maps channel/dimm into different csrows. 742 maps channel/dimm into different csrows.
743 743
744 For example, suposing the following layout: 744 For example, supposing the following layout:
745 Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs 745 Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs
746 dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 746 dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400
747 dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400 747 dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400
diff --git a/Documentation/eisa.txt b/Documentation/eisa.txt
index f297fc1202a..38cf0c7b559 100644
--- a/Documentation/eisa.txt
+++ b/Documentation/eisa.txt
@@ -84,7 +84,7 @@ struct eisa_driver {
84 84
85id_table : an array of NULL terminated EISA id strings, 85id_table : an array of NULL terminated EISA id strings,
86 followed by an empty string. Each string can 86 followed by an empty string. Each string can
87 optionally be paired with a driver-dependant value 87 optionally be paired with a driver-dependent value
88 (driver_data). 88 (driver_data).
89 89
90driver : a generic driver, such as described in 90driver : a generic driver, such as described in
diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
new file mode 100644
index 00000000000..8d17aebd264
--- /dev/null
+++ b/Documentation/fb/sm501.txt
@@ -0,0 +1,10 @@
1Configuration:
2
3You can pass the following kernel command line options to sm501 videoframebuffer:
4
5 sm501fb.bpp= SM501 Display driver:
6 Specifiy bits-per-pixel if not specified by 'mode'
7
8 sm501fb.mode= SM501 Display driver:
9 Specify resolution as
10 "<xres>x<yres>[-<bpp>][@<refresh>]"
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt
index 1a2e8aa3fbb..444e34b52ae 100644
--- a/Documentation/fb/viafb.txt
+++ b/Documentation/fb/viafb.txt
@@ -204,7 +204,7 @@ Notes:
204 204
205 supported_output_devices 205 supported_output_devices
206 206
207 This read-only file contains a full ',' seperated list containing all 207 This read-only file contains a full ',' separated list containing all
208 output devices that could be available on your platform. It is likely 208 output devices that could be available on your platform. It is likely
209 that not all of those have a connector on your hardware but it should 209 that not all of those have a connector on your hardware but it should
210 provide a good starting point to figure out which of those names match 210 provide a good starting point to figure out which of those names match
@@ -225,7 +225,7 @@ Notes:
225 This can happen for example if only one (the other) iga is used. 225 This can happen for example if only one (the other) iga is used.
226 Writing to these files allows adjusting the output devices during 226 Writing to these files allows adjusting the output devices during
227 runtime. One can add new devices, remove existing ones or switch 227 runtime. One can add new devices, remove existing ones or switch
228 between igas. Essentially you can write a ',' seperated list of device 228 between igas. Essentially you can write a ',' separated list of device
229 names (or a single one) in the same format as the output to those 229 names (or a single one) in the same format as the output to those
230 files. You can add a '+' or '-' as a prefix allowing simple addition 230 files. You can add a '+' or '-' as a prefix allowing simple addition
231 and removal of devices. So a prefix '+' adds the devices from your list 231 and removal of devices. So a prefix '+' adds the devices from your list
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 13f0bb3187b..1a9446b5915 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -133,42 +133,6 @@ Who: Pavel Machek <pavel@ucw.cz>
133 133
134--------------------------- 134---------------------------
135 135
136What: Video4Linux obsolete drivers using V4L1 API
137When: kernel 2.6.39
138Files: drivers/staging/se401/* drivers/staging/usbvideo/*
139Check: drivers/staging/se401/se401.c drivers/staging/usbvideo/usbvideo.c
140Why: There are some drivers still using V4L1 API, despite all efforts we've done
141 to migrate. Those drivers are for obsolete hardware that the old maintainer
142 didn't care (or not have the hardware anymore), and that no other developer
143 could find any hardware to buy. They probably have no practical usage today,
144 and people with such old hardware could probably keep using an older version
145 of the kernel. Those drivers will be moved to staging on 2.6.38 and, if nobody
146 cares enough to port and test them with V4L2 API, they'll be removed on 2.6.39.
147Who: Mauro Carvalho Chehab <mchehab@infradead.org>
148
149---------------------------
150
151What: Video4Linux: Remove obsolete ioctl's
152When: kernel 2.6.39
153Files: include/media/videodev2.h
154Why: Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
155 type of R/W arguments. They were fixed, but the old ioctl names are
156 still there, maintained to avoid breaking binary compatibility:
157 #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int)
158 #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm)
159 #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control)
160 #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio)
161 #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout)
162 #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap)
163 There's no sense on preserving those forever, as it is very doubtful
164 that someone would try to use a such old binary with a modern kernel.
165 Removing them will allow us to remove some magic done at the V4L ioctl
166 handler.
167
168Who: Mauro Carvalho Chehab <mchehab@infradead.org>
169
170---------------------------
171
172What: sys_sysctl 136What: sys_sysctl
173When: September 2010 137When: September 2010
174Option: CONFIG_SYSCTL_SYSCALL 138Option: CONFIG_SYSCTL_SYSCALL
@@ -287,7 +251,7 @@ Who: Zhang Rui <rui.zhang@intel.com>
287What: CONFIG_ACPI_PROCFS_POWER 251What: CONFIG_ACPI_PROCFS_POWER
288When: 2.6.39 252When: 2.6.39
289Why: sysfs I/F for ACPI power devices, including AC and Battery, 253Why: sysfs I/F for ACPI power devices, including AC and Battery,
290 has been working in upstream kenrel since 2.6.24, Sep 2007. 254 has been working in upstream kernel since 2.6.24, Sep 2007.
291 In 2.6.37, we make the sysfs I/F always built in and this option 255 In 2.6.37, we make the sysfs I/F always built in and this option
292 disabled by default. 256 disabled by default.
293 Remove this option and the ACPI power procfs interface in 2.6.39. 257 Remove this option and the ACPI power procfs interface in 2.6.39.
@@ -295,14 +259,6 @@ Who: Zhang Rui <rui.zhang@intel.com>
295 259
296--------------------------- 260---------------------------
297 261
298What: /proc/acpi/button
299When: August 2007
300Why: /proc/acpi/button has been replaced by events to the input layer
301 since 2.6.20.
302Who: Len Brown <len.brown@intel.com>
303
304---------------------------
305
306What: /proc/acpi/event 262What: /proc/acpi/event
307When: February 2008 263When: February 2008
308Why: /proc/acpi/event has been replaced by events via the input layer 264Why: /proc/acpi/event has been replaced by events via the input layer
@@ -342,16 +298,6 @@ Who: Michael Buesch <mb@bu3sch.de>
342 298
343--------------------------- 299---------------------------
344 300
345What: /sys/o2cb symlink
346When: January 2010
347Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
348 exists as a symlink for backwards compatibility for old versions of
349 ocfs2-tools. 2 years should be sufficient time to phase in new versions
350 which know to look in /sys/fs/o2cb.
351Who: ocfs2-devel@oss.oracle.com
352
353---------------------------
354
355What: Ability for non root users to shm_get hugetlb pages based on mlock 301What: Ability for non root users to shm_get hugetlb pages based on mlock
356 resource limits 302 resource limits
357When: 2.6.31 303When: 2.6.31
@@ -456,26 +402,6 @@ Who: Tejun Heo <tj@kernel.org>
456 402
457---------------------------- 403----------------------------
458 404
459What: Support for lcd_switch and display_get in asus-laptop driver
460When: March 2010
461Why: These two features use non-standard interfaces. There are the
462 only features that really need multiple path to guess what's
463 the right method name on a specific laptop.
464
465 Removing them will allow to remove a lot of code an significantly
466 clean the drivers.
467
468 This will affect the backlight code which won't be able to know
469 if the backlight is on or off. The platform display file will also be
470 write only (like the one in eeepc-laptop).
471
472 This should'nt affect a lot of user because they usually know
473 when their display is on or off.
474
475Who: Corentin Chary <corentin.chary@gmail.com>
476
477----------------------------
478
479What: sysfs-class-rfkill state file 405What: sysfs-class-rfkill state file
480When: Feb 2014 406When: Feb 2014
481Files: net/rfkill/core.c 407Files: net/rfkill/core.c
@@ -494,16 +420,6 @@ Who: anybody or Florian Mickler <florian@mickler.org>
494 420
495---------------------------- 421----------------------------
496 422
497What: capifs
498When: February 2011
499Files: drivers/isdn/capi/capifs.*
500Why: udev fully replaces this special file system that only contains CAPI
501 NCCI TTY device nodes. User space (pppdcapiplugin) works without
502 noticing the difference.
503Who: Jan Kiszka <jan.kiszka@web.de>
504
505----------------------------
506
507What: KVM paravirt mmu host support 423What: KVM paravirt mmu host support
508When: January 2011 424When: January 2011
509Why: The paravirt mmu host support is slower than non-paravirt mmu, both 425Why: The paravirt mmu host support is slower than non-paravirt mmu, both
@@ -549,14 +465,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
549 465
550---------------------------- 466----------------------------
551 467
552What: The acpi_sleep=s4_nonvs command line option
553When: 2.6.37
554Files: arch/x86/kernel/acpi/sleep.c
555Why: superseded by acpi_sleep=nonvs
556Who: Rafael J. Wysocki <rjw@sisk.pl>
557
558----------------------------
559
560What: PCI DMA unmap state API 468What: PCI DMA unmap state API
561When: August 2012 469When: August 2012
562Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced 470Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced
@@ -610,16 +518,6 @@ Who: NeilBrown <neilb@suse.de>
610 518
611---------------------------- 519----------------------------
612 520
613What: i2c_adapter.id
614When: June 2011
615Why: This field is deprecated. I2C device drivers shouldn't change their
616 behavior based on the underlying I2C adapter. Instead, the I2C
617 adapter driver should instantiate the I2C devices and provide the
618 needed platform-specific information.
619Who: Jean Delvare <khali@linux-fr.org>
620
621----------------------------
622
623What: cancel_rearming_delayed_work[queue]() 521What: cancel_rearming_delayed_work[queue]()
624When: 2.6.39 522When: 2.6.39
625 523
@@ -640,6 +538,13 @@ Who: Jean Delvare <khali@linux-fr.org>
640 538
641---------------------------- 539----------------------------
642 540
541What: xt_connlimit rev 0
542When: 2012
543Who: Jan Engelhardt <jengelh@medozas.de>
544Files: net/netfilter/xt_connlimit.c
545
546----------------------------
547
643What: noswapaccount kernel command line parameter 548What: noswapaccount kernel command line parameter
644When: 2.6.40 549When: 2.6.40
645Why: The original implementation of memsw feature enabled by 550Why: The original implementation of memsw feature enabled by
@@ -655,3 +560,43 @@ Why: The original implementation of memsw feature enabled by
655Who: Michal Hocko <mhocko@suse.cz> 560Who: Michal Hocko <mhocko@suse.cz>
656 561
657---------------------------- 562----------------------------
563
564What: ipt_addrtype match include file
565When: 2012
566Why: superseded by xt_addrtype
567Who: Florian Westphal <fw@strlen.de>
568Files: include/linux/netfilter_ipv4/ipt_addrtype.h
569
570----------------------------
571
572What: i2c_driver.attach_adapter
573 i2c_driver.detach_adapter
574When: September 2011
575Why: These legacy callbacks should no longer be used as i2c-core offers
576 a variety of preferable alternative ways to instantiate I2C devices.
577Who: Jean Delvare <khali@linux-fr.org>
578
579----------------------------
580
581What: Support for UVCIOC_CTRL_ADD in the uvcvideo driver
582When: 2.6.42
583Why: The information passed to the driver by this ioctl is now queried
584 dynamically from the device.
585Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
586
587----------------------------
588
589What: Support for UVCIOC_CTRL_MAP_OLD in the uvcvideo driver
590When: 2.6.42
591Why: Used only by applications compiled against older driver versions.
592 Superseded by UVCIOC_CTRL_MAP which supports V4L2 menu controls.
593Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
594
595----------------------------
596
597What: Support for UVCIOC_CTRL_GET and UVCIOC_CTRL_SET in the uvcvideo driver
598When: 2.6.42
599Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
600Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
601
602----------------------------
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt
index b22abba78fe..13de64c7f0a 100644
--- a/Documentation/filesystems/9p.txt
+++ b/Documentation/filesystems/9p.txt
@@ -25,6 +25,8 @@ Other applications are described in the following papers:
25 http://xcpu.org/papers/cellfs-talk.pdf 25 http://xcpu.org/papers/cellfs-talk.pdf
26 * PROSE I/O: Using 9p to enable Application Partitions 26 * PROSE I/O: Using 9p to enable Application Partitions
27 http://plan9.escet.urjc.es/iwp9/cready/PROSE_iwp9_2006.pdf 27 http://plan9.escet.urjc.es/iwp9/cready/PROSE_iwp9_2006.pdf
28 * VirtFS: A Virtualization Aware File System pass-through
29 http://goo.gl/3WPDg
28 30
29USAGE 31USAGE
30===== 32=====
@@ -130,31 +132,20 @@ OPTIONS
130RESOURCES 132RESOURCES
131========= 133=========
132 134
133Our current recommendation is to use Inferno (http://www.vitanuova.com/nferno/index.html) 135Protocol specifications are maintained on github:
134as the 9p server. You can start a 9p server under Inferno by issuing the 136http://ericvh.github.com/9p-rfc/
135following command:
136 ; styxlisten -A tcp!*!564 export '#U*'
137 137
138The -A specifies an unauthenticated export. The 564 is the port # (you may 1389p client and server implementations are listed on
139have to choose a higher port number if running as a normal user). The '#U*' 139http://9p.cat-v.org/implementations
140specifies exporting the root of the Linux name space. You may specify a
141subset of the namespace by extending the path: '#U*'/tmp would just export
142/tmp. For more information, see the Inferno manual pages covering styxlisten
143and export.
144 140
145A Linux version of the 9p server is now maintained under the npfs project 141A 9p2000.L server is being developed by LLNL and can be found
146on sourceforge (http://sourceforge.net/projects/npfs). The currently 142at http://code.google.com/p/diod/
147maintained version is the single-threaded version of the server (named spfs)
148available from the same SVN repository.
149 143
150There are user and developer mailing lists available through the v9fs project 144There are user and developer mailing lists available through the v9fs project
151on sourceforge (http://sourceforge.net/projects/v9fs). 145on sourceforge (http://sourceforge.net/projects/v9fs).
152 146
153A stand-alone version of the module (which should build for any 2.6 kernel) 147News and other information is maintained on a Wiki.
154is available via (http://github.com/ericvh/9p-sac/tree/master) 148(http://sf.net/apps/mediawiki/v9fs/index.php).
155
156News and other information is maintained on SWiK (http://swik.net/v9fs)
157and the Wiki (http://sf.net/apps/mediawiki/v9fs/index.php).
158 149
159Bug reports may be issued through the kernel.org bugzilla 150Bug reports may be issued through the kernel.org bugzilla
160(http://bugzilla.kernel.org) 151(http://bugzilla.kernel.org)
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 4471a416c27..57d827d6071 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -104,7 +104,7 @@ of the locking scheme for directory operations.
104prototypes: 104prototypes:
105 struct inode *(*alloc_inode)(struct super_block *sb); 105 struct inode *(*alloc_inode)(struct super_block *sb);
106 void (*destroy_inode)(struct inode *); 106 void (*destroy_inode)(struct inode *);
107 void (*dirty_inode) (struct inode *); 107 void (*dirty_inode) (struct inode *, int flags);
108 int (*write_inode) (struct inode *, struct writeback_control *wbc); 108 int (*write_inode) (struct inode *, struct writeback_control *wbc);
109 int (*drop_inode) (struct inode *); 109 int (*drop_inode) (struct inode *);
110 void (*evict_inode) (struct inode *); 110 void (*evict_inode) (struct inode *);
@@ -126,9 +126,9 @@ locking rules:
126 s_umount 126 s_umount
127alloc_inode: 127alloc_inode:
128destroy_inode: 128destroy_inode:
129dirty_inode: (must not sleep) 129dirty_inode:
130write_inode: 130write_inode:
131drop_inode: !!!inode_lock!!! 131drop_inode: !!!inode->i_lock!!!
132evict_inode: 132evict_inode:
133put_super: write 133put_super: write
134write_super: read 134write_super: read
@@ -166,13 +166,11 @@ prototypes:
166 void (*kill_sb) (struct super_block *); 166 void (*kill_sb) (struct super_block *);
167locking rules: 167locking rules:
168 may block 168 may block
169get_sb yes
170mount yes 169mount yes
171kill_sb yes 170kill_sb yes
172 171
173->get_sb() returns error or 0 with locked superblock attached to the vfsmount 172->mount() returns ERR_PTR or the root dentry; its superblock should be locked
174(exclusive on ->s_umount). 173on return.
175->mount() returns ERR_PTR or the root dentry.
176->kill_sb() takes a write-locked superblock, does all shutdown work on it, 174->kill_sb() takes a write-locked superblock, does all shutdown work on it,
177unlocks and drops the reference. 175unlocks and drops the reference.
178 176
diff --git a/Documentation/filesystems/adfs.txt b/Documentation/filesystems/adfs.txt
index 9e8811f92b8..5949766353f 100644
--- a/Documentation/filesystems/adfs.txt
+++ b/Documentation/filesystems/adfs.txt
@@ -9,6 +9,9 @@ Mount options for ADFS
9 will be nnn. Default 0700. 9 will be nnn. Default 0700.
10 othmask=nnn The permission mask for ADFS 'other' permissions 10 othmask=nnn The permission mask for ADFS 'other' permissions
11 will be nnn. Default 0077. 11 will be nnn. Default 0077.
12 ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
13 When ftsuffix=1, a hexadecimal suffix corresponding to
14 the RISC OS file type will be added. Default 0.
12 15
13Mapping of ADFS permissions to Linux permissions 16Mapping of ADFS permissions to Linux permissions
14------------------------------------------------ 17------------------------------------------------
@@ -55,3 +58,18 @@ Mapping of ADFS permissions to Linux permissions
55 58
56 You can therefore tailor the permission translation to whatever you 59 You can therefore tailor the permission translation to whatever you
57 desire the permissions should be under Linux. 60 desire the permissions should be under Linux.
61
62RISC OS file type suffix
63------------------------
64
65 RISC OS file types are stored in bits 19..8 of the file load address.
66
67 To enable non-RISC OS systems to be used to store files without losing
68 file type information, a file naming convention was devised (initially
69 for use with NFS) such that a hexadecimal suffix of the form ,xyz
70 denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
71 naming convention is now also used by RISC OS emulators such as RPCEmu.
72
73 Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
74 type suffixes to be appended to file names read from a directory. If the
75 ftsuffix option is zero or omitted, no file type suffixes will be added.
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt
index 51986bf08a4..4c95935cbcf 100644
--- a/Documentation/filesystems/autofs4-mount-control.txt
+++ b/Documentation/filesystems/autofs4-mount-control.txt
@@ -309,7 +309,7 @@ ioctlfd field set to the descriptor obtained from the open call.
309AUTOFS_DEV_IOCTL_TIMEOUT_CMD 309AUTOFS_DEV_IOCTL_TIMEOUT_CMD
310---------------------------- 310----------------------------
311 311
312Set the expire timeout for mounts withing an autofs mount point. 312Set the expire timeout for mounts within an autofs mount point.
313 313
314The call requires an initialized struct autofs_dev_ioctl with the 314The call requires an initialized struct autofs_dev_ioctl with the
315ioctlfd field set to the descriptor obtained from the open call. 315ioctlfd field set to the descriptor obtained from the open call.
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt
index 1902c57b72e..a167ab876c3 100644
--- a/Documentation/filesystems/caching/netfs-api.txt
+++ b/Documentation/filesystems/caching/netfs-api.txt
@@ -95,7 +95,7 @@ restraints as possible on how an index is structured and where it is placed in
95the tree. The netfs can even mix indices and data files at the same level, but 95the tree. The netfs can even mix indices and data files at the same level, but
96it's not recommended. 96it's not recommended.
97 97
98Each index entry consists of a key of indeterminate length plus some auxilliary 98Each index entry consists of a key of indeterminate length plus some auxiliary
99data, also of indeterminate length. 99data, also of indeterminate length.
100 100
101There are some limits on indices: 101There are some limits on indices:
@@ -203,23 +203,23 @@ This has the following fields:
203 203
204 If the function is absent, a file size of 0 is assumed. 204 If the function is absent, a file size of 0 is assumed.
205 205
206 (6) A function to retrieve auxilliary data from the netfs [optional]. 206 (6) A function to retrieve auxiliary data from the netfs [optional].
207 207
208 This function will be called with the netfs data that was passed to the 208 This function will be called with the netfs data that was passed to the
209 cookie acquisition function and the maximum length of auxilliary data that 209 cookie acquisition function and the maximum length of auxiliary data that
210 it may provide. It should write the auxilliary data into the given buffer 210 it may provide. It should write the auxiliary data into the given buffer
211 and return the quantity it wrote. 211 and return the quantity it wrote.
212 212
213 If this function is absent, the auxilliary data length will be set to 0. 213 If this function is absent, the auxiliary data length will be set to 0.
214 214
215 The length of the auxilliary data buffer may be dependent on the key 215 The length of the auxiliary data buffer may be dependent on the key
216 length. A netfs mustn't rely on being able to provide more than 400 bytes 216 length. A netfs mustn't rely on being able to provide more than 400 bytes
217 for both. 217 for both.
218 218
219 (7) A function to check the auxilliary data [optional]. 219 (7) A function to check the auxiliary data [optional].
220 220
221 This function will be called to check that a match found in the cache for 221 This function will be called to check that a match found in the cache for
222 this object is valid. For instance with AFS it could check the auxilliary 222 this object is valid. For instance with AFS it could check the auxiliary
223 data against the data version number returned by the server to determine 223 data against the data version number returned by the server to determine
224 whether the index entry in a cache is still valid. 224 whether the index entry in a cache is still valid.
225 225
@@ -232,7 +232,7 @@ This has the following fields:
232 (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update 232 (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update
233 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted 233 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted
234 234
235 This function can also be used to extract data from the auxilliary data in 235 This function can also be used to extract data from the auxiliary data in
236 the cache and copy it into the netfs's structures. 236 the cache and copy it into the netfs's structures.
237 237
238 (8) A pair of functions to manage contexts for the completion callback 238 (8) A pair of functions to manage contexts for the completion callback
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt
index fabcb0e00f2..dd57bb6bb39 100644
--- a/Documentation/filesystems/configfs/configfs.txt
+++ b/Documentation/filesystems/configfs/configfs.txt
@@ -409,7 +409,7 @@ As a consequence of this, default_groups cannot be removed directly via
409rmdir(2). They also are not considered when rmdir(2) on the parent 409rmdir(2). They also are not considered when rmdir(2) on the parent
410group is checking for children. 410group is checking for children.
411 411
412[Dependant Subsystems] 412[Dependent Subsystems]
413 413
414Sometimes other drivers depend on particular configfs items. For 414Sometimes other drivers depend on particular configfs items. For
415example, ocfs2 mounts depend on a heartbeat region item. If that 415example, ocfs2 mounts depend on a heartbeat region item. If that
diff --git a/Documentation/filesystems/configfs/configfs_example_explicit.c b/Documentation/filesystems/configfs/configfs_example_explicit.c
index fd53869f563..1420233dfa5 100644
--- a/Documentation/filesystems/configfs/configfs_example_explicit.c
+++ b/Documentation/filesystems/configfs/configfs_example_explicit.c
@@ -464,9 +464,8 @@ static int __init configfs_example_init(void)
464 return 0; 464 return 0;
465 465
466out_unregister: 466out_unregister:
467 for (; i >= 0; i--) { 467 for (i--; i >= 0; i--)
468 configfs_unregister_subsystem(example_subsys[i]); 468 configfs_unregister_subsystem(example_subsys[i]);
469 }
470 469
471 return ret; 470 return ret;
472} 471}
@@ -475,9 +474,8 @@ static void __exit configfs_example_exit(void)
475{ 474{
476 int i; 475 int i;
477 476
478 for (i = 0; example_subsys[i]; i++) { 477 for (i = 0; example_subsys[i]; i++)
479 configfs_unregister_subsystem(example_subsys[i]); 478 configfs_unregister_subsystem(example_subsys[i]);
480 }
481} 479}
482 480
483module_init(configfs_example_init); 481module_init(configfs_example_init);
diff --git a/Documentation/filesystems/configfs/configfs_example_macros.c b/Documentation/filesystems/configfs/configfs_example_macros.c
index d8e30a0378a..327dfbc640a 100644
--- a/Documentation/filesystems/configfs/configfs_example_macros.c
+++ b/Documentation/filesystems/configfs/configfs_example_macros.c
@@ -427,9 +427,8 @@ static int __init configfs_example_init(void)
427 return 0; 427 return 0;
428 428
429out_unregister: 429out_unregister:
430 for (; i >= 0; i--) { 430 for (i--; i >= 0; i--)
431 configfs_unregister_subsystem(example_subsys[i]); 431 configfs_unregister_subsystem(example_subsys[i]);
432 }
433 432
434 return ret; 433 return ret;
435} 434}
@@ -438,9 +437,8 @@ static void __exit configfs_example_exit(void)
438{ 437{
439 int i; 438 int i;
440 439
441 for (i = 0; example_subsys[i]; i++) { 440 for (i = 0; example_subsys[i]; i++)
442 configfs_unregister_subsystem(example_subsys[i]); 441 configfs_unregister_subsystem(example_subsys[i]);
443 }
444} 442}
445 443
446module_init(configfs_example_init); 444module_init(configfs_example_init);
diff --git a/Documentation/filesystems/exofs.txt b/Documentation/filesystems/exofs.txt
index abd2a9b5b78..23583a13697 100644
--- a/Documentation/filesystems/exofs.txt
+++ b/Documentation/filesystems/exofs.txt
@@ -104,7 +104,15 @@ Where:
104 exofs specific options: Options are separated by commas (,) 104 exofs specific options: Options are separated by commas (,)
105 pid=<integer> - The partition number to mount/create as 105 pid=<integer> - The partition number to mount/create as
106 container of the filesystem. 106 container of the filesystem.
107 This option is mandatory. 107 This option is mandatory. integer can be
108 Hex by pre-pending an 0x to the number.
109 osdname=<id> - Mount by a device's osdname.
110 osdname is usually a 36 character uuid of the
111 form "d2683732-c906-4ee1-9dbd-c10c27bb40df".
112 It is one of the device's uuid specified in the
113 mkfs.exofs format command.
114 If this option is specified then the /dev/osdX
115 above can be empty and is ignored.
108 to=<integer> - Timeout in ticks for a single command. 116 to=<integer> - Timeout in ticks for a single command.
109 default is (60 * HZ) [for debugging only] 117 default is (60 * HZ) [for debugging only]
110 118
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 6ab9442d7ee..3ae9bc94352 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -97,7 +97,7 @@ Note: More extensive information for getting started with ext4 can be
97* Inode allocation using large virtual block groups via flex_bg 97* Inode allocation using large virtual block groups via flex_bg
98* delayed allocation 98* delayed allocation
99* large block (up to pagesize) support 99* large block (up to pagesize) support
100* efficent new ordered mode in JBD2 and ext4(avoid using buffer head to force 100* efficient new ordered mode in JBD2 and ext4(avoid using buffer head to force
101 the ordering) 101 the ordering)
102 102
103[1] Filesystems with a block size of 1k may see a limit imposed by the 103[1] Filesystems with a block size of 1k may see a limit imposed by the
@@ -106,7 +106,7 @@ directory hash tree having a maximum depth of two.
1062.2 Candidate features for future inclusion 1062.2 Candidate features for future inclusion
107 107
108* Online defrag (patches available but not well tested) 108* Online defrag (patches available but not well tested)
109* reduced mke2fs time via lazy itable initialization in conjuction with 109* reduced mke2fs time via lazy itable initialization in conjunction with
110 the uninit_bg feature (capability to do this is available in e2fsprogs 110 the uninit_bg feature (capability to do this is available in e2fsprogs
111 but a kernel thread to do lazy zeroing of unused inode table blocks 111 but a kernel thread to do lazy zeroing of unused inode table blocks
112 after filesystem is first mounted is required for safety) 112 after filesystem is first mounted is required for safety)
@@ -226,10 +226,6 @@ acl Enables POSIX Access Control Lists support.
226noacl This option disables POSIX Access Control List 226noacl This option disables POSIX Access Control List
227 support. 227 support.
228 228
229reservation
230
231noreservation
232
233bsddf (*) Make 'df' act like BSD. 229bsddf (*) Make 'df' act like BSD.
234minixdf Make 'df' act like Minix. 230minixdf Make 'df' act like Minix.
235 231
@@ -367,12 +363,47 @@ init_itable=n The lazy itable init code will wait n times the
367 minimizes the impact on the systme performance 363 minimizes the impact on the systme performance
368 while file system's inode table is being initialized. 364 while file system's inode table is being initialized.
369 365
370discard Controls whether ext4 should issue discard/TRIM 366discard Controls whether ext4 should issue discard/TRIM
371nodiscard(*) commands to the underlying block device when 367nodiscard(*) commands to the underlying block device when
372 blocks are freed. This is useful for SSD devices 368 blocks are freed. This is useful for SSD devices
373 and sparse/thinly-provisioned LUNs, but it is off 369 and sparse/thinly-provisioned LUNs, but it is off
374 by default until sufficient testing has been done. 370 by default until sufficient testing has been done.
375 371
372nouid32 Disables 32-bit UIDs and GIDs. This is for
373 interoperability with older kernels which only
374 store and expect 16-bit values.
375
376resize Allows to resize filesystem to the end of the last
377 existing block group, further resize has to be done
378 with resize2fs either online, or offline. It can be
379 used only with conjunction with remount.
380
381block_validity This options allows to enables/disables the in-kernel
382noblock_validity facility for tracking filesystem metadata blocks
383 within internal data structures. This allows multi-
384 block allocator and other routines to quickly locate
385 extents which might overlap with filesystem metadata
386 blocks. This option is intended for debugging
387 purposes and since it negatively affects the
388 performance, it is off by default.
389
390dioread_lock Controls whether or not ext4 should use the DIO read
391dioread_nolock locking. If the dioread_nolock option is specified
392 ext4 will allocate uninitialized extent before buffer
393 write and convert the extent to initialized after IO
394 completes. This approach allows ext4 code to avoid
395 using inode mutex, which improves scalability on high
396 speed storages. However this does not work with nobh
397 option and the mount will fail. Nor does it work with
398 data journaling and dioread_nolock option will be
399 ignored with kernel warning. Note that dioread_nolock
400 code path is only used for extent-based files.
401 Because of the restrictions this options comprises
402 it is off by default (e.g. dioread_lock).
403
404i_version Enable 64-bit inode version support. This option is
405 off by default.
406
376Data Mode 407Data Mode
377========= 408=========
378There are 3 different data modes: 409There are 3 different data modes:
@@ -400,6 +431,176 @@ needs to be read from and written to disk at the same time where it
400outperforms all others modes. Currently ext4 does not have delayed 431outperforms all others modes. Currently ext4 does not have delayed
401allocation support if this data journalling mode is selected. 432allocation support if this data journalling mode is selected.
402 433
434/proc entries
435=============
436
437Information about mounted ext4 file systems can be found in
438/proc/fs/ext4. Each mounted filesystem will have a directory in
439/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
440/proc/fs/ext4/dm-0). The files in each per-device directory are shown
441in table below.
442
443Files in /proc/fs/ext4/<devname>
444..............................................................................
445 File Content
446 mb_groups details of multiblock allocator buddy cache of free blocks
447..............................................................................
448
449/sys entries
450============
451
452Information about mounted ext4 file systems can be found in
453/sys/fs/ext4. Each mounted filesystem will have a directory in
454/sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or
455/sys/fs/ext4/dm-0). The files in each per-device directory are shown
456in table below.
457
458Files in /sys/fs/ext4/<devname>
459(see also Documentation/ABI/testing/sysfs-fs-ext4)
460..............................................................................
461 File Content
462
463 delayed_allocation_blocks This file is read-only and shows the number of
464 blocks that are dirty in the page cache, but
465 which do not have their location in the
466 filesystem allocated yet.
467
468 inode_goal Tuning parameter which (if non-zero) controls
469 the goal inode used by the inode allocator in
470 preference to all other allocation heuristics.
471 This is intended for debugging use only, and
472 should be 0 on production systems.
473
474 inode_readahead_blks Tuning parameter which controls the maximum
475 number of inode table blocks that ext4's inode
476 table readahead algorithm will pre-read into
477 the buffer cache
478
479 lifetime_write_kbytes This file is read-only and shows the number of
480 kilobytes of data that have been written to this
481 filesystem since it was created.
482
483 max_writeback_mb_bump The maximum number of megabytes the writeback
484 code will try to write out before move on to
485 another inode.
486
487 mb_group_prealloc The multiblock allocator will round up allocation
488 requests to a multiple of this tuning parameter if
489 the stripe size is not set in the ext4 superblock
490
491 mb_max_to_scan The maximum number of extents the multiblock
492 allocator will search to find the best extent
493
494 mb_min_to_scan The minimum number of extents the multiblock
495 allocator will search to find the best extent
496
497 mb_order2_req Tuning parameter which controls the minimum size
498 for requests (as a power of 2) where the buddy
499 cache is used
500
501 mb_stats Controls whether the multiblock allocator should
502 collect statistics, which are shown during the
503 unmount. 1 means to collect statistics, 0 means
504 not to collect statistics
505
506 mb_stream_req Files which have fewer blocks than this tunable
507 parameter will have their blocks allocated out
508 of a block group specific preallocation pool, so
509 that small files are packed closely together.
510 Each large file will have its blocks allocated
511 out of its own unique preallocation pool.
512
513 session_write_kbytes This file is read-only and shows the number of
514 kilobytes of data that have been written to this
515 filesystem since it was mounted.
516..............................................................................
517
518Ioctls
519======
520
521There is some Ext4 specific functionality which can be accessed by applications
522through the system call interfaces. The list of all Ext4 specific ioctls are
523shown in the table below.
524
525Table of Ext4 specific ioctls
526..............................................................................
527 Ioctl Description
528 EXT4_IOC_GETFLAGS Get additional attributes associated with inode.
529 The ioctl argument is an integer bitfield, with
530 bit values described in ext4.h. This ioctl is an
531 alias for FS_IOC_GETFLAGS.
532
533 EXT4_IOC_SETFLAGS Set additional attributes associated with inode.
534 The ioctl argument is an integer bitfield, with
535 bit values described in ext4.h. This ioctl is an
536 alias for FS_IOC_SETFLAGS.
537
538 EXT4_IOC_GETVERSION
539 EXT4_IOC_GETVERSION_OLD
540 Get the inode i_generation number stored for
541 each inode. The i_generation number is normally
542 changed only when new inode is created and it is
543 particularly useful for network filesystems. The
544 '_OLD' version of this ioctl is an alias for
545 FS_IOC_GETVERSION.
546
547 EXT4_IOC_SETVERSION
548 EXT4_IOC_SETVERSION_OLD
549 Set the inode i_generation number stored for
550 each inode. The '_OLD' version of this ioctl
551 is an alias for FS_IOC_SETVERSION.
552
553 EXT4_IOC_GROUP_EXTEND This ioctl has the same purpose as the resize
554 mount option. It allows to resize filesystem
555 to the end of the last existing block group,
556 further resize has to be done with resize2fs,
557 either online, or offline. The argument points
558 to the unsigned logn number representing the
559 filesystem new block count.
560
561 EXT4_IOC_MOVE_EXT Move the block extents from orig_fd (the one
562 this ioctl is pointing to) to the donor_fd (the
563 one specified in move_extent structure passed
564 as an argument to this ioctl). Then, exchange
565 inode metadata between orig_fd and donor_fd.
566 This is especially useful for online
567 defragmentation, because the allocator has the
568 opportunity to allocate moved blocks better,
569 ideally into one contiguous extent.
570
571 EXT4_IOC_GROUP_ADD Add a new group descriptor to an existing or
572 new group descriptor block. The new group
573 descriptor is described by ext4_new_group_input
574 structure, which is passed as an argument to
575 this ioctl. This is especially useful in
576 conjunction with EXT4_IOC_GROUP_EXTEND,
577 which allows online resize of the filesystem
578 to the end of the last existing block group.
579 Those two ioctls combined is used in userspace
580 online resize tool (e.g. resize2fs).
581
582 EXT4_IOC_MIGRATE This ioctl operates on the filesystem itself.
583 It converts (migrates) ext3 indirect block mapped
584 inode to ext4 extent mapped inode by walking
585 through indirect block mapping of the original
586 inode and converting contiguous block ranges
587 into ext4 extents of the temporary inode. Then,
588 inodes are swapped. This ioctl might help, when
589 migrating from ext3 to ext4 filesystem, however
590 suggestion is to create fresh ext4 filesystem
591 and copy data from the backup. Note, that
592 filesystem has to support extents for this ioctl
593 to work.
594
595 EXT4_IOC_ALLOC_DA_BLKS Force all of the delay allocated blocks to be
596 allocated to preserve application-expected ext3
597 behaviour. Note that this will also start
598 triggering a write of the data blocks, but this
599 behaviour may change in the future as it is
600 not necessary and has been done this way only
601 for sake of simplicity.
602..............................................................................
603
403References 604References
404========== 605==========
405 606
diff --git a/Documentation/filesystems/gfs2-uevents.txt b/Documentation/filesystems/gfs2-uevents.txt
index fd966dc9979..d8188966929 100644
--- a/Documentation/filesystems/gfs2-uevents.txt
+++ b/Documentation/filesystems/gfs2-uevents.txt
@@ -62,7 +62,7 @@ be fixed.
62 62
63The REMOVE uevent is generated at the end of an unsuccessful mount 63The REMOVE uevent is generated at the end of an unsuccessful mount
64or at the end of a umount of the filesystem. All REMOVE uevents will 64or at the end of a umount of the filesystem. All REMOVE uevents will
65have been preceeded by at least an ADD uevent for the same fileystem, 65have been preceded by at least an ADD uevent for the same fileystem,
66and unlike the other uevents is generated automatically by the kernel's 66and unlike the other uevents is generated automatically by the kernel's
67kobject subsystem. 67kobject subsystem.
68 68
diff --git a/Documentation/filesystems/gfs2.txt b/Documentation/filesystems/gfs2.txt
index 0b59c020091..4cda926628a 100644
--- a/Documentation/filesystems/gfs2.txt
+++ b/Documentation/filesystems/gfs2.txt
@@ -11,7 +11,7 @@ their I/O so file system consistency is maintained. One of the nifty
11features of GFS is perfect consistency -- changes made to the file system 11features of GFS is perfect consistency -- changes made to the file system
12on one machine show up immediately on all other machines in the cluster. 12on one machine show up immediately on all other machines in the cluster.
13 13
14GFS uses interchangable inter-node locking mechanisms, the currently 14GFS uses interchangeable inter-node locking mechanisms, the currently
15supported mechanisms are: 15supported mechanisms are:
16 16
17 lock_nolock -- allows gfs to be used as a local file system 17 lock_nolock -- allows gfs to be used as a local file system
diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/filesystems/nfs/idmapper.txt
index b9b4192ea8b..9c8fd614865 100644
--- a/Documentation/filesystems/nfs/idmapper.txt
+++ b/Documentation/filesystems/nfs/idmapper.txt
@@ -47,8 +47,8 @@ request-key will find the first matching line and corresponding program. In
47this case, /some/other/program will handle all uid lookups and 47this case, /some/other/program will handle all uid lookups and
48/usr/sbin/nfs.idmap will handle gid, user, and group lookups. 48/usr/sbin/nfs.idmap will handle gid, user, and group lookups.
49 49
50See <file:Documentation/keys-request-keys.txt> for more information about the 50See <file:Documentation/security/keys-request-keys.txt> for more information
51request-key function. 51about the request-key function.
52 52
53 53
54========= 54=========
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt
index bc0b9cfe095..983e14abe7e 100644
--- a/Documentation/filesystems/nfs/pnfs.txt
+++ b/Documentation/filesystems/nfs/pnfs.txt
@@ -46,3 +46,10 @@ data server cache
46file driver devices refer to data servers, which are kept in a module 46file driver devices refer to data servers, which are kept in a module
47level cache. Its reference is held over the lifetime of the deviceid 47level cache. Its reference is held over the lifetime of the deviceid
48pointing to it. 48pointing to it.
49
50lseg
51----
52lseg maintains an extra reference corresponding to the NFS_LSEG_VALID
53bit which holds it in the pnfs_layout_hdr's list. When the final lseg
54is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED
55bit is set, preventing any new lsegs from being added.
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index 933bc66ccff..791af8dac06 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -350,7 +350,7 @@ Note the "Should sync?" parameter "nosync" means that the two mirrors are
350already in sync which will be the case on a clean shutdown of Windows. If the 350already in sync which will be the case on a clean shutdown of Windows. If the
351mirrors are not clean, you can specify the "sync" option instead of "nosync" 351mirrors are not clean, you can specify the "sync" option instead of "nosync"
352and the Device-Mapper driver will then copy the entirety of the "Source Device" 352and the Device-Mapper driver will then copy the entirety of the "Source Device"
353to the "Target Device" or if you specified multipled target devices to all of 353to the "Target Device" or if you specified multiple target devices to all of
354them. 354them.
355 355
356Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1), 356Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1),
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 5393e661169..7618a287aa4 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -46,9 +46,15 @@ errors=panic Panic and halt the machine if an error occurs.
46intr (*) Allow signals to interrupt cluster operations. 46intr (*) Allow signals to interrupt cluster operations.
47nointr Do not allow signals to interrupt cluster 47nointr Do not allow signals to interrupt cluster
48 operations. 48 operations.
49noatime Do not update access time.
50relatime(*) Update atime if the previous atime is older than
51 mtime or ctime
52strictatime Always update atime, but the minimum update interval
53 is specified by atime_quantum.
49atime_quantum=60(*) OCFS2 will not update atime unless this number 54atime_quantum=60(*) OCFS2 will not update atime unless this number
50 of seconds has passed since the last update. 55 of seconds has passed since the last update.
51 Set to zero to always update atime. 56 Set to zero to always update atime. This option need
57 work with strictatime.
52data=ordered (*) All data are forced directly out to the main file 58data=ordered (*) All data are forced directly out to the main file
53 system prior to its metadata being committed to the 59 system prior to its metadata being committed to the
54 journal. 60 journal.
@@ -80,7 +86,7 @@ user_xattr (*) Enables Extended User Attributes.
80nouser_xattr Disables Extended User Attributes. 86nouser_xattr Disables Extended User Attributes.
81acl Enables POSIX Access Control Lists support. 87acl Enables POSIX Access Control Lists support.
82noacl (*) Disables POSIX Access Control Lists support. 88noacl (*) Disables POSIX Access Control Lists support.
83resv_level=2 (*) Set how agressive allocation reservations will be. 89resv_level=2 (*) Set how aggressive allocation reservations will be.
84 Valid values are between 0 (reservations off) to 8 90 Valid values are between 0 (reservations off) to 8
85 (maximum space for reservations). 91 (maximum space for reservations).
86dir_resv_level= (*) By default, directory reservations will scale with file 92dir_resv_level= (*) By default, directory reservations will scale with file
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt
index eb59c8b44be..3571667c710 100644
--- a/Documentation/filesystems/path-lookup.txt
+++ b/Documentation/filesystems/path-lookup.txt
@@ -42,7 +42,7 @@ Path walking overview
42A name string specifies a start (root directory, cwd, fd-relative) and a 42A name string specifies a start (root directory, cwd, fd-relative) and a
43sequence of elements (directory entry names), which together refer to a path in 43sequence of elements (directory entry names), which together refer to a path in
44the namespace. A path is represented as a (dentry, vfsmount) tuple. The name 44the namespace. A path is represented as a (dentry, vfsmount) tuple. The name
45elements are sub-strings, seperated by '/'. 45elements are sub-strings, separated by '/'.
46 46
47Name lookups will want to find a particular path that a name string refers to 47Name lookups will want to find a particular path that a name string refers to
48(usually the final element, or parent of final element). This is done by taking 48(usually the final element, or parent of final element). This is done by taking
@@ -354,7 +354,7 @@ vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651
354 354
355What this shows is that failed rcu-walk lookups, ie. ones that are restarted 355What this shows is that failed rcu-walk lookups, ie. ones that are restarted
356entirely with ref-walk, are quite rare. Even the "vfstest" case which 356entirely with ref-walk, are quite rare. Even the "vfstest" case which
357specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise 357specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to exercise
358such races is not showing a huge amount of restarts. 358such races is not showing a huge amount of restarts.
359 359
360Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where 360Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where
diff --git a/Documentation/filesystems/pohmelfs/network_protocol.txt b/Documentation/filesystems/pohmelfs/network_protocol.txt
index 40ea6c295af..65e03dd4482 100644
--- a/Documentation/filesystems/pohmelfs/network_protocol.txt
+++ b/Documentation/filesystems/pohmelfs/network_protocol.txt
@@ -20,7 +20,7 @@ Commands can be embedded into transaction command (which in turn has own command
20so one can extend protocol as needed without breaking backward compatibility as long 20so one can extend protocol as needed without breaking backward compatibility as long
21as old commands are supported. All string lengths include tail 0 byte. 21as old commands are supported. All string lengths include tail 0 byte.
22 22
23All commans are transfered over the network in big-endian. CPU endianess is used at the end peers. 23All commands are transferred over the network in big-endian. CPU endianess is used at the end peers.
24 24
25@cmd - command number, which specifies command to be processed. Following 25@cmd - command number, which specifies command to be processed. Following
26 commands are used currently: 26 commands are used currently:
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index dfbcd1b00b0..6e29954851a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has
298remaining links or not. Caller does *not* evict the pagecache or inode-associated 298remaining links or not. Caller does *not* evict the pagecache or inode-associated
299metadata buffers; getting rid of those is responsibility of method, as it had 299metadata buffers; getting rid of those is responsibility of method, as it had
300been for ->delete_inode(). 300been for ->delete_inode().
301 ->drop_inode() returns int now; it's called on final iput() with inode_lock 301
302held and it returns true if filesystems wants the inode to be dropped. As before, 302 ->drop_inode() returns int now; it's called on final iput() with
303generic_drop_inode() is still the default and it's been updated appropriately. 303inode->i_lock held and it returns true if filesystems wants the inode to be
304generic_delete_inode() is also alive and it consists simply of return 1. Note that 304dropped. As before, generic_drop_inode() is still the default and it's been
305all actual eviction work is done by caller after ->drop_inode() returns. 305updated appropriately. generic_delete_inode() is also alive and it consists
306simply of return 1. Note that all actual eviction work is done by caller after
307->drop_inode() returns.
308
306 clear_inode() is gone; use end_writeback() instead. As before, it must 309 clear_inode() is gone; use end_writeback() instead. As before, it must
307be called exactly once on each call of ->evict_inode() (as it used to be for 310be called exactly once on each call of ->evict_inode() (as it used to be for
308each call of ->delete_inode()). Unlike before, if you are using inode-associated 311each call of ->delete_inode()). Unlike before, if you are using inode-associated
@@ -394,3 +397,13 @@ file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
394Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, 397Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
395so the i_size should not change when hole punching, even when puching the end of 398so the i_size should not change when hole punching, even when puching the end of
396a file off. 399a file off.
400
401--
402[mandatory]
403
404--
405[mandatory]
406 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
407a matter of switching from calling get_sb_... to mount_... and changing the
408function type. If you were doing it manually, just switch from setting ->mnt_root
409to some pointer to returning that pointer. On errors return ERR_PTR(...).
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 23cae6548d3..f4817802406 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -543,7 +543,7 @@ just those considered 'most important'. The new vectors are:
543 their statistics are used by kernel developers and interested users to 543 their statistics are used by kernel developers and interested users to
544 determine the occurrence of interrupts of the given type. 544 determine the occurrence of interrupts of the given type.
545 545
546The above IRQ vectors are displayed only when relevent. For example, 546The above IRQ vectors are displayed only when relevant. For example,
547the threshold vector does not exist on x86_64 platforms. Others are 547the threshold vector does not exist on x86_64 platforms. Others are
548suppressed when the system is a uniprocessor. As of this writing, only 548suppressed when the system is a uniprocessor. As of this writing, only
549i386 and x86_64 platforms support the new IRQ vector displays. 549i386 and x86_64 platforms support the new IRQ vector displays.
@@ -574,6 +574,12 @@ The contents of each smp_affinity file is the same by default:
574 > cat /proc/irq/0/smp_affinity 574 > cat /proc/irq/0/smp_affinity
575 ffffffff 575 ffffffff
576 576
577There is an alternate interface, smp_affinity_list which allows specifying
578a cpu range instead of a bitmask:
579
580 > cat /proc/irq/0/smp_affinity_list
581 1024-1031
582
577The default_smp_affinity mask applies to all non-active IRQs, which are the 583The default_smp_affinity mask applies to all non-active IRQs, which are the
578IRQs which have not yet been allocated/activated, and hence which lack a 584IRQs which have not yet been allocated/activated, and hence which lack a
579/proc/irq/[0-9]* directory. 585/proc/irq/[0-9]* directory.
@@ -583,12 +589,13 @@ reports itself as being attached. This hardware locality information does not
583include information about any possible driver locality preference. 589include information about any possible driver locality preference.
584 590
585prof_cpu_mask specifies which CPUs are to be profiled by the system wide 591prof_cpu_mask specifies which CPUs are to be profiled by the system wide
586profiler. Default value is ffffffff (all cpus). 592profiler. Default value is ffffffff (all cpus if there are only 32 of them).
587 593
588The way IRQs are routed is handled by the IO-APIC, and it's Round Robin 594The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
589between all the CPUs which are allowed to handle it. As usual the kernel has 595between all the CPUs which are allowed to handle it. As usual the kernel has
590more info than you and does a better job than you, so the defaults are the 596more info than you and does a better job than you, so the defaults are the
591best choice for almost everyone. 597best choice for almost everyone. [Note this applies only to those IO-APIC's
598that support "Round Robin" interrupt distribution.]
592 599
593There are three more important subdirectories in /proc: net, scsi, and sys. 600There are three more important subdirectories in /proc: net, scsi, and sys.
594The general rule is that the contents, or even the existence of these 601The general rule is that the contents, or even the existence of these
@@ -836,7 +843,6 @@ Provides counts of softirq handlers serviced since boot time, for each cpu.
836 TASKLET: 0 0 0 290 843 TASKLET: 0 0 0 290
837 SCHED: 27035 26983 26971 26746 844 SCHED: 27035 26983 26971 26746
838 HRTIMER: 0 0 0 0 845 HRTIMER: 0 0 0 0
839 RCU: 1678 1769 2178 2250
840 846
841 847
8421.3 IDE devices in /proc/ide 8481.3 IDE devices in /proc/ide
@@ -1202,7 +1208,7 @@ The columns are:
1202 W = can do write operations 1208 W = can do write operations
1203 U = can do unblank 1209 U = can do unblank
1204 flags E = it is enabled 1210 flags E = it is enabled
1205 C = it is prefered console 1211 C = it is preferred console
1206 B = it is primary boot console 1212 B = it is primary boot console
1207 p = it is used for printk buffer 1213 p = it is used for printk buffer
1208 b = it is not a TTY but a Braille device 1214 b = it is not a TTY but a Braille device
@@ -1331,7 +1337,7 @@ NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see
1331Documentation/feature-removal-schedule.txt. 1337Documentation/feature-removal-schedule.txt.
1332 1338
1333Caveat: when a parent task is selected, the oom killer will sacrifice any first 1339Caveat: when a parent task is selected, the oom killer will sacrifice any first
1334generation children with seperate address spaces instead, if possible. This 1340generation children with separate address spaces instead, if possible. This
1335avoids servers and important system daemons from being killed and loses the 1341avoids servers and important system daemons from being killed and loses the
1336minimal amount of work. 1342minimal amount of work.
1337 1343
diff --git a/Documentation/filesystems/romfs.txt b/Documentation/filesystems/romfs.txt
index 2d2a7b2a16b..e2b07cc9120 100644
--- a/Documentation/filesystems/romfs.txt
+++ b/Documentation/filesystems/romfs.txt
@@ -17,8 +17,7 @@ comparison, an actual rescue disk used up 3202 blocks with ext2, while
17with romfs, it needed 3079 blocks. 17with romfs, it needed 3079 blocks.
18 18
19To create such a file system, you'll need a user program named 19To create such a file system, you'll need a user program named
20genromfs. It is available via anonymous ftp on sunsite.unc.edu and 20genromfs. It is available on http://romfs.sourceforge.net/
21its mirrors, in the /pub/Linux/system/recovery/ directory.
22 21
23As the name suggests, romfs could be also used (space-efficiently) on 22As the name suggests, romfs could be also used (space-efficiently) on
24various read-only media, like (E)EPROM disks if someone will have the 23various read-only media, like (E)EPROM disks if someone will have the
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index 66699afd66c..d4d41465a0b 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -59,12 +59,15 @@ obtained from this site also.
593. SQUASHFS FILESYSTEM DESIGN 593. SQUASHFS FILESYSTEM DESIGN
60----------------------------- 60-----------------------------
61 61
62A squashfs filesystem consists of a maximum of eight parts, packed together on a byte 62A squashfs filesystem consists of a maximum of nine parts, packed together on a
63alignment: 63byte alignment:
64 64
65 --------------- 65 ---------------
66 | superblock | 66 | superblock |
67 |---------------| 67 |---------------|
68 | compression |
69 | options |
70 |---------------|
68 | datablocks | 71 | datablocks |
69 | & fragments | 72 | & fragments |
70 |---------------| 73 |---------------|
@@ -91,7 +94,14 @@ the source directory, and checked for duplicates. Once all file data has been
91written the completed inode, directory, fragment, export and uid/gid lookup 94written the completed inode, directory, fragment, export and uid/gid lookup
92tables are written. 95tables are written.
93 96
943.1 Inodes 973.1 Compression options
98-----------------------
99
100Compressors can optionally support compression specific options (e.g.
101dictionary size). If non-default compression options have been used, then
102these are stored here.
103
1043.2 Inodes
95---------- 105----------
96 106
97Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each 107Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each
@@ -114,7 +124,7 @@ directory inode are defined: inodes optimised for frequently occurring
114regular files and directories, and extended types where extra 124regular files and directories, and extended types where extra
115information has to be stored. 125information has to be stored.
116 126
1173.2 Directories 1273.3 Directories
118--------------- 128---------------
119 129
120Like inodes, directories are packed into compressed metadata blocks, stored 130Like inodes, directories are packed into compressed metadata blocks, stored
@@ -144,7 +154,7 @@ decompressed to do a lookup irrespective of the length of the directory.
144This scheme has the advantage that it doesn't require extra memory overhead 154This scheme has the advantage that it doesn't require extra memory overhead
145and doesn't require much extra storage on disk. 155and doesn't require much extra storage on disk.
146 156
1473.3 File data 1573.4 File data
148------------- 158-------------
149 159
150Regular files consist of a sequence of contiguous compressed blocks, and/or a 160Regular files consist of a sequence of contiguous compressed blocks, and/or a
@@ -163,7 +173,7 @@ Larger files use multiple slots, with 1.75 TiB files using all 8 slots.
163The index cache is designed to be memory efficient, and by default uses 173The index cache is designed to be memory efficient, and by default uses
16416 KiB. 17416 KiB.
165 175
1663.4 Fragment lookup table 1763.5 Fragment lookup table
167------------------------- 177-------------------------
168 178
169Regular files can contain a fragment index which is mapped to a fragment 179Regular files can contain a fragment index which is mapped to a fragment
@@ -173,7 +183,7 @@ A second index table is used to locate these. This second index table for
173speed of access (and because it is small) is read at mount time and cached 183speed of access (and because it is small) is read at mount time and cached
174in memory. 184in memory.
175 185
1763.5 Uid/gid lookup table 1863.6 Uid/gid lookup table
177------------------------ 187------------------------
178 188
179For space efficiency regular files store uid and gid indexes, which are 189For space efficiency regular files store uid and gid indexes, which are
@@ -182,7 +192,7 @@ stored compressed into metadata blocks. A second index table is used to
182locate these. This second index table for speed of access (and because it 192locate these. This second index table for speed of access (and because it
183is small) is read at mount time and cached in memory. 193is small) is read at mount time and cached in memory.
184 194
1853.6 Export table 1953.7 Export table
186---------------- 196----------------
187 197
188To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems 198To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems
@@ -196,7 +206,7 @@ This table is stored compressed into metadata blocks. A second index table is
196used to locate these. This second index table for speed of access (and because 206used to locate these. This second index table for speed of access (and because
197it is small) is read at mount time and cached in memory. 207it is small) is read at mount time and cached in memory.
198 208
1993.7 Xattr table 2093.8 Xattr table
200--------------- 210---------------
201 211
202The xattr table contains extended attributes for each inode. The xattrs 212The xattr table contains extended attributes for each inode. The xattrs
@@ -209,7 +219,7 @@ or if it is stored out of line (in which case the value field stores a
209reference to where the actual value is stored). This allows large values 219reference to where the actual value is stored). This allows large values
210to be stored out of line improving scanning and lookup performance and it 220to be stored out of line improving scanning and lookup performance and it
211also allows values to be de-duplicated, the value being stored once, and 221also allows values to be de-duplicated, the value being stored once, and
212all other occurences holding an out of line reference to that value. 222all other occurrences holding an out of line reference to that value.
213 223
214The xattr lists are packed into compressed 8K metadata blocks. 224The xattr lists are packed into compressed 8K metadata blocks.
215To reduce overhead in inodes, rather than storing the on-disk 225To reduce overhead in inodes, rather than storing the on-disk
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 5d1335faec2..597f728e7b4 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -39,10 +39,12 @@ userspace. Top-level directories in sysfs represent the common
39ancestors of object hierarchies; i.e. the subsystems the objects 39ancestors of object hierarchies; i.e. the subsystems the objects
40belong to. 40belong to.
41 41
42Sysfs internally stores the kobject that owns the directory in the 42Sysfs internally stores a pointer to the kobject that implements a
43->d_fsdata pointer of the directory's dentry. This allows sysfs to do 43directory in the sysfs_dirent object associated with the directory. In
44reference counting directly on the kobject when the file is opened and 44the past this kobject pointer has been used by sysfs to do reference
45closed. 45counting directly on the kobject whenever the file is opened or closed.
46With the current sysfs implementation the kobject reference count is
47only modified directly by the function sysfs_schedule_callback().
46 48
47 49
48Attributes 50Attributes
@@ -60,7 +62,7 @@ values of the same type.
60 62
61Mixing types, expressing multiple lines of data, and doing fancy 63Mixing types, expressing multiple lines of data, and doing fancy
62formatting of data is heavily frowned upon. Doing these things may get 64formatting of data is heavily frowned upon. Doing these things may get
63you publically humiliated and your code rewritten without notice. 65you publicly humiliated and your code rewritten without notice.
64 66
65 67
66An attribute definition is simply: 68An attribute definition is simply:
@@ -208,9 +210,9 @@ Other notes:
208 is 4096. 210 is 4096.
209 211
210- show() methods should return the number of bytes printed into the 212- show() methods should return the number of bytes printed into the
211 buffer. This is the return value of snprintf(). 213 buffer. This is the return value of scnprintf().
212 214
213- show() should always use snprintf(). 215- show() should always use scnprintf().
214 216
215- store() should return the number of bytes used from the buffer. If the 217- store() should return the number of bytes used from the buffer. If the
216 entire buffer has been used, just return the count argument. 218 entire buffer has been used, just return the count argument.
@@ -229,7 +231,7 @@ A very simple (and naive) implementation of a device attribute is:
229static ssize_t show_name(struct device *dev, struct device_attribute *attr, 231static ssize_t show_name(struct device *dev, struct device_attribute *attr,
230 char *buf) 232 char *buf)
231{ 233{
232 return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); 234 return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
233} 235}
234 236
235static ssize_t store_name(struct device *dev, struct device_attribute *attr, 237static ssize_t store_name(struct device *dev, struct device_attribute *attr,
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt
index 12fedb7834c..8e4fab639d9 100644
--- a/Documentation/filesystems/ubifs.txt
+++ b/Documentation/filesystems/ubifs.txt
@@ -82,12 +82,12 @@ Mount options
82bulk_read read more in one go to take advantage of flash 82bulk_read read more in one go to take advantage of flash
83 media that read faster sequentially 83 media that read faster sequentially
84no_bulk_read (*) do not bulk-read 84no_bulk_read (*) do not bulk-read
85no_chk_data_crc skip checking of CRCs on data nodes in order to 85no_chk_data_crc (*) skip checking of CRCs on data nodes in order to
86 improve read performance. Use this option only 86 improve read performance. Use this option only
87 if the flash media is highly reliable. The effect 87 if the flash media is highly reliable. The effect
88 of this option is that corruption of the contents 88 of this option is that corruption of the contents
89 of a file can go unnoticed. 89 of a file can go unnoticed.
90chk_data_crc (*) do not skip checking CRCs on data nodes 90chk_data_crc do not skip checking CRCs on data nodes
91compr=none override default compressor and set it to "none" 91compr=none override default compressor and set it to "none"
92compr=lzo override default compressor and set it to "lzo" 92compr=lzo override default compressor and set it to "lzo"
93compr=zlib override default compressor and set it to "zlib" 93compr=zlib override default compressor and set it to "zlib"
@@ -115,28 +115,8 @@ ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs
115Module Parameters for Debugging 115Module Parameters for Debugging
116=============================== 116===============================
117 117
118When UBIFS has been compiled with debugging enabled, there are 3 module 118When UBIFS has been compiled with debugging enabled, there are 2 module
119parameters that are available to control aspects of testing and debugging. 119parameters that are available to control aspects of testing and debugging.
120The parameters are unsigned integers where each bit controls an option.
121The parameters are:
122
123debug_msgs Selects which debug messages to display, as follows:
124
125 Message Type Flag value
126
127 General messages 1
128 Journal messages 2
129 Mount messages 4
130 Commit messages 8
131 LEB search messages 16
132 Budgeting messages 32
133 Garbage collection messages 64
134 Tree Node Cache (TNC) messages 128
135 LEB properties (lprops) messages 256
136 Input/output messages 512
137 Log messages 1024
138 Scan messages 2048
139 Recovery messages 4096
140 120
141debug_chks Selects extra checks that UBIFS can do while running: 121debug_chks Selects extra checks that UBIFS can do while running:
142 122
@@ -154,11 +134,9 @@ debug_tsts Selects a mode of testing, as follows:
154 134
155 Test mode Flag value 135 Test mode Flag value
156 136
157 Force in-the-gaps method 2
158 Failure mode for recovery testing 4 137 Failure mode for recovery testing 4
159 138
160For example, set debug_msgs to 5 to display General messages and Mount 139For example, set debug_chks to 3 to enable general and TNC checks.
161messages.
162 140
163 141
164References 142References
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 94cf97b901d..88b9f5519af 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -95,10 +95,11 @@ functions:
95 extern int unregister_filesystem(struct file_system_type *); 95 extern int unregister_filesystem(struct file_system_type *);
96 96
97The passed struct file_system_type describes your filesystem. When a 97The passed struct file_system_type describes your filesystem. When a
98request is made to mount a device onto a directory in your filespace, 98request is made to mount a filesystem onto a directory in your namespace,
99the VFS will call the appropriate get_sb() method for the specific 99the VFS will call the appropriate mount() method for the specific
100filesystem. The dentry for the mount point will then be updated to 100filesystem. New vfsmount referring to the tree returned by ->mount()
101point to the root inode for the new filesystem. 101will be attached to the mountpoint, so that when pathname resolution
102reaches the mountpoint it will jump into the root of that vfsmount.
102 103
103You can see all filesystems that are registered to the kernel in the 104You can see all filesystems that are registered to the kernel in the
104file /proc/filesystems. 105file /proc/filesystems.
@@ -107,14 +108,14 @@ file /proc/filesystems.
107struct file_system_type 108struct file_system_type
108----------------------- 109-----------------------
109 110
110This describes the filesystem. As of kernel 2.6.22, the following 111This describes the filesystem. As of kernel 2.6.39, the following
111members are defined: 112members are defined:
112 113
113struct file_system_type { 114struct file_system_type {
114 const char *name; 115 const char *name;
115 int fs_flags; 116 int fs_flags;
116 int (*get_sb) (struct file_system_type *, int, 117 struct dentry (*mount) (struct file_system_type *, int,
117 const char *, void *, struct vfsmount *); 118 const char *, void *);
118 void (*kill_sb) (struct super_block *); 119 void (*kill_sb) (struct super_block *);
119 struct module *owner; 120 struct module *owner;
120 struct file_system_type * next; 121 struct file_system_type * next;
@@ -128,11 +129,11 @@ struct file_system_type {
128 129
129 fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) 130 fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
130 131
131 get_sb: the method to call when a new instance of this 132 mount: the method to call when a new instance of this
132 filesystem should be mounted 133 filesystem should be mounted
133 134
134 kill_sb: the method to call when an instance of this filesystem 135 kill_sb: the method to call when an instance of this filesystem
135 should be unmounted 136 should be shut down
136 137
137 owner: for internal VFS use: you should initialize this to THIS_MODULE in 138 owner: for internal VFS use: you should initialize this to THIS_MODULE in
138 most cases. 139 most cases.
@@ -141,7 +142,7 @@ struct file_system_type {
141 142
142 s_lock_key, s_umount_key: lockdep-specific 143 s_lock_key, s_umount_key: lockdep-specific
143 144
144The get_sb() method has the following arguments: 145The mount() method has the following arguments:
145 146
146 struct file_system_type *fs_type: describes the filesystem, partly initialized 147 struct file_system_type *fs_type: describes the filesystem, partly initialized
147 by the specific filesystem code 148 by the specific filesystem code
@@ -153,32 +154,39 @@ The get_sb() method has the following arguments:
153 void *data: arbitrary mount options, usually comes as an ASCII 154 void *data: arbitrary mount options, usually comes as an ASCII
154 string (see "Mount Options" section) 155 string (see "Mount Options" section)
155 156
156 struct vfsmount *mnt: a vfs-internal representation of a mount point 157The mount() method must return the root dentry of the tree requested by
158caller. An active reference to its superblock must be grabbed and the
159superblock must be locked. On failure it should return ERR_PTR(error).
157 160
158The get_sb() method must determine if the block device specified 161The arguments match those of mount(2) and their interpretation
159in the dev_name and fs_type contains a filesystem of the type the method 162depends on filesystem type. E.g. for block filesystems, dev_name is
160supports. If it succeeds in opening the named block device, it initializes a 163interpreted as block device name, that device is opened and if it
161struct super_block descriptor for the filesystem contained by the block device. 164contains a suitable filesystem image the method creates and initializes
162On failure it returns an error. 165struct super_block accordingly, returning its root dentry to caller.
166
167->mount() may choose to return a subtree of existing filesystem - it
168doesn't have to create a new one. The main result from the caller's
169point of view is a reference to dentry at the root of (sub)tree to
170be attached; creation of new superblock is a common side effect.
163 171
164The most interesting member of the superblock structure that the 172The most interesting member of the superblock structure that the
165get_sb() method fills in is the "s_op" field. This is a pointer to 173mount() method fills in is the "s_op" field. This is a pointer to
166a "struct super_operations" which describes the next level of the 174a "struct super_operations" which describes the next level of the
167filesystem implementation. 175filesystem implementation.
168 176
169Usually, a filesystem uses one of the generic get_sb() implementations 177Usually, a filesystem uses one of the generic mount() implementations
170and provides a fill_super() method instead. The generic methods are: 178and provides a fill_super() callback instead. The generic variants are:
171 179
172 get_sb_bdev: mount a filesystem residing on a block device 180 mount_bdev: mount a filesystem residing on a block device
173 181
174 get_sb_nodev: mount a filesystem that is not backed by a device 182 mount_nodev: mount a filesystem that is not backed by a device
175 183
176 get_sb_single: mount a filesystem which shares the instance between 184 mount_single: mount a filesystem which shares the instance between
177 all mounts 185 all mounts
178 186
179A fill_super() method implementation has the following arguments: 187A fill_super() callback implementation has the following arguments:
180 188
181 struct super_block *sb: the superblock structure. The method fill_super() 189 struct super_block *sb: the superblock structure. The callback
182 must initialize this properly. 190 must initialize this properly.
183 191
184 void *data: arbitrary mount options, usually comes as an ASCII 192 void *data: arbitrary mount options, usually comes as an ASCII
@@ -203,7 +211,7 @@ struct super_operations {
203 struct inode *(*alloc_inode)(struct super_block *sb); 211 struct inode *(*alloc_inode)(struct super_block *sb);
204 void (*destroy_inode)(struct inode *); 212 void (*destroy_inode)(struct inode *);
205 213
206 void (*dirty_inode) (struct inode *); 214 void (*dirty_inode) (struct inode *, int flags);
207 int (*write_inode) (struct inode *, int); 215 int (*write_inode) (struct inode *, int);
208 void (*drop_inode) (struct inode *); 216 void (*drop_inode) (struct inode *);
209 void (*delete_inode) (struct inode *); 217 void (*delete_inode) (struct inode *);
@@ -246,7 +254,7 @@ or bottom half).
246 should be synchronous or not, not all filesystems check this flag. 254 should be synchronous or not, not all filesystems check this flag.
247 255
248 drop_inode: called when the last access to the inode is dropped, 256 drop_inode: called when the last access to the inode is dropped,
249 with the inode_lock spinlock held. 257 with the inode->i_lock spinlock held.
250 258
251 This method should be either NULL (normal UNIX filesystem 259 This method should be either NULL (normal UNIX filesystem
252 semantics) or "generic_delete_inode" (for filesystems that do not 260 semantics) or "generic_delete_inode" (for filesystems that do not
@@ -865,7 +873,7 @@ struct dentry_operations {
865 void (*d_iput)(struct dentry *, struct inode *); 873 void (*d_iput)(struct dentry *, struct inode *);
866 char *(*d_dname)(struct dentry *, char *, int); 874 char *(*d_dname)(struct dentry *, char *, int);
867 struct vfsmount *(*d_automount)(struct path *); 875 struct vfsmount *(*d_automount)(struct path *);
868 int (*d_manage)(struct dentry *, bool, bool); 876 int (*d_manage)(struct dentry *, bool);
869}; 877};
870 878
871 d_revalidate: called when the VFS needs to revalidate a dentry. This 879 d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -961,10 +969,6 @@ struct dentry_operations {
961 mounted on it and not to check the automount flag. Any other error 969 mounted on it and not to check the automount flag. Any other error
962 code will abort pathwalk completely. 970 code will abort pathwalk completely.
963 971
964 If the 'mounting_here' parameter is true, then namespace_sem is being
965 held by the caller and the function should not initiate any mounts or
966 unmounts that it will then wait for.
967
968 If the 'rcu_walk' parameter is true, then the caller is doing a 972 If the 'rcu_walk' parameter is true, then the caller is doing a
969 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, 973 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
970 and the caller can be asked to leave it and call again by returing 974 and the caller can be asked to leave it and call again by returing
diff --git a/Documentation/filesystems/xfs-delayed-logging-design.txt b/Documentation/filesystems/xfs-delayed-logging-design.txt
index 7445bf335da..2ce36439c09 100644
--- a/Documentation/filesystems/xfs-delayed-logging-design.txt
+++ b/Documentation/filesystems/xfs-delayed-logging-design.txt
@@ -42,7 +42,7 @@ the aggregation of all the previous changes currently held only in the log.
42This relogging technique also allows objects to be moved forward in the log so 42This relogging technique also allows objects to be moved forward in the log so
43that an object being relogged does not prevent the tail of the log from ever 43that an object being relogged does not prevent the tail of the log from ever
44moving forward. This can be seen in the table above by the changing 44moving forward. This can be seen in the table above by the changing
45(increasing) LSN of each subsquent transaction - the LSN is effectively a 45(increasing) LSN of each subsequent transaction - the LSN is effectively a
46direct encoding of the location in the log of the transaction. 46direct encoding of the location in the log of the transaction.
47 47
48This relogging is also used to implement long-running, multiple-commit 48This relogging is also used to implement long-running, multiple-commit
@@ -338,7 +338,7 @@ the same time another transaction modifies the item and inserts the log item
338into the new CIL, then checkpoint transaction commit code cannot use log items 338into the new CIL, then checkpoint transaction commit code cannot use log items
339to store the list of log vectors that need to be written into the transaction. 339to store the list of log vectors that need to be written into the transaction.
340Hence log vectors need to be able to be chained together to allow them to be 340Hence log vectors need to be able to be chained together to allow them to be
341detatched from the log items. That is, when the CIL is flushed the memory 341detached from the log items. That is, when the CIL is flushed the memory
342buffer and log vector attached to each log item needs to be attached to the 342buffer and log vector attached to each log item needs to be attached to the
343checkpoint context so that the log item can be released. In diagrammatic form, 343checkpoint context so that the log item can be released. In diagrammatic form,
344the CIL would look like this before the flush: 344the CIL would look like this before the flush:
@@ -577,7 +577,7 @@ only becomes unpinned when all the transactions complete and there are no
577pending transactions. Thus the pinning and unpinning of a log item is symmetric 577pending transactions. Thus the pinning and unpinning of a log item is symmetric
578as there is a 1:1 relationship with transaction commit and log item completion. 578as there is a 1:1 relationship with transaction commit and log item completion.
579 579
580For delayed logging, however, we have an assymetric transaction commit to 580For delayed logging, however, we have an asymmetric transaction commit to
581completion relationship. Every time an object is relogged in the CIL it goes 581completion relationship. Every time an object is relogged in the CIL it goes
582through the commit process without a corresponding completion being registered. 582through the commit process without a corresponding completion being registered.
583That is, we now have a many-to-one relationship between transaction commit and 583That is, we now have a many-to-one relationship between transaction commit and
@@ -780,7 +780,7 @@ With delayed logging, there are new steps inserted into the life cycle:
780From this, it can be seen that the only life cycle differences between the two 780From this, it can be seen that the only life cycle differences between the two
781logging methods are in the middle of the life cycle - they still have the same 781logging methods are in the middle of the life cycle - they still have the same
782beginning and end and execution constraints. The only differences are in the 782beginning and end and execution constraints. The only differences are in the
783commiting of the log items to the log itself and the completion processing. 783committing of the log items to the log itself and the completion processing.
784Hence delayed logging should not introduce any constraints on log item 784Hence delayed logging should not introduce any constraints on log item
785behaviour, allocation or freeing that don't already exist. 785behaviour, allocation or freeing that don't already exist.
786 786
@@ -791,10 +791,3 @@ mount option. Fundamentally, there is no reason why the log manager would not
791be able to swap methods automatically and transparently depending on load 791be able to swap methods automatically and transparently depending on load
792characteristics, but this should not be necessary if delayed logging works as 792characteristics, but this should not be necessary if delayed logging works as
793designed. 793designed.
794
795Roadmap:
796
7972.6.39 Switch default mount option to use delayed logging
798 => should be roughly 12 months after initial merge
799 => enough time to shake out remaining problems before next round of
800 enterprise distro kernel rebases
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 7bff3e4f35d..3fc0c31a6f5 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -39,6 +39,12 @@ When mounting an XFS filesystem, the following options are accepted.
39 drive level write caching to be enabled, for devices that 39 drive level write caching to be enabled, for devices that
40 support write barriers. 40 support write barriers.
41 41
42 discard
43 Issue command to let the block device reclaim space freed by the
44 filesystem. This is useful for SSD devices, thinly provisioned
45 LUNs and virtual machine images, but may have a performance
46 impact. This option is incompatible with the nodelaylog option.
47
42 dmapi 48 dmapi
43 Enable the DMAPI (Data Management API) event callouts. 49 Enable the DMAPI (Data Management API) event callouts.
44 Use with the "mtpt" option. 50 Use with the "mtpt" option.
diff --git a/Documentation/flexible-arrays.txt b/Documentation/flexible-arrays.txt
index cb8a3a00cc9..df904aec990 100644
--- a/Documentation/flexible-arrays.txt
+++ b/Documentation/flexible-arrays.txt
@@ -66,10 +66,10 @@ trick is to ensure that any needed memory allocations are done before
66entering atomic context, using: 66entering atomic context, using:
67 67
68 int flex_array_prealloc(struct flex_array *array, unsigned int start, 68 int flex_array_prealloc(struct flex_array *array, unsigned int start,
69 unsigned int end, gfp_t flags); 69 unsigned int nr_elements, gfp_t flags);
70 70
71This function will ensure that memory for the elements indexed in the range 71This function will ensure that memory for the elements indexed in the range
72defined by start and end has been allocated. Thereafter, a 72defined by start and nr_elements has been allocated. Thereafter, a
73flex_array_put() call on an element in that range is guaranteed not to 73flex_array_put() call on an element in that range is guaranteed not to
74block. 74block.
75 75
diff --git a/Documentation/usb/hiddev.txt b/Documentation/hid/hiddev.txt
index 6e8c9f1d2f2..6e8c9f1d2f2 100644
--- a/Documentation/usb/hiddev.txt
+++ b/Documentation/hid/hiddev.txt
diff --git a/Documentation/hid/hidraw.txt b/Documentation/hid/hidraw.txt
new file mode 100644
index 00000000000..029e6cb9a7e
--- /dev/null
+++ b/Documentation/hid/hidraw.txt
@@ -0,0 +1,119 @@
1 HIDRAW - Raw Access to USB and Bluetooth Human Interface Devices
2 ==================================================================
3
4The hidraw driver provides a raw interface to USB and Bluetooth Human
5Interface Devices (HIDs). It differs from hiddev in that reports sent and
6received are not parsed by the HID parser, but are sent to and received from
7the device unmodified.
8
9Hidraw should be used if the userspace application knows exactly how to
10communicate with the hardware device, and is able to construct the HID
11reports manually. This is often the case when making userspace drivers for
12custom HID devices.
13
14Hidraw is also useful for communicating with non-conformant HID devices
15which send and receive data in a way that is inconsistent with their report
16descriptors. Because hiddev parses reports which are sent and received
17through it, checking them against the device's report descriptor, such
18communication with these non-conformant devices is impossible using hiddev.
19Hidraw is the only alternative, short of writing a custom kernel driver, for
20these non-conformant devices.
21
22A benefit of hidraw is that its use by userspace applications is independent
23of the underlying hardware type. Currently, Hidraw is implemented for USB
24and Bluetooth. In the future, as new hardware bus types are developed which
25use the HID specification, hidraw will be expanded to add support for these
26new bus types.
27
28Hidraw uses a dynamic major number, meaning that udev should be relied on to
29create hidraw device nodes. Udev will typically create the device nodes
30directly under /dev (eg: /dev/hidraw0). As this location is distribution-
31and udev rule-dependent, applications should use libudev to locate hidraw
32devices attached to the system. There is a tutorial on libudev with a
33working example at:
34 http://www.signal11.us/oss/udev/
35
36The HIDRAW API
37---------------
38
39read()
40-------
41read() will read a queued report received from the HID device. On USB
42devices, the reports read using read() are the reports sent from the device
43on the INTERRUPT IN endpoint. By default, read() will block until there is
44a report available to be read. read() can be made non-blocking, by passing
45the O_NONBLOCK flag to open(), or by setting the O_NONBLOCK flag using
46fcntl().
47
48On a device which uses numbered reports, the first byte of the returned data
49will be the report number; the report data follows, beginning in the second
50byte. For devices which do not use numbered reports, the report data
51will begin at the first byte.
52
53write()
54--------
55The write() function will write a report to the device. For USB devices, if
56the device has an INTERRUPT OUT endpoint, the report will be sent on that
57endpoint. If it does not, the report will be sent over the control endpoint,
58using a SET_REPORT transfer.
59
60The first byte of the buffer passed to write() should be set to the report
61number. If the device does not use numbered reports, the first byte should
62be set to 0. The report data itself should begin at the second byte.
63
64ioctl()
65--------
66Hidraw supports the following ioctls:
67
68HIDIOCGRDESCSIZE: Get Report Descriptor Size
69This ioctl will get the size of the device's report descriptor.
70
71HIDIOCGRDESC: Get Report Descriptor
72This ioctl returns the device's report descriptor using a
73hidraw_report_descriptor struct. Make sure to set the size field of the
74hidraw_report_descriptor struct to the size returned from HIDIOCGRDESCSIZE.
75
76HIDIOCGRAWINFO: Get Raw Info
77This ioctl will return a hidraw_devinfo struct containing the bus type, the
78vendor ID (VID), and product ID (PID) of the device. The bus type can be one
79of:
80 BUS_USB
81 BUS_HIL
82 BUS_BLUETOOTH
83 BUS_VIRTUAL
84which are defined in linux/input.h.
85
86HIDIOCGRAWNAME(len): Get Raw Name
87This ioctl returns a string containing the vendor and product strings of
88the device. The returned string is Unicode, UTF-8 encoded.
89
90HIDIOCGRAWPHYS(len): Get Physical Address
91This ioctl returns a string representing the physical address of the device.
92For USB devices, the string contains the physical path to the device (the
93USB controller, hubs, ports, etc). For Bluetooth devices, the string
94contains the hardware (MAC) address of the device.
95
96HIDIOCSFEATURE(len): Send a Feature Report
97This ioctl will send a feature report to the device. Per the HID
98specification, feature reports are always sent using the control endpoint.
99Set the first byte of the supplied buffer to the report number. For devices
100which do not use numbered reports, set the first byte to 0. The report data
101begins in the second byte. Make sure to set len accordingly, to one more
102than the length of the report (to account for the report number).
103
104HIDIOCGFEATURE(len): Get a Feature Report
105This ioctl will request a feature report from the device using the control
106endpoint. The first byte of the supplied buffer should be set to the report
107number of the requested report. For devices which do not use numbered
108reports, set the first byte to 0. The report will be returned starting at
109the first byte of the buffer (ie: the report number is not returned).
110
111Example
112---------
113In samples/, find hid-example.c, which shows examples of read(), write(),
114and all the ioctls for hidraw. The code may be used by anyone for any
115purpose, and can serve as a starting point for developing applications using
116hidraw.
117
118Document by:
119 Alan Ott <alan@signal11.us>, Signal 11 Software
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru
index 5eb3b9d5f0d..915f32063a2 100644
--- a/Documentation/hwmon/abituguru
+++ b/Documentation/hwmon/abituguru
@@ -78,7 +78,7 @@ motherboards (most modern Abit motherboards).
78 78
79The first and second revision of the uGuru chip in reality is a Winbond 79The first and second revision of the uGuru chip in reality is a Winbond
80W83L950D in disguise (despite Abit claiming it is "a new microprocessor 80W83L950D in disguise (despite Abit claiming it is "a new microprocessor
81designed by the ABIT Engineers"). Unfortunatly this doesn't help since the 81designed by the ABIT Engineers"). Unfortunately this doesn't help since the
82W83L950D is a generic microcontroller with a custom Abit application running 82W83L950D is a generic microcontroller with a custom Abit application running
83on it. 83on it.
84 84
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet
index d9251efdcec..8d2be8a0b1e 100644
--- a/Documentation/hwmon/abituguru-datasheet
+++ b/Documentation/hwmon/abituguru-datasheet
@@ -5,9 +5,9 @@ First of all, what I know about uGuru is no fact based on any help, hints or
5datasheet from Abit. The data I have got on uGuru have I assembled through 5datasheet from Abit. The data I have got on uGuru have I assembled through
6my weak knowledge in "backwards engineering". 6my weak knowledge in "backwards engineering".
7And just for the record, you may have noticed uGuru isn't a chip developed by 7And just for the record, you may have noticed uGuru isn't a chip developed by
8Abit, as they claim it to be. It's realy just an microprocessor (uC) created by 8Abit, as they claim it to be. It's really just an microprocessor (uC) created by
9Winbond (W83L950D). And no, reading the manual for this specific uC or 9Winbond (W83L950D). And no, reading the manual for this specific uC or
10mailing Windbond for help won't give any usefull data about uGuru, as it is 10mailing Windbond for help won't give any useful data about uGuru, as it is
11the program inside the uC that is responding to calls. 11the program inside the uC that is responding to calls.
12 12
13Olle Sandberg <ollebull@gmail.com>, 2005-05-25 13Olle Sandberg <ollebull@gmail.com>, 2005-05-25
@@ -41,7 +41,7 @@ later on attached again data-port will hold 0x08, more about this later.
41 41
42After wider testing of the Linux kernel driver some variants of the uGuru have 42After wider testing of the Linux kernel driver some variants of the uGuru have
43turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also 43turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also
44have to test CMD for two different values. On these uGuru's DATA will initally 44have to test CMD for two different values. On these uGuru's DATA will initially
45hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read 45hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read
46first! 46first!
47 47
@@ -308,5 +308,5 @@ the voltage / clock programming out, I tried reading and only reading banks
308resulted in a _permanent_ reprogramming of the voltages, luckily I had the 308resulted in a _permanent_ reprogramming of the voltages, luckily I had the
309sensors part configured so that it would shutdown my system on any out of spec 309sensors part configured so that it would shutdown my system on any out of spec
310voltages which proprably safed my computer (after a reboot I managed to 310voltages which proprably safed my computer (after a reboot I managed to
311immediatly enter the bios and reload the defaults). This probably means that 311immediately enter the bios and reload the defaults). This probably means that
312the read/write cycle for the non sensor part is different from the sensor part. 312the read/write cycle for the non sensor part is different from the sensor part.
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3
index fa598aac22f..a6ccfe4bb6a 100644
--- a/Documentation/hwmon/abituguru3
+++ b/Documentation/hwmon/abituguru3
@@ -47,7 +47,7 @@ This driver supports the hardware monitoring features of the third revision of
47the Abit uGuru chip, found on recent Abit uGuru featuring motherboards. 47the Abit uGuru chip, found on recent Abit uGuru featuring motherboards.
48 48
49The 3rd revision of the uGuru chip in reality is a Winbond W83L951G. 49The 3rd revision of the uGuru chip in reality is a Winbond W83L951G.
50Unfortunatly this doesn't help since the W83L951G is a generic microcontroller 50Unfortunately this doesn't help since the W83L951G is a generic microcontroller
51with a custom Abit application running on it. 51with a custom Abit application running on it.
52 52
53Despite Abit not releasing any information regarding the uGuru revision 3, 53Despite Abit not releasing any information regarding the uGuru revision 3,
diff --git a/Documentation/hwmon/adm1021 b/Documentation/hwmon/adm1021
index 03d02bfb3df..02ad96cf9b2 100644
--- a/Documentation/hwmon/adm1021
+++ b/Documentation/hwmon/adm1021
@@ -14,10 +14,6 @@ Supported chips:
14 Prefix: 'gl523sm' 14 Prefix: 'gl523sm'
15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
16 Datasheet: 16 Datasheet:
17 * Intel Xeon Processor
18 Prefix: - any other - may require 'force_adm1021' parameter
19 Addresses scanned: none
20 Datasheet: Publicly available at Intel website
21 * Maxim MAX1617 17 * Maxim MAX1617
22 Prefix: 'max1617' 18 Prefix: 'max1617'
23 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 19 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
@@ -91,21 +87,27 @@ will do no harm, but will return 'old' values. It is possible to make
91ADM1021-clones do faster measurements, but there is really no good reason 87ADM1021-clones do faster measurements, but there is really no good reason
92for that. 88for that.
93 89
94Xeon support
95------------
96 90
97Some Xeon processors have real max1617, adm1021, or compatible chips 91Netburst-based Xeon support
98within them, with two temperature sensors. 92---------------------------
99 93
100Other Xeons have chips with only one sensor. 94Some Xeon processors based on the Netburst (early Pentium 4, from 2001 to
952003) microarchitecture had real MAX1617, ADM1021, or compatible chips
96within them, with two temperature sensors. Other Xeon processors of this
97era (with 400 MHz FSB) had chips with only one temperature sensor.
101 98
102If you have a Xeon, and the adm1021 module loads, and both temperatures 99If you have such an old Xeon, and you get two valid temperatures when
103appear valid, then things are good. 100loading the adm1021 module, then things are good.
104 101
105If the adm1021 module doesn't load, you should try this: 102If nothing happens when loading the adm1021 module, and you are certain
106 modprobe adm1021 force_adm1021=BUS,ADDRESS 103that your specific Xeon processor model includes compatible sensors, you
107 ADDRESS can only be 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. 104will have to explicitly instantiate the sensor chips from user-space. See
105method 4 in Documentation/i2c/instantiating-devices. Possible slave
106addresses are 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. It is likely that
107only temp2 will be correct and temp1 will have to be ignored.
108 108
109If you have dual Xeons you may have appear to have two separate 109Previous generations of the Xeon processor (based on Pentium II/III)
110adm1021-compatible chips, or two single-temperature sensors, at distinct 110didn't have these sensors. Next generations of Xeon processors (533 MHz
111addresses. 111FSB and faster) lost them, until the Core-based generation which
112introduced integrated digital thermal sensors. These are supported by
113the coretemp driver.
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275
new file mode 100644
index 00000000000..6a3a6476cf2
--- /dev/null
+++ b/Documentation/hwmon/adm1275
@@ -0,0 +1,60 @@
1Kernel driver adm1275
2=====================
3
4Supported chips:
5 * Analog Devices ADM1275
6 Prefix: 'adm1275'
7 Addresses scanned: -
8 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf
9
10Author: Guenter Roeck <guenter.roeck@ericsson.com>
11
12
13Description
14-----------
15
16This driver supports hardware montoring for Analog Devices ADM1275 Hot-Swap
17Controller and Digital Power Monitor.
18
19The ADM1275 is a hot-swap controller that allows a circuit board to be removed
20from or inserted into a live backplane. It also features current and voltage
21readback via an integrated 12-bit analog-to-digital converter (ADC), accessed
22using a PMBus. interface.
23
24The driver is a client driver to the core PMBus driver. Please see
25Documentation/hwmon/pmbus for details on PMBus client drivers.
26
27
28Usage Notes
29-----------
30
31This driver does not auto-detect devices. You will have to instantiate the
32devices explicitly. Please see Documentation/i2c/instantiating-devices for
33details.
34
35
36Platform data support
37---------------------
38
39The driver supports standard PMBus driver platform data. Please see
40Documentation/hwmon/pmbus for details.
41
42
43Sysfs entries
44-------------
45
46The following attributes are supported. Limits are read-write; all other
47attributes are read-only.
48
49in1_label "vin1" or "vout1" depending on chip variant and
50 configuration.
51in1_input Measured voltage. From READ_VOUT register.
52in1_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
53in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
54in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
55in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
56
57curr1_label "iout1"
58curr1_input Measured current. From READ_IOUT register.
59curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register.
60curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT register.
diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015
new file mode 100644
index 00000000000..f6fe9c20373
--- /dev/null
+++ b/Documentation/hwmon/ads1015
@@ -0,0 +1,72 @@
1Kernel driver ads1015
2=====================
3
4Supported chips:
5 * Texas Instruments ADS1015
6 Prefix: 'ads1015'
7 Datasheet: Publicly available at the Texas Instruments website :
8 http://focus.ti.com/lit/ds/symlink/ads1015.pdf
9
10Authors:
11 Dirk Eibach, Guntermann & Drunck GmbH <eibach@gdsys.de>
12
13Description
14-----------
15
16This driver implements support for the Texas Instruments ADS1015.
17
18This device is a 12-bit A-D converter with 4 inputs.
19
20The inputs can be used single ended or in certain differential combinations.
21
22The inputs can be made available by 8 sysfs input files in0_input - in7_input:
23in0: Voltage over AIN0 and AIN1.
24in1: Voltage over AIN0 and AIN3.
25in2: Voltage over AIN1 and AIN3.
26in3: Voltage over AIN2 and AIN3.
27in4: Voltage over AIN0 and GND.
28in5: Voltage over AIN1 and GND.
29in6: Voltage over AIN2 and GND.
30in7: Voltage over AIN3 and GND.
31
32Which inputs are available can be configured using platform data or devicetree.
33
34By default all inputs are exported.
35
36Platform Data
37-------------
38
39In linux/i2c/ads1015.h platform data is defined, channel_data contains
40configuration data for the used input combinations:
41- pga is the programmable gain amplifier (values are full scale)
42 0: +/- 6.144 V
43 1: +/- 4.096 V
44 2: +/- 2.048 V
45 3: +/- 1.024 V
46 4: +/- 0.512 V
47 5: +/- 0.256 V
48- data_rate in samples per second
49 0: 128
50 1: 250
51 2: 490
52 3: 920
53 4: 1600
54 5: 2400
55 6: 3300
56
57Example:
58struct ads1015_platform_data data = {
59 .channel_data = {
60 [2] = { .enabled = true, .pga = 1, .data_rate = 0 },
61 [4] = { .enabled = true, .pga = 4, .data_rate = 5 },
62 }
63};
64
65In this case only in2_input (FS +/- 4.096 V, 128 SPS) and in4_input
66(FS +/- 0.512 V, 2400 SPS) would be created.
67
68Devicetree
69----------
70
71Configuration is also possible via devicetree:
72Documentation/devicetree/bindings/hwmon/ads1015.txt
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp
index 25568f84480..f85e913a340 100644
--- a/Documentation/hwmon/coretemp
+++ b/Documentation/hwmon/coretemp
@@ -15,8 +15,13 @@ Author: Rudolf Marek
15 15
16Description 16Description
17----------- 17-----------
18This driver permits reading the DTS (Digital Temperature Sensor) embedded
19inside Intel CPUs. This driver can read both the per-core and per-package
20temperature using the appropriate sensors. The per-package sensor is new;
21as of now, it is present only in the SandyBridge platform. The driver will
22show the temperature of all cores inside a package under a single device
23directory inside hwmon.
18 24
19This driver permits reading temperature sensor embedded inside Intel Core CPU.
20Temperature is measured in degrees Celsius and measurement resolution is 25Temperature is measured in degrees Celsius and measurement resolution is
211 degree C. Valid temperatures are from 0 to TjMax degrees C, because 261 degree C. Valid temperatures are from 0 to TjMax degrees C, because
22the actual value of temperature register is in fact a delta from TjMax. 27the actual value of temperature register is in fact a delta from TjMax.
@@ -27,13 +32,15 @@ mechanism will perform actions to forcibly cool down the processor. Alarm
27may be raised, if the temperature grows enough (more than TjMax) to trigger 32may be raised, if the temperature grows enough (more than TjMax) to trigger
28the Out-Of-Spec bit. Following table summarizes the exported sysfs files: 33the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
29 34
30temp1_input - Core temperature (in millidegrees Celsius). 35All Sysfs entries are named with their core_id (represented here by 'X').
31temp1_max - All cooling devices should be turned on (on Core2). 36tempX_input - Core temperature (in millidegrees Celsius).
32temp1_crit - Maximum junction temperature (in millidegrees Celsius). 37tempX_max - All cooling devices should be turned on (on Core2).
33temp1_crit_alarm - Set when Out-of-spec bit is set, never clears. 38tempX_crit - Maximum junction temperature (in millidegrees Celsius).
39tempX_crit_alarm - Set when Out-of-spec bit is set, never clears.
34 Correct CPU operation is no longer guaranteed. 40 Correct CPU operation is no longer guaranteed.
35temp1_label - Contains string "Core X", where X is processor 41tempX_label - Contains string "Core X", where X is processor
36 number. 42 number. For Package temp, this will be "Physical id Y",
43 where Y is the package number.
37 44
38The TjMax temperature is set to 85 degrees C if undocumented model specific 45The TjMax temperature is set to 85 degrees C if undocumented model specific
39register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as 46register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as
diff --git a/Documentation/hwmon/emc6w201 b/Documentation/hwmon/emc6w201
new file mode 100644
index 00000000000..32f355aaf56
--- /dev/null
+++ b/Documentation/hwmon/emc6w201
@@ -0,0 +1,42 @@
1Kernel driver emc6w201
2======================
3
4Supported chips:
5 * SMSC EMC6W201
6 Prefix: 'emc6w201'
7 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
8 Datasheet: Not public
9
10Author: Jean Delvare <khali@linux-fr.org>
11
12
13Description
14-----------
15
16From the datasheet:
17
18"The EMC6W201 is an environmental monitoring device with automatic fan
19control capability and enhanced system acoustics for noise suppression.
20This ACPI compliant device provides hardware monitoring for up to six
21voltages (including its own VCC) and five external thermal sensors,
22measures the speed of up to five fans, and controls the speed of
23multiple DC fans using three Pulse Width Modulator (PWM) outputs. Note
24that it is possible to control more than three fans by connecting two
25fans to one PWM output. The EMC6W201 will be available in a 36-pin
26QFN package."
27
28The device is functionally close to the EMC6D100 series, but is
29register-incompatible.
30
31The driver currently only supports the monitoring of the voltages,
32temperatures and fan speeds. Limits can be changed. Alarms are not
33supported, and neither is fan speed control.
34
35
36Known Systems With EMC6W201
37---------------------------
38
39The EMC6W201 is a rare device, only found on a few systems, made in
402005 and 2006. Known systems with this device:
41* Dell Precision 670 workstation
42* Gigabyte 2CEWH mainboard
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg
index a7952c2bd95..84d2623810f 100644
--- a/Documentation/hwmon/f71882fg
+++ b/Documentation/hwmon/f71882fg
@@ -2,6 +2,14 @@ Kernel driver f71882fg
2====================== 2======================
3 3
4Supported chips: 4Supported chips:
5 * Fintek F71808E
6 Prefix: 'f71808e'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Not public
9 * Fintek F71808A
10 Prefix: 'f71808a'
11 Addresses scanned: none, address read from Super I/O config space
12 Datasheet: Not public
5 * Fintek F71858FG 13 * Fintek F71858FG
6 Prefix: 'f71858fg' 14 Prefix: 'f71858fg'
7 Addresses scanned: none, address read from Super I/O config space 15 Addresses scanned: none, address read from Super I/O config space
@@ -10,6 +18,10 @@ Supported chips:
10 Prefix: 'f71862fg' 18 Prefix: 'f71862fg'
11 Addresses scanned: none, address read from Super I/O config space 19 Addresses scanned: none, address read from Super I/O config space
12 Datasheet: Available from the Fintek website 20 Datasheet: Available from the Fintek website
21 * Fintek F71869F and F71869E
22 Prefix: 'f71869'
23 Addresses scanned: none, address read from Super I/O config space
24 Datasheet: Available from the Fintek website
13 * Fintek F71882FG and F71883FG 25 * Fintek F71882FG and F71883FG
14 Prefix: 'f71882fg' 26 Prefix: 'f71882fg'
15 Addresses scanned: none, address read from Super I/O config space 27 Addresses scanned: none, address read from Super I/O config space
@@ -17,11 +29,30 @@ Supported chips:
17 * Fintek F71889FG 29 * Fintek F71889FG
18 Prefix: 'f71889fg' 30 Prefix: 'f71889fg'
19 Addresses scanned: none, address read from Super I/O config space 31 Addresses scanned: none, address read from Super I/O config space
32 Datasheet: Available from the Fintek website
33 * Fintek F71889ED
34 Prefix: 'f71889ed'
35 Addresses scanned: none, address read from Super I/O config space
36 Datasheet: Should become available on the Fintek website soon
37 * Fintek F71889A
38 Prefix: 'f71889a'
39 Addresses scanned: none, address read from Super I/O config space
20 Datasheet: Should become available on the Fintek website soon 40 Datasheet: Should become available on the Fintek website soon
21 * Fintek F8000 41 * Fintek F8000
22 Prefix: 'f8000' 42 Prefix: 'f8000'
23 Addresses scanned: none, address read from Super I/O config space 43 Addresses scanned: none, address read from Super I/O config space
24 Datasheet: Not public 44 Datasheet: Not public
45 * Fintek F81801U
46 Prefix: 'f71889fg'
47 Addresses scanned: none, address read from Super I/O config space
48 Datasheet: Not public
49 Note: This is the 64-pin variant of the F71889FG, they have the
50 same device ID and are fully compatible as far as hardware
51 monitoring is concerned.
52 * Fintek F81865F
53 Prefix: 'f81865f'
54 Addresses scanned: none, address read from Super I/O config space
55 Datasheet: Available from the Fintek website
25 56
26Author: Hans de Goede <hdegoede@redhat.com> 57Author: Hans de Goede <hdegoede@redhat.com>
27 58
@@ -29,9 +60,9 @@ Author: Hans de Goede <hdegoede@redhat.com>
29Description 60Description
30----------- 61-----------
31 62
32Fintek F718xxFG/F8000 Super I/O chips include complete hardware monitoring 63Fintek F718xx/F8000 Super I/O chips include complete hardware monitoring
33capabilities. They can monitor up to 9 voltages (3 for the F8000), 4 fans and 64capabilities. They can monitor up to 9 voltages, 4 fans and 3 temperature
343 temperature sensors. 65sensors.
35 66
36These chips also have fan controlling features, using either DC or PWM, in 67These chips also have fan controlling features, using either DC or PWM, in
37three different modes (one manual, two automatic). 68three different modes (one manual, two automatic).
@@ -99,5 +130,5 @@ Writing an unsupported mode will result in an invalid parameter error.
99 The fan speed is regulated to keep the temp the fan is mapped to between 130 The fan speed is regulated to keep the temp the fan is mapped to between
100 temp#_auto_point2_temp and temp#_auto_point3_temp. 131 temp#_auto_point2_temp and temp#_auto_point3_temp.
101 132
102Both of the automatic modes require that pwm1 corresponds to fan1, pwm2 to 133All of the automatic modes require that pwm1 corresponds to fan1, pwm2 to
103fan2 and pwm3 to fan3. 134fan2 and pwm3 to fan3.
diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power
new file mode 100644
index 00000000000..a92918e0bd6
--- /dev/null
+++ b/Documentation/hwmon/fam15h_power
@@ -0,0 +1,37 @@
1Kernel driver fam15h_power
2==========================
3
4Supported chips:
5* AMD Family 15h Processors
6
7 Prefix: 'fam15h_power'
8 Addresses scanned: PCI space
9 Datasheets:
10 BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors
11 (not yet published)
12
13Author: Andreas Herrmann <andreas.herrmann3@amd.com>
14
15Description
16-----------
17
18This driver permits reading of registers providing power information
19of AMD Family 15h processors.
20
21For AMD Family 15h processors the following power values can be
22calculated using different processor northbridge function registers:
23
24* BasePwrWatts: Specifies in watts the maximum amount of power
25 consumed by the processor for NB and logic external to the core.
26* ProcessorPwrWatts: Specifies in watts the maximum amount of power
27 the processor can support.
28* CurrPwrWatts: Specifies in watts the current amount of power being
29 consumed by the processor.
30
31This driver provides ProcessorPwrWatts and CurrPwrWatts:
32* power1_crit (ProcessorPwrWatts)
33* power1_input (CurrPwrWatts)
34
35On multi-node processors the calculated value is for the entire
36package and not for a single node. Thus the driver creates sysfs
37attributes only for internal node0 of a multi-node processor.
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
index d2b56a4fd1f..0393c89277c 100644
--- a/Documentation/hwmon/k10temp
+++ b/Documentation/hwmon/k10temp
@@ -11,6 +11,7 @@ Supported chips:
11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) 11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
12* AMD Family 12h processors: "Llano" 12* AMD Family 12h processors: "Llano"
13* AMD Family 14h processors: "Brazos" (C/E/G-Series) 13* AMD Family 14h processors: "Brazos" (C/E/G-Series)
14* AMD Family 15h processors: "Bulldozer"
14 15
15 Prefix: 'k10temp' 16 Prefix: 'k10temp'
16 Addresses scanned: PCI space 17 Addresses scanned: PCI space
@@ -40,7 +41,7 @@ Description
40----------- 41-----------
41 42
42This driver permits reading of the internal temperature sensor of AMD 43This driver permits reading of the internal temperature sensor of AMD
43Family 10h/11h/12h/14h processors. 44Family 10h/11h/12h/14h/15h processors.
44 45
45All these processors have a sensor, but on those for Socket F or AM2+, 46All these processors have a sensor, but on those for Socket F or AM2+,
46the sensor may return inconsistent values (erratum 319). The driver 47the sensor may return inconsistent values (erratum 319). The driver
diff --git a/Documentation/hwmon/lineage-pem b/Documentation/hwmon/lineage-pem
new file mode 100644
index 00000000000..2ba5ed12685
--- /dev/null
+++ b/Documentation/hwmon/lineage-pem
@@ -0,0 +1,77 @@
1Kernel driver lineage-pem
2=========================
3
4Supported devices:
5 * Lineage Compact Power Line Power Entry Modules
6 Prefix: 'lineage-pem'
7 Addresses scanned: -
8 Documentation:
9 http://www.lineagepower.com/oem/pdf/CPLI2C.pdf
10
11Author: Guenter Roeck <guenter.roeck@ericsson.com>
12
13
14Description
15-----------
16
17This driver supports various Lineage Compact Power Line DC/DC and AC/DC
18converters such as CP1800, CP2000AC, CP2000DC, CP2100DC, and others.
19
20Lineage CPL power entry modules are nominally PMBus compliant. However, most
21standard PMBus commands are not supported. Specifically, all hardware monitoring
22and status reporting commands are non-standard. For this reason, a standard
23PMBus driver can not be used.
24
25
26Usage Notes
27-----------
28
29This driver does not probe for Lineage CPL devices, since there is no register
30which can be safely used to identify the chip. You will have to instantiate
31the devices explicitly.
32
33Example: the following will load the driver for a Lineage PEM at address 0x40
34on I2C bus #1:
35$ modprobe lineage-pem
36$ echo lineage-pem 0x40 > /sys/bus/i2c/devices/i2c-1/new_device
37
38All Lineage CPL power entry modules have a built-in I2C bus master selector
39(PCA9541). To ensure device access, this driver should only be used as client
40driver to the pca9541 I2C master selector driver.
41
42
43Sysfs entries
44-------------
45
46All Lineage CPL devices report output voltage and device temperature as well as
47alarms for output voltage, temperature, input voltage, input current, input power,
48and fan status.
49
50Input voltage, input current, input power, and fan speed measurement is only
51supported on newer devices. The driver detects if those attributes are supported,
52and only creates respective sysfs entries if they are.
53
54in1_input Output voltage (mV)
55in1_min_alarm Output undervoltage alarm
56in1_max_alarm Output overvoltage alarm
57in1_crit Output voltage critical alarm
58
59in2_input Input voltage (mV, optional)
60in2_alarm Input voltage alarm
61
62curr1_input Input current (mA, optional)
63curr1_alarm Input overcurrent alarm
64
65power1_input Input power (uW, optional)
66power1_alarm Input power alarm
67
68fan1_input Fan 1 speed (rpm, optional)
69fan2_input Fan 2 speed (rpm, optional)
70fan3_input Fan 3 speed (rpm, optional)
71
72temp1_input
73temp1_max
74temp1_crit
75temp1_alarm
76temp1_crit_alarm
77temp1_fault
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index 8e6356fe05d..a1790401fdd 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -7,6 +7,11 @@ Supported chips:
7 Addresses scanned: I2C 0x48 - 0x4f 7 Addresses scanned: I2C 0x48 - 0x4f
8 Datasheet: Publicly available at the National Semiconductor website 8 Datasheet: Publicly available at the National Semiconductor website
9 http://www.national.com/ 9 http://www.national.com/
10 * National Semiconductor LM75A
11 Prefix: 'lm75a'
12 Addresses scanned: I2C 0x48 - 0x4f
13 Datasheet: Publicly available at the National Semiconductor website
14 http://www.national.com/
10 * Dallas Semiconductor DS75 15 * Dallas Semiconductor DS75
11 Prefix: 'lm75' 16 Prefix: 'lm75'
12 Addresses scanned: I2C 0x48 - 0x4f 17 Addresses scanned: I2C 0x48 - 0x4f
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index 239258a63c8..7c49feaa79d 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -26,6 +26,14 @@ Supported chips:
26 Prefix: 'emc6d102' 26 Prefix: 'emc6d102'
27 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 27 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
28 Datasheet: http://www.smsc.com/main/catalog/emc6d102.html 28 Datasheet: http://www.smsc.com/main/catalog/emc6d102.html
29 * SMSC EMC6D103
30 Prefix: 'emc6d103'
31 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
32 Datasheet: http://www.smsc.com/main/catalog/emc6d103.html
33 * SMSC EMC6D103S
34 Prefix: 'emc6d103s'
35 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
36 Datasheet: http://www.smsc.com/main/catalog/emc6d103s.html
29 37
30Authors: 38Authors:
31 Philip Pokorny <ppokorny@penguincomputing.com>, 39 Philip Pokorny <ppokorny@penguincomputing.com>,
@@ -122,9 +130,11 @@ to be register compatible. The EMC6D100 offers all the features of the
122EMC6D101 plus additional voltage monitoring and system control features. 130EMC6D101 plus additional voltage monitoring and system control features.
123Unfortunately it is not possible to distinguish between the package 131Unfortunately it is not possible to distinguish between the package
124versions on register level so these additional voltage inputs may read 132versions on register level so these additional voltage inputs may read
125zero. The EMC6D102 features addtional ADC bits thus extending precision 133zero. EMC6D102 and EMC6D103 feature additional ADC bits thus extending precision
126of voltage and temperature channels. 134of voltage and temperature channels.
127 135
136SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
137and temp#_auto_temp_off.
128 138
129Hardware Configurations 139Hardware Configurations
130----------------------- 140-----------------------
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index fa475c0a48a..f3efd18e87f 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -32,6 +32,16 @@ Supported chips:
32 Addresses scanned: I2C 0x4c and 0x4d 32 Addresses scanned: I2C 0x4c and 0x4d
33 Datasheet: Publicly available at the ON Semiconductor website 33 Datasheet: Publicly available at the ON Semiconductor website
34 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 34 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
35 * Analog Devices ADT7461A
36 Prefix: 'adt7461a'
37 Addresses scanned: I2C 0x4c and 0x4d
38 Datasheet: Publicly available at the ON Semiconductor website
39 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
40 * ON Semiconductor NCT1008
41 Prefix: 'nct1008'
42 Addresses scanned: I2C 0x4c and 0x4d
43 Datasheet: Publicly available at the ON Semiconductor website
44 http://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
35 * Maxim MAX6646 45 * Maxim MAX6646
36 Prefix: 'max6646' 46 Prefix: 'max6646'
37 Addresses scanned: I2C 0x4d 47 Addresses scanned: I2C 0x4d
@@ -149,7 +159,7 @@ ADM1032:
149 * ALERT is triggered by open remote sensor. 159 * ALERT is triggered by open remote sensor.
150 * SMBus PEC support for Write Byte and Receive Byte transactions. 160 * SMBus PEC support for Write Byte and Receive Byte transactions.
151 161
152ADT7461: 162ADT7461, ADT7461A, NCT1008:
153 * Extended temperature range (breaks compatibility) 163 * Extended temperature range (breaks compatibility)
154 * Lower resolution for remote temperature 164 * Lower resolution for remote temperature
155 165
@@ -195,9 +205,9 @@ are exported, one for each channel, but these values are of course linked.
195Only the local hysteresis can be set from user-space, and the same delta 205Only the local hysteresis can be set from user-space, and the same delta
196applies to the remote hysteresis. 206applies to the remote hysteresis.
197 207
198The lm90 driver will not update its values more frequently than every 208The lm90 driver will not update its values more frequently than configured with
199other second; reading them more often will do no harm, but will return 209the update_interval attribute; reading them more often will do no harm, but will
200'old' values. 210return 'old' values.
201 211
202SMBus Alert Support 212SMBus Alert Support
203------------------- 213-------------------
@@ -205,11 +215,12 @@ SMBus Alert Support
205This driver has basic support for SMBus alert. When an alert is received, 215This driver has basic support for SMBus alert. When an alert is received,
206the status register is read and the faulty temperature channel is logged. 216the status register is read and the faulty temperature channel is logged.
207 217
208The Analog Devices chips (ADM1032 and ADT7461) do not implement the SMBus 218The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
209alert protocol properly so additional care is needed: the ALERT output is 219Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
210disabled when an alert is received, and is re-enabled only when the alarm 220properly so additional care is needed: the ALERT output is disabled when
211is gone. Otherwise the chip would block alerts from other chips in the bus 221an alert is received, and is re-enabled only when the alarm is gone.
212as long as the alarm is active. 222Otherwise the chip would block alerts from other chips in the bus as long
223as the alarm is active.
213 224
214PEC Support 225PEC Support
215----------- 226-----------
diff --git a/Documentation/hwmon/ltc4151 b/Documentation/hwmon/ltc4151
new file mode 100644
index 00000000000..43c667e6677
--- /dev/null
+++ b/Documentation/hwmon/ltc4151
@@ -0,0 +1,47 @@
1Kernel driver ltc4151
2=====================
3
4Supported chips:
5 * Linear Technology LTC4151
6 Prefix: 'ltc4151'
7 Addresses scanned: -
8 Datasheet:
9 http://www.linear.com/docs/Datasheet/4151fc.pdf
10
11Author: Per Dalen <per.dalen@appeartv.com>
12
13
14Description
15-----------
16
17The LTC4151 is a High Voltage I2C Current and Voltage Monitor.
18
19
20Usage Notes
21-----------
22
23This driver does not probe for LTC4151 devices, since there is no register
24which can be safely used to identify the chip. You will have to instantiate
25the devices explicitly.
26
27Example: the following will load the driver for an LTC4151 at address 0x6f
28on I2C bus #0:
29# modprobe ltc4151
30# echo ltc4151 0x6f > /sys/bus/i2c/devices/i2c-0/new_device
31
32
33Sysfs entries
34-------------
35
36Voltage readings provided by this driver are reported as obtained from the ADIN
37and VIN registers.
38
39Current reading provided by this driver is reported as obtained from the Current
40Sense register. The reported value assumes that a 1 mOhm sense resistor is
41installed.
42
43in1_input VDIN voltage (mV)
44
45in2_input ADIN voltage (mV)
46
47curr1_input SENSE current (mA)
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064
new file mode 100644
index 00000000000..41728999e14
--- /dev/null
+++ b/Documentation/hwmon/max16064
@@ -0,0 +1,62 @@
1Kernel driver max16064
2======================
3
4Supported chips:
5 * Maxim MAX16064
6 Prefix: 'max16064'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
9
10Author: Guenter Roeck <guenter.roeck@ericsson.com>
11
12
13Description
14-----------
15
16This driver supports hardware montoring for Maxim MAX16064 Quad Power-Supply
17Controller with Active-Voltage Output Control and PMBus Interface.
18
19The driver is a client driver to the core PMBus driver.
20Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
21
22
23Usage Notes
24-----------
25
26This driver does not auto-detect devices. You will have to instantiate the
27devices explicitly. Please see Documentation/i2c/instantiating-devices for
28details.
29
30
31Platform data support
32---------------------
33
34The driver supports standard PMBus driver platform data.
35
36
37Sysfs entries
38-------------
39
40The following attributes are supported. Limits are read-write; all other
41attributes are read-only.
42
43in[1-4]_label "vout[1-4]"
44in[1-4]_input Measured voltage. From READ_VOUT register.
45in[1-4]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
46in[1-4]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in[1-4]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
48in[1-4]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in[1-4]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in[1-4]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
51in[1-4]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
52in[1-4]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
53
54temp1_input Measured temperature. From READ_TEMPERATURE_1 register.
55temp1_max Maximum temperature. From OT_WARN_LIMIT register.
56temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
57temp1_max_alarm Chip temperature high alarm. Set by comparing
58 READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
59 status is set.
60temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
61 READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
62 status is set.
diff --git a/Documentation/hwmon/max16065 b/Documentation/hwmon/max16065
new file mode 100644
index 00000000000..44b4f61e04f
--- /dev/null
+++ b/Documentation/hwmon/max16065
@@ -0,0 +1,98 @@
1Kernel driver max16065
2======================
3
4Supported chips:
5 * Maxim MAX16065, MAX16066
6 Prefixes: 'max16065', 'max16066'
7 Addresses scanned: -
8 Datasheet:
9 http://datasheets.maxim-ic.com/en/ds/MAX16065-MAX16066.pdf
10 * Maxim MAX16067
11 Prefix: 'max16067'
12 Addresses scanned: -
13 Datasheet:
14 http://datasheets.maxim-ic.com/en/ds/MAX16067.pdf
15 * Maxim MAX16068
16 Prefix: 'max16068'
17 Addresses scanned: -
18 Datasheet:
19 http://datasheets.maxim-ic.com/en/ds/MAX16068.pdf
20 * Maxim MAX16070/MAX16071
21 Prefixes: 'max16070', 'max16071'
22 Addresses scanned: -
23 Datasheet:
24 http://datasheets.maxim-ic.com/en/ds/MAX16070-MAX16071.pdf
25
26
27Author: Guenter Roeck <guenter.roeck@ericsson.com>
28
29
30Description
31-----------
32
33[From datasheets] The MAX16065/MAX16066 flash-configurable system managers
34monitor and sequence multiple system voltages. The MAX16065/MAX16066 can also
35accurately monitor (+/-2.5%) one current channel using a dedicated high-side
36current-sense amplifier. The MAX16065 manages up to twelve system voltages
37simultaneously, and the MAX16066 manages up to eight supply voltages.
38
39The MAX16067 flash-configurable system manager monitors and sequences multiple
40system voltages. The MAX16067 manages up to six system voltages simultaneously.
41
42The MAX16068 flash-configurable system manager monitors and manages up to six
43system voltages simultaneously.
44
45The MAX16070/MAX16071 flash-configurable system monitors supervise multiple
46system voltages. The MAX16070/MAX16071 can also accurately monitor (+/-2.5%)
47one current channel using a dedicated high-side current-sense amplifier. The
48MAX16070 monitors up to twelve system voltages simultaneously, and the MAX16071
49monitors up to eight supply voltages.
50
51Each monitored channel has its own low and high critical limits. MAX16065,
52MAX16066, MAX16070, and MAX16071 support an additional limit which is
53configurable as either low or high secondary limit. MAX16065, MAX16066,
54MAX16070, and MAX16071 also support supply current monitoring.
55
56
57Usage Notes
58-----------
59
60This driver does not probe for devices, since there is no register which
61can be safely used to identify the chip. You will have to instantiate
62the devices explicitly. Please see Documentation/i2c/instantiating-devices for
63details.
64
65
66Sysfs entries
67-------------
68
69in[0-11]_input Input voltage measurements.
70
71in12_input Voltage on CSP (Current Sense Positive) pin.
72 Only if the chip supports current sensing and if
73 current sensing is enabled.
74
75in[0-11]_min Low warning limit.
76 Supported on MAX16065, MAX16066, MAX16070, and MAX16071
77 only.
78
79in[0-11]_max High warning limit.
80 Supported on MAX16065, MAX16066, MAX16070, and MAX16071
81 only.
82
83 Either low or high warning limits are supported
84 (depending on chip configuration), but not both.
85
86in[0-11]_lcrit Low critical limit.
87
88in[0-11]_crit High critical limit.
89
90in[0-11]_alarm Input voltage alarm.
91
92curr1_input Current sense input; only if the chip supports current
93 sensing and if current sensing is enabled.
94 Displayed current assumes 0.001 Ohm current sense
95 resistor.
96
97curr1_alarm Overcurrent alarm; only if the chip supports current
98 sensing and if current sensing is enabled.
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440
new file mode 100644
index 00000000000..6c525dd07d5
--- /dev/null
+++ b/Documentation/hwmon/max34440
@@ -0,0 +1,79 @@
1Kernel driver max34440
2======================
3
4Supported chips:
5 * Maxim MAX34440
6 Prefixes: 'max34440'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
9 * Maxim MAX34441
10 PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
11 Prefixes: 'max34441'
12 Addresses scanned: -
13 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
14
15Author: Guenter Roeck <guenter.roeck@ericsson.com>
16
17
18Description
19-----------
20
21This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
22Power-Supply Manager and MAX34441 PMBus 5-Channel Power-Supply Manager
23and Intelligent Fan Controller.
24
25The driver is a client driver to the core PMBus driver. Please see
26Documentation/hwmon/pmbus for details on PMBus client drivers.
27
28
29Usage Notes
30-----------
31
32This driver does not auto-detect devices. You will have to instantiate the
33devices explicitly. Please see Documentation/i2c/instantiating-devices for
34details.
35
36
37Platform data support
38---------------------
39
40The driver supports standard PMBus driver platform data.
41
42
43Sysfs entries
44-------------
45
46The following attributes are supported. Limits are read-write; all other
47attributes are read-only.
48
49in[1-6]_label "vout[1-6]".
50in[1-6]_input Measured voltage. From READ_VOUT register.
51in[1-6]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
52in[1-6]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
53in[1-6]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
54in[1-6]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
55in[1-6]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
56in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
57in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
58in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
59
60curr[1-6]_label "iout[1-6]".
61curr[1-6]_input Measured current. From READ_IOUT register.
62curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
63curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
64curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
65curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
66
67 in6 and curr6 attributes only exist for MAX34440.
68
69temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register.
70 temp1 is the chip's internal temperature. temp2..temp5
71 are remote I2C temperature sensors. For MAX34441, temp6
72 is a remote thermal-diode sensor. For MAX34440, temp6..8
73 are remote I2C temperature sensors.
74temp[1-8]_max Maximum temperature. From OT_WARN_LIMIT register.
75temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register.
76temp[1-8]_max_alarm Temperature high alarm.
77temp[1-8]_crit_alarm Temperature critical high alarm.
78
79 temp7 and temp8 attributes only exist for MAX34440.
diff --git a/Documentation/hwmon/max6639 b/Documentation/hwmon/max6639
new file mode 100644
index 00000000000..dc49f8be716
--- /dev/null
+++ b/Documentation/hwmon/max6639
@@ -0,0 +1,49 @@
1Kernel driver max6639
2=====================
3
4Supported chips:
5 * Maxim MAX6639
6 Prefix: 'max6639'
7 Addresses scanned: I2C 0x2c, 0x2e, 0x2f
8 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6639.pdf
9
10Authors:
11 He Changqing <hechangqing@semptian.com>
12 Roland Stigge <stigge@antcom.de>
13
14Description
15-----------
16
17This driver implements support for the Maxim MAX6639. This chip is a 2-channel
18temperature monitor with dual PWM fan speed controller. It can monitor its own
19temperature and one external diode-connected transistor or two external
20diode-connected transistors.
21
22The following device attributes are implemented via sysfs:
23
24Attribute R/W Contents
25----------------------------------------------------------------------------
26temp1_input R Temperature channel 1 input (0..150 C)
27temp2_input R Temperature channel 2 input (0..150 C)
28temp1_fault R Temperature channel 1 diode fault
29temp2_fault R Temperature channel 2 diode fault
30temp1_max RW Set THERM temperature for input 1
31 (in C, see datasheet)
32temp2_max RW Set THERM temperature for input 2
33temp1_crit RW Set ALERT temperature for input 1
34temp2_crit RW Set ALERT temperature for input 2
35temp1_emergency RW Set OT temperature for input 1
36 (in C, see datasheet)
37temp2_emergency RW Set OT temperature for input 2
38pwm1 RW Fan 1 target duty cycle (0..255)
39pwm2 RW Fan 2 target duty cycle (0..255)
40fan1_input R TACH1 fan tachometer input (in RPM)
41fan2_input R TACH2 fan tachometer input (in RPM)
42fan1_fault R Fan 1 fault
43fan2_fault R Fan 2 fault
44temp1_max_alarm R Alarm on THERM temperature on channel 1
45temp2_max_alarm R Alarm on THERM temperature on channel 2
46temp1_crit_alarm R Alarm on ALERT temperature on channel 1
47temp2_crit_alarm R Alarm on ALERT temperature on channel 2
48temp1_emergency_alarm R Alarm on OT temperature on channel 1
49temp2_emergency_alarm R Alarm on OT temperature on channel 2
diff --git a/Documentation/hwmon/max6642 b/Documentation/hwmon/max6642
new file mode 100644
index 00000000000..afbd3e4942e
--- /dev/null
+++ b/Documentation/hwmon/max6642
@@ -0,0 +1,21 @@
1Kernel driver max6642
2=====================
3
4Supported chips:
5 * Maxim MAX6642
6 Prefix: 'max6642'
7 Addresses scanned: I2C 0x48-0x4f
8 Datasheet: Publicly available at the Maxim website
9 http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf
10
11Authors:
12 Per Dalen <per.dalen@appeartv.com>
13
14Description
15-----------
16
17The MAX6642 is a digital temperature sensor. It senses its own temperature as
18well as the temperature on one external diode.
19
20All temperature values are given in degrees Celsius. Resolution
21is 0.25 degree for the local temperature and for the remote temperature.
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650
index c565650fcfc..58d9644a2bd 100644
--- a/Documentation/hwmon/max6650
+++ b/Documentation/hwmon/max6650
@@ -2,9 +2,13 @@ Kernel driver max6650
2===================== 2=====================
3 3
4Supported chips: 4Supported chips:
5 * Maxim 6650 / 6651 5 * Maxim MAX6650
6 Prefix: 'max6650' 6 Prefix: 'max6650'
7 Addresses scanned: I2C 0x1b, 0x1f, 0x48, 0x4b 7 Addresses scanned: none
8 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
9 * Maxim MAX6651
10 Prefix: 'max6651'
11 Addresses scanned: none
8 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf 12 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
9 13
10Authors: 14Authors:
@@ -15,10 +19,10 @@ Authors:
15Description 19Description
16----------- 20-----------
17 21
18This driver implements support for the Maxim 6650/6651 22This driver implements support for the Maxim MAX6650 and MAX6651.
19 23
20The 2 devices are very similar, but the Maxim 6550 has a reduced feature 24The 2 devices are very similar, but the MAX6550 has a reduced feature
21set, e.g. only one fan-input, instead of 4 for the 6651. 25set, e.g. only one fan-input, instead of 4 for the MAX6651.
22 26
23The driver is not able to distinguish between the 2 devices. 27The driver is not able to distinguish between the 2 devices.
24 28
@@ -36,6 +40,13 @@ fan1_div rw sets the speed range the inputs can handle. Legal
36 values are 1, 2, 4, and 8. Use lower values for 40 values are 1, 2, 4, and 8. Use lower values for
37 faster fans. 41 faster fans.
38 42
43Usage notes
44-----------
45
46This driver does not auto-detect devices. You will have to instantiate the
47devices explicitly. Please see Documentation/i2c/instantiating-devices for
48details.
49
39Module parameters 50Module parameters
40----------------- 51-----------------
41 52
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688
new file mode 100644
index 00000000000..0ddd3a41203
--- /dev/null
+++ b/Documentation/hwmon/max8688
@@ -0,0 +1,69 @@
1Kernel driver max8688
2=====================
3
4Supported chips:
5 * Maxim MAX8688
6 Prefix: 'max8688'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
9
10Author: Guenter Roeck <guenter.roeck@ericsson.com>
11
12
13Description
14-----------
15
16This driver supports hardware montoring for Maxim MAX8688 Digital Power-Supply
17Controller/Monitor with PMBus Interface.
18
19The driver is a client driver to the core PMBus driver. Please see
20Documentation/hwmon/pmbus for details on PMBus client drivers.
21
22
23Usage Notes
24-----------
25
26This driver does not auto-detect devices. You will have to instantiate the
27devices explicitly. Please see Documentation/i2c/instantiating-devices for
28details.
29
30
31Platform data support
32---------------------
33
34The driver supports standard PMBus driver platform data.
35
36
37Sysfs entries
38-------------
39
40The following attributes are supported. Limits are read-write; all other
41attributes are read-only.
42
43in1_label "vout1"
44in1_input Measured voltage. From READ_VOUT register.
45in1_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
46in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in1_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
48in1_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
51in1_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
52in1_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
53
54curr1_label "iout1"
55curr1_input Measured current. From READ_IOUT register.
56curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register.
57curr1_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
58curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT register.
59curr1_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
60
61temp1_input Measured temperature. From READ_TEMPERATURE_1 register.
62temp1_max Maximum temperature. From OT_WARN_LIMIT register.
63temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
64temp1_max_alarm Chip temperature high alarm. Set by comparing
65 READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
66 status is set.
67temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
68 READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
69 status is set.
diff --git a/Documentation/hwmon/pkgtemp b/Documentation/hwmon/pkgtemp
deleted file mode 100644
index c8e1fb0fadd..00000000000
--- a/Documentation/hwmon/pkgtemp
+++ /dev/null
@@ -1,36 +0,0 @@
1Kernel driver pkgtemp
2======================
3
4Supported chips:
5 * Intel family
6 Prefix: 'pkgtemp'
7 CPUID:
8 Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
9 Volume 3A: System Programming Guide
10
11Author: Fenghua Yu
12
13Description
14-----------
15
16This driver permits reading package level temperature sensor embedded inside
17Intel CPU package. The sensors can be in core, uncore, memory controller, or
18other components in a package. The feature is first implemented in Intel Sandy
19Bridge platform.
20
21Temperature is measured in degrees Celsius and measurement resolution is
221 degree C. Valid temperatures are from 0 to TjMax degrees C, because the actual
23value of temperature register is in fact a delta from TjMax.
24
25Temperature known as TjMax is the maximum junction temperature of package.
26We get this from MSR_IA32_TEMPERATURE_TARGET. If the MSR is not accessible,
27we define TjMax as 100 degrees Celsius. At this temperature, protection
28mechanism will perform actions to forcibly cool down the package. Alarm
29may be raised, if the temperature grows enough (more than TjMax) to trigger
30the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
31
32temp1_input - Package temperature (in millidegrees Celsius).
33temp1_max - All cooling devices should be turned on.
34temp1_crit - Maximum junction temperature (in millidegrees Celsius).
35temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
36 Correct CPU operation is no longer guaranteed.
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
new file mode 100644
index 00000000000..5e462fc7f99
--- /dev/null
+++ b/Documentation/hwmon/pmbus
@@ -0,0 +1,197 @@
1Kernel driver pmbus
2====================
3
4Supported chips:
5 * Ericsson BMR45X series
6 DC/DC Converter
7 Prefixes: 'bmr450', 'bmr451', 'bmr453', 'bmr454'
8 Addresses scanned: -
9 Datasheet:
10 http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146395
11 * Linear Technology LTC2978
12 Octal PMBus Power Supply Monitor and Controller
13 Prefix: 'ltc2978'
14 Addresses scanned: -
15 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
16 * Generic PMBus devices
17 Prefix: 'pmbus'
18 Addresses scanned: -
19 Datasheet: n.a.
20
21Author: Guenter Roeck <guenter.roeck@ericsson.com>
22
23
24Description
25-----------
26
27This driver supports hardware montoring for various PMBus compliant devices.
28It supports voltage, current, power, and temperature sensors as supported
29by the device.
30
31Each monitored channel has its own high and low limits, plus a critical
32limit.
33
34Fan support will be added in a later version of this driver.
35
36
37Usage Notes
38-----------
39
40This driver does not probe for PMBus devices, since there is no register
41which can be safely used to identify the chip (The MFG_ID register is not
42supported by all chips), and since there is no well defined address range for
43PMBus devices. You will have to instantiate the devices explicitly.
44
45Example: the following will load the driver for an LTC2978 at address 0x60
46on I2C bus #1:
47$ modprobe pmbus
48$ echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device
49
50
51Platform data support
52---------------------
53
54Support for additional PMBus chips can be added by defining chip parameters in
55a new chip specific driver file. For example, (untested) code to add support for
56Emerson DS1200 power modules might look as follows.
57
58static struct pmbus_driver_info ds1200_info = {
59 .pages = 1,
60 /* Note: All other sensors are in linear mode */
61 .direct[PSC_VOLTAGE_OUT] = true,
62 .direct[PSC_TEMPERATURE] = true,
63 .direct[PSC_CURRENT_OUT] = true,
64 .m[PSC_VOLTAGE_IN] = 1,
65 .b[PSC_VOLTAGE_IN] = 0,
66 .R[PSC_VOLTAGE_IN] = 3,
67 .m[PSC_VOLTAGE_OUT] = 1,
68 .b[PSC_VOLTAGE_OUT] = 0,
69 .R[PSC_VOLTAGE_OUT] = 3,
70 .m[PSC_TEMPERATURE] = 1,
71 .b[PSC_TEMPERATURE] = 0,
72 .R[PSC_TEMPERATURE] = 3,
73 .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_STATUS_INPUT
74 | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
75 | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
76 | PMBUS_HAVE_PIN | PMBUS_HAVE_POUT
77 | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP
78 | PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_FAN12,
79};
80
81static int ds1200_probe(struct i2c_client *client,
82 const struct i2c_device_id *id)
83{
84 return pmbus_do_probe(client, id, &ds1200_info);
85}
86
87static int ds1200_remove(struct i2c_client *client)
88{
89 return pmbus_do_remove(client);
90}
91
92static const struct i2c_device_id ds1200_id[] = {
93 {"ds1200", 0},
94 {}
95};
96
97MODULE_DEVICE_TABLE(i2c, ds1200_id);
98
99/* This is the driver that will be inserted */
100static struct i2c_driver ds1200_driver = {
101 .driver = {
102 .name = "ds1200",
103 },
104 .probe = ds1200_probe,
105 .remove = ds1200_remove,
106 .id_table = ds1200_id,
107};
108
109static int __init ds1200_init(void)
110{
111 return i2c_add_driver(&ds1200_driver);
112}
113
114static void __exit ds1200_exit(void)
115{
116 i2c_del_driver(&ds1200_driver);
117}
118
119
120Sysfs entries
121-------------
122
123When probing the chip, the driver identifies which PMBus registers are
124supported, and determines available sensors from this information.
125Attribute files only exist if respective sensors are suported by the chip.
126Labels are provided to inform the user about the sensor associated with
127a given sysfs entry.
128
129The following attributes are supported. Limits are read-write; all other
130attributes are read-only.
131
132inX_input Measured voltage. From READ_VIN or READ_VOUT register.
133inX_min Minimum Voltage.
134 From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register.
135inX_max Maximum voltage.
136 From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register.
137inX_lcrit Critical minimum Voltage.
138 From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register.
139inX_crit Critical maximum voltage.
140 From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register.
141inX_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
142inX_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
143inX_lcrit_alarm Voltage critical low alarm.
144 From VOLTAGE_UV_FAULT status.
145inX_crit_alarm Voltage critical high alarm.
146 From VOLTAGE_OV_FAULT status.
147inX_label "vin", "vcap", or "voutY"
148
149currX_input Measured current. From READ_IIN or READ_IOUT register.
150currX_max Maximum current.
151 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register.
152currX_lcrit Critical minimum output current.
153 From IOUT_UC_FAULT_LIMIT register.
154currX_crit Critical maximum current.
155 From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register.
156currX_alarm Current high alarm.
157 From IIN_OC_WARNING or IOUT_OC_WARNING status.
158currX_max_alarm Current high alarm.
159 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT status.
160currX_lcrit_alarm Output current critical low alarm.
161 From IOUT_UC_FAULT status.
162currX_crit_alarm Current critical high alarm.
163 From IIN_OC_FAULT or IOUT_OC_FAULT status.
164currX_label "iin" or "ioutY"
165
166powerX_input Measured power. From READ_PIN or READ_POUT register.
167powerX_cap Output power cap. From POUT_MAX register.
168powerX_max Power limit. From PIN_OP_WARN_LIMIT or
169 POUT_OP_WARN_LIMIT register.
170powerX_crit Critical output power limit.
171 From POUT_OP_FAULT_LIMIT register.
172powerX_alarm Power high alarm.
173 From PIN_OP_WARNING or POUT_OP_WARNING status.
174powerX_crit_alarm Output power critical high alarm.
175 From POUT_OP_FAULT status.
176powerX_label "pin" or "poutY"
177
178tempX_input Measured temperature.
179 From READ_TEMPERATURE_X register.
180tempX_min Mimimum temperature. From UT_WARN_LIMIT register.
181tempX_max Maximum temperature. From OT_WARN_LIMIT register.
182tempX_lcrit Critical low temperature.
183 From UT_FAULT_LIMIT register.
184tempX_crit Critical high temperature.
185 From OT_FAULT_LIMIT register.
186tempX_min_alarm Chip temperature low alarm. Set by comparing
187 READ_TEMPERATURE_X with UT_WARN_LIMIT if
188 TEMP_UT_WARNING status is set.
189tempX_max_alarm Chip temperature high alarm. Set by comparing
190 READ_TEMPERATURE_X with OT_WARN_LIMIT if
191 TEMP_OT_WARNING status is set.
192tempX_lcrit_alarm Chip temperature critical low alarm. Set by comparing
193 READ_TEMPERATURE_X with UT_FAULT_LIMIT if
194 TEMP_UT_FAULT status is set.
195tempX_crit_alarm Chip temperature critical high alarm. Set by comparing
196 READ_TEMPERATURE_X with OT_FAULT_LIMIT if
197 TEMP_OT_FAULT status is set.
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627
new file mode 100644
index 00000000000..446a054e491
--- /dev/null
+++ b/Documentation/hwmon/sch5627
@@ -0,0 +1,22 @@
1Kernel driver sch5627
2=====================
3
4Supported chips:
5 * SMSC SCH5627
6 Prefix: 'sch5627'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Application Note available upon request
9
10Author: Hans de Goede <hdegoede@redhat.com>
11
12
13Description
14-----------
15
16SMSC SCH5627 Super I/O chips include complete hardware monitoring
17capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures.
18
19The hardware monitoring part of the SMSC SCH5627 is accessed by talking
20through an embedded microcontroller. An application note describing the
21protocol for communicating with the microcontroller is available upon
22request. Please mail me if you want a copy.
diff --git a/Documentation/hwmon/sht15 b/Documentation/hwmon/sht15
new file mode 100644
index 00000000000..02850bdfac1
--- /dev/null
+++ b/Documentation/hwmon/sht15
@@ -0,0 +1,74 @@
1Kernel driver sht15
2===================
3
4Authors:
5 * Wouter Horre
6 * Jonathan Cameron
7 * Vivien Didelot <vivien.didelot@savoirfairelinux.com>
8 * Jerome Oufella <jerome.oufella@savoirfairelinux.com>
9
10Supported chips:
11 * Sensirion SHT10
12 Prefix: 'sht10'
13
14 * Sensirion SHT11
15 Prefix: 'sht11'
16
17 * Sensirion SHT15
18 Prefix: 'sht15'
19
20 * Sensirion SHT71
21 Prefix: 'sht71'
22
23 * Sensirion SHT75
24 Prefix: 'sht75'
25
26Datasheet: Publicly available at the Sensirion website
27http://www.sensirion.ch/en/pdf/product_information/Datasheet-humidity-sensor-SHT1x.pdf
28
29Description
30-----------
31
32The SHT10, SHT11, SHT15, SHT71, and SHT75 are humidity and temperature
33sensors.
34
35The devices communicate using two GPIO lines.
36
37Supported resolutions for the measurements are 14 bits for temperature and 12
38bits for humidity, or 12 bits for temperature and 8 bits for humidity.
39
40The humidity calibration coefficients are programmed into an OTP memory on the
41chip. These coefficients are used to internally calibrate the signals from the
42sensors. Disabling the reload of those coefficients allows saving 10ms for each
43measurement and decrease power consumption, while loosing on precision.
44
45Some options may be set directly in the sht15_platform_data structure
46or via sysfs attributes.
47
48Notes:
49 * The regulator supply name is set to "vcc".
50 * If a CRC validation fails, a soft reset command is sent, which resets
51 status register to its hardware default value, but the driver will try to
52 restore the previous device configuration.
53
54Platform data
55-------------
56
57* checksum:
58 set it to true to enable CRC validation of the readings (default to false).
59* no_otp_reload:
60 flag to indicate not to reload from OTP (default to false).
61* low_resolution:
62 flag to indicate the temp/humidity resolution to use (default to false).
63
64Sysfs interface
65---------------
66
67* temp1_input: temperature input
68* humidity1_input: humidity input
69* heater_enable: write 1 in this attribute to enable the on-chip heater,
70 0 to disable it. Be careful not to enable the heater
71 for too long.
72* temp1_fault: if 1, this means that the voltage is low (below 2.47V) and
73 measurement may be invalid.
74* humidity1_fault: same as temp1_fault.
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665
index 3820fc9ca52..59e31614054 100644
--- a/Documentation/hwmon/smm665
+++ b/Documentation/hwmon/smm665
@@ -150,8 +150,8 @@ in8_crit_alarm Channel F critical alarm
150in9_crit_alarm AIN1 critical alarm 150in9_crit_alarm AIN1 critical alarm
151in10_crit_alarm AIN2 critical alarm 151in10_crit_alarm AIN2 critical alarm
152 152
153temp1_input Chip tempererature 153temp1_input Chip temperature
154temp1_min Mimimum chip tempererature 154temp1_min Mimimum chip temperature
155temp1_max Maximum chip tempererature 155temp1_max Maximum chip temperature
156temp1_crit Critical chip tempererature 156temp1_crit Critical chip temperature
157temp1_crit_alarm Temperature critical alarm 157temp1_crit_alarm Temperature critical alarm
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
new file mode 100644
index 00000000000..86f42e8e9e4
--- /dev/null
+++ b/Documentation/hwmon/submitting-patches
@@ -0,0 +1,109 @@
1 How to Get Your Patch Accepted Into the Hwmon Subsystem
2 -------------------------------------------------------
3
4This text is is a collection of suggestions for people writing patches or
5drivers for the hwmon subsystem. Following these suggestions will greatly
6increase the chances of your change being accepted.
7
8
91. General
10----------
11
12* It should be unnecessary to mention, but please read and follow
13 Documentation/SubmitChecklist
14 Documentation/SubmittingDrivers
15 Documentation/SubmittingPatches
16 Documentation/CodingStyle
17
18* If your patch generates checkpatch warnings, please refrain from explanations
19 such as "I don't like that coding style". Keep in mind that each unnecessary
20 warning helps hiding a real problem. If you don't like the kernel coding
21 style, don't write kernel drivers.
22
23* Please test your patch thoroughly. We are not your test group.
24 Sometimes a patch can not or not completely be tested because of missing
25 hardware. In such cases, you should test-build the code on at least one
26 architecture. If run-time testing was not achieved, it should be written
27 explicitly below the patch header.
28
29* If your patch (or the driver) is affected by configuration options such as
30 CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration
31 variants.
32
33
342. Adding functionality to existing drivers
35-------------------------------------------
36
37* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
38 date.
39
40* Make sure the information in Kconfig is up to date.
41
42* If the added functionality requires some cleanup or structural changes, split
43 your patch into a cleanup part and the actual addition. This makes it easier
44 to review your changes, and to bisect any resulting problems.
45
46* Never mix bug fixes, cleanup, and functional enhancements in a single patch.
47
48
493. New drivers
50--------------
51
52* Running your patch or driver file(s) through checkpatch does not mean its
53 formatting is clean. If unsure about formatting in your new driver, run it
54 through Lindent. Lindent is not perfect, and you may have to do some minor
55 cleanup, but it is a good start.
56
57* Consider adding yourself to MAINTAINERS.
58
59* Document the driver in Documentation/hwmon/<driver_name>.
60
61* Add the driver to Kconfig and Makefile in alphabetical order.
62
63* Make sure that all dependencies are listed in Kconfig. For new drivers, it
64 is most likely prudent to add a dependency on EXPERIMENTAL.
65
66* Avoid forward declarations if you can. Rearrange the code if necessary.
67
68* Avoid calculations in macros and macro-generated functions. While such macros
69 may save a line or so in the source, it obfuscates the code and makes code
70 review more difficult. It may also result in code which is more complicated
71 than necessary. Use inline functions or just regular functions instead.
72
73* If the driver has a detect function, make sure it is silent. Debug messages
74 and messages printed after a successful detection are acceptable, but it
75 must not print messages such as "Chip XXX not found/supported".
76
77 Keep in mind that the detect function will run for all drivers supporting an
78 address if a chip is detected on that address. Unnecessary messages will just
79 pollute the kernel log and not provide any value.
80
81* Provide a detect function if and only if a chip can be detected reliably.
82
83* Avoid writing to chip registers in the detect function. If you have to write,
84 only do it after you have already gathered enough data to be certain that the
85 detection is going to be successful.
86
87 Keep in mind that the chip might not be what your driver believes it is, and
88 writing to it might cause a bad misconfiguration.
89
90* Make sure there are no race conditions in the probe function. Specifically,
91 completely initialize your chip first, then create sysfs entries and register
92 with the hwmon subsystem.
93
94* Do not provide support for deprecated sysfs attributes.
95
96* Do not create non-standard attributes unless really needed. If you have to use
97 non-standard attributes, or you believe you do, discuss it on the mailing list
98 first. Either case, provide a detailed explanation why you need the
99 non-standard attribute(s).
100 Standard attributes are specified in Documentation/hwmon/sysfs-interface.
101
102* When deciding which sysfs attributes to support, look at the chip's
103 capabilities. While we do not expect your driver to support everything the
104 chip may offer, it should at least support all limits and alarms.
105
106* Last but not least, please check if a driver for your chip already exists
107 before starting to write a new driver. Especially for temperature sensors,
108 new chips are often variants of previously released chips. In some cases,
109 a presumably new chip may simply have been relabeled.
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index c6559f15358..8f63c244f1a 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -187,6 +187,17 @@ fan[1-*]_div Fan divisor.
187 Note that this is actually an internal clock divisor, which 187 Note that this is actually an internal clock divisor, which
188 affects the measurable speed range, not the read value. 188 affects the measurable speed range, not the read value.
189 189
190fan[1-*]_pulses Number of tachometer pulses per fan revolution.
191 Integer value, typically between 1 and 4.
192 RW
193 This value is a characteristic of the fan connected to the
194 device's input, so it has to be set in accordance with the fan
195 model.
196 Should only be created if the chip has a register to configure
197 the number of pulses. In the absence of such a register (and
198 thus attribute) the value assumed by all devices is 2 pulses
199 per fan revolution.
200
190fan[1-*]_target 201fan[1-*]_target
191 Desired fan speed 202 Desired fan speed
192 Unit: revolution/min (RPM) 203 Unit: revolution/min (RPM)
@@ -568,7 +579,7 @@ channel should not be trusted.
568fan[1-*]_fault 579fan[1-*]_fault
569temp[1-*]_fault 580temp[1-*]_fault
570 Input fault condition 581 Input fault condition
571 0: no fault occured 582 0: no fault occurred
572 1: fault condition 583 1: fault condition
573 RO 584 RO
574 585
diff --git a/Documentation/hwmon/twl4030-madc-hwmon b/Documentation/hwmon/twl4030-madc-hwmon
new file mode 100644
index 00000000000..ef7984317ce
--- /dev/null
+++ b/Documentation/hwmon/twl4030-madc-hwmon
@@ -0,0 +1,45 @@
1Kernel driver twl4030-madc
2=========================
3
4Supported chips:
5 * Texas Instruments TWL4030
6 Prefix: 'twl4030-madc'
7
8
9Authors:
10 J Keerthy <j-keerthy@ti.com>
11
12Description
13-----------
14
15The Texas Instruments TWL4030 is a Power Management and Audio Circuit. Among
16other things it contains a 10-bit A/D converter MADC. The converter has 16
17channels which can be used in different modes.
18
19
20See this table for the meaning of the different channels
21
22Channel Signal
23------------------------------------------
240 Battery type(BTYPE)
251 BCI: Battery temperature (BTEMP)
262 GP analog input
273 GP analog input
284 GP analog input
295 GP analog input
306 GP analog input
317 GP analog input
328 BCI: VBUS voltage(VBUS)
339 Backup Battery voltage (VBKP)
3410 BCI: Battery charger current (ICHG)
3511 BCI: Battery charger voltage (VCHG)
3612 BCI: Main battery voltage (VBAT)
3713 Reserved
3814 Reserved
3915 VRUSB Supply/Speaker left/Speaker right polarization level
40
41
42The Sysfs nodes will represent the voltage in the units of mV,
43the temperature channel shows the converted temperature in
44degree celcius. The Battery charging current channel represents
45battery charging current in mA.
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000
new file mode 100644
index 00000000000..40ca6db50c4
--- /dev/null
+++ b/Documentation/hwmon/ucd9000
@@ -0,0 +1,110 @@
1Kernel driver ucd9000
2=====================
3
4Supported chips:
5 * TI UCD90120, UCD90124, UCD9090, and UCD90910
6 Prefixes: 'ucd90120', 'ucd90124', 'ucd9090', 'ucd90910'
7 Addresses scanned: -
8 Datasheets:
9 http://focus.ti.com/lit/ds/symlink/ucd90120.pdf
10 http://focus.ti.com/lit/ds/symlink/ucd90124.pdf
11 http://focus.ti.com/lit/ds/symlink/ucd9090.pdf
12 http://focus.ti.com/lit/ds/symlink/ucd90910.pdf
13
14Author: Guenter Roeck <guenter.roeck@ericsson.com>
15
16
17Description
18-----------
19
20From datasheets:
21
22The UCD90120 Power Supply Sequencer and System Health Monitor monitors and
23sequences up to 12 independent voltage rails. The device integrates a 12-bit
24ADC with a 2.5V internal reference for monitoring up to 13 power supply voltage,
25current, or temperature inputs.
26
27The UCD90124 is a 12-rail PMBus/I2C addressable power-supply sequencer and
28system-health monitor. The device integrates a 12-bit ADC for monitoring up to
2913 power-supply voltage, current, or temperature inputs. Twenty-six GPIO pins
30can be used for power supply enables, power-on reset signals, external
31interrupts, cascading, or other system functions. Twelve of these pins offer PWM
32functionality. Using these pins, the UCD90124 offers support for fan control,
33margining, and general-purpose PWM functions.
34
35The UCD9090 is a 10-rail PMBus/I2C addressable power-supply sequencer and
36monitor. The device integrates a 12-bit ADC for monitoring up to 10 power-supply
37voltage inputs. Twenty-three GPIO pins can be used for power supply enables,
38power-on reset signals, external interrupts, cascading, or other system
39functions. Ten of these pins offer PWM functionality. Using these pins, the
40UCD9090 offers support for margining, and general-purpose PWM functions.
41
42The UCD90910 is a ten-rail I2C / PMBus addressable power-supply sequencer and
43system-health monitor. The device integrates a 12-bit ADC for monitoring up to
4413 power-supply voltage, current, or temperature inputs.
45
46This driver is a client driver to the core PMBus driver. Please see
47Documentation/hwmon/pmbus for details on PMBus client drivers.
48
49
50Usage Notes
51-----------
52
53This driver does not auto-detect devices. You will have to instantiate the
54devices explicitly. Please see Documentation/i2c/instantiating-devices for
55details.
56
57
58Platform data support
59---------------------
60
61The driver supports standard PMBus driver platform data. Please see
62Documentation/hwmon/pmbus for details.
63
64
65Sysfs entries
66-------------
67
68The following attributes are supported. Limits are read-write; all other
69attributes are read-only.
70
71in[1-12]_label "vout[1-12]".
72in[1-12]_input Measured voltage. From READ_VOUT register.
73in[1-12]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
74in[1-12]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
75in[1-12]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
76in[1-12]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
77in[1-12]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
78in[1-12]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
79in[1-12]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
80in[1-12]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
81
82curr[1-12]_label "iout[1-12]".
83curr[1-12]_input Measured current. From READ_IOUT register.
84curr[1-12]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
85curr[1-12]_lcrit Critical minumum output current. From IOUT_UC_FAULT_LIMIT
86 register.
87curr[1-12]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
88curr[1-12]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
89curr[1-12]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
90
91 For each attribute index, either voltage or current is
92 reported, but not both. If voltage or current is
93 reported depends on the chip configuration.
94
95temp[1-2]_input Measured temperatures. From READ_TEMPERATURE_1 and
96 READ_TEMPERATURE_2 registers.
97temp[1-2]_max Maximum temperature. From OT_WARN_LIMIT register.
98temp[1-2]_crit Critical high temperature. From OT_FAULT_LIMIT register.
99temp[1-2]_max_alarm Temperature high alarm.
100temp[1-2]_crit_alarm Temperature critical high alarm.
101
102fan[1-4]_input Fan RPM.
103fan[1-4]_alarm Fan alarm.
104fan[1-4]_fault Fan fault.
105
106 Fan attributes are only available on chips supporting
107 fan control (UCD90124, UCD90910). Attribute files are
108 created only for enabled fans.
109 Note that even though UCD90910 supports up to 10 fans,
110 only up to four fans are currently supported.
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200
new file mode 100644
index 00000000000..3c58607f72f
--- /dev/null
+++ b/Documentation/hwmon/ucd9200
@@ -0,0 +1,112 @@
1Kernel driver ucd9200
2=====================
3
4Supported chips:
5 * TI UCD9220, UCD9222, UCD9224, UCD9240, UCD9244, UCD9246, and UCD9248
6 Prefixes: 'ucd9220', 'ucd9222', 'ucd9224', 'ucd9240', 'ucd9244', 'ucd9246',
7 'ucd9248'
8 Addresses scanned: -
9 Datasheets:
10 http://focus.ti.com/lit/ds/symlink/ucd9220.pdf
11 http://focus.ti.com/lit/ds/symlink/ucd9222.pdf
12 http://focus.ti.com/lit/ds/symlink/ucd9224.pdf
13 http://focus.ti.com/lit/ds/symlink/ucd9240.pdf
14 http://focus.ti.com/lit/ds/symlink/ucd9244.pdf
15 http://focus.ti.com/lit/ds/symlink/ucd9246.pdf
16 http://focus.ti.com/lit/ds/symlink/ucd9248.pdf
17
18Author: Guenter Roeck <guenter.roeck@ericsson.com>
19
20
21Description
22-----------
23
24[From datasheets] UCD9220, UCD9222, UCD9224, UCD9240, UCD9244, UCD9246, and
25UCD9248 are multi-rail, multi-phase synchronous buck digital PWM controllers
26designed for non-isolated DC/DC power applications. The devices integrate
27dedicated circuitry for DC/DC loop management with flash memory and a serial
28interface to support configuration, monitoring and management.
29
30This driver is a client driver to the core PMBus driver. Please see
31Documentation/hwmon/pmbus for details on PMBus client drivers.
32
33
34Usage Notes
35-----------
36
37This driver does not auto-detect devices. You will have to instantiate the
38devices explicitly. Please see Documentation/i2c/instantiating-devices for
39details.
40
41
42Platform data support
43---------------------
44
45The driver supports standard PMBus driver platform data. Please see
46Documentation/hwmon/pmbus for details.
47
48
49Sysfs entries
50-------------
51
52The following attributes are supported. Limits are read-write; all other
53attributes are read-only.
54
55in1_label "vin".
56in1_input Measured voltage. From READ_VIN register.
57in1_min Minumum Voltage. From VIN_UV_WARN_LIMIT register.
58in1_max Maximum voltage. From VIN_OV_WARN_LIMIT register.
59in1_lcrit Critical minumum Voltage. VIN_UV_FAULT_LIMIT register.
60in1_crit Critical maximum voltage. From VIN_OV_FAULT_LIMIT register.
61in1_min_alarm Voltage low alarm. From VIN_UV_WARNING status.
62in1_max_alarm Voltage high alarm. From VIN_OV_WARNING status.
63in1_lcrit_alarm Voltage critical low alarm. From VIN_UV_FAULT status.
64in1_crit_alarm Voltage critical high alarm. From VIN_OV_FAULT status.
65
66in[2-5]_label "vout[1-4]".
67in[2-5]_input Measured voltage. From READ_VOUT register.
68in[2-5]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
69in[2-5]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
70in[2-5]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
71in[2-5]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
72in[2-5]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
73in[2-5]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
74in[2-5]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
75in[2-5]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
76
77curr1_label "iin".
78curr1_input Measured current. From READ_IIN register.
79
80curr[2-5]_label "iout[1-4]".
81curr[2-5]_input Measured current. From READ_IOUT register.
82curr[2-5]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
83curr[2-5]_lcrit Critical minumum output current. From IOUT_UC_FAULT_LIMIT
84 register.
85curr[2-5]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
86curr[2-5]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
87curr[2-5]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
88
89power1_input Measured input power. From READ_PIN register.
90power1_label "pin"
91
92power[2-5]_input Measured output power. From READ_POUT register.
93power[2-5]_label "pout[1-4]"
94
95 The number of output voltage, current, and power
96 attribute sets is determined by the number of enabled
97 rails. See chip datasheets for details.
98
99temp[1-5]_input Measured temperatures. From READ_TEMPERATURE_1 and
100 READ_TEMPERATURE_2 registers.
101 temp1 is the chip internal temperature. temp[2-5] are
102 rail temperatures. temp[2-5] attributes are only
103 created for enabled rails. See chip datasheets for
104 details.
105temp[1-5]_max Maximum temperature. From OT_WARN_LIMIT register.
106temp[1-5]_crit Critical high temperature. From OT_FAULT_LIMIT register.
107temp[1-5]_max_alarm Temperature high alarm.
108temp[1-5]_crit_alarm Temperature critical high alarm.
109
110fan1_input Fan RPM. ucd9240 only.
111fan1_alarm Fan alarm. ucd9240 only.
112fan1_fault Fan fault. ucd9240 only.
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index 13d556112fc..76ffef94ed7 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -5,13 +5,11 @@ Supported chips:
5 * Winbond W83627EHF/EHG (ISA access ONLY) 5 * Winbond W83627EHF/EHG (ISA access ONLY)
6 Prefix: 'w83627ehf' 6 Prefix: 'w83627ehf'
7 Addresses scanned: ISA address retrieved from Super I/O registers 7 Addresses scanned: ISA address retrieved from Super I/O registers
8 Datasheet: 8 Datasheet: not available
9 http://www.nuvoton.com.tw/NR/rdonlyres/A6A258F0-F0C9-4F97-81C0-C4D29E7E943E/0/W83627EHF.pdf
10 * Winbond W83627DHG 9 * Winbond W83627DHG
11 Prefix: 'w83627dhg' 10 Prefix: 'w83627dhg'
12 Addresses scanned: ISA address retrieved from Super I/O registers 11 Addresses scanned: ISA address retrieved from Super I/O registers
13 Datasheet: 12 Datasheet: not available
14 http://www.nuvoton.com.tw/NR/rdonlyres/7885623D-A487-4CF9-A47F-30C5F73D6FE6/0/W83627DHG.pdf
15 * Winbond W83627DHG-P 13 * Winbond W83627DHG-P
16 Prefix: 'w83627dhg' 14 Prefix: 'w83627dhg'
17 Addresses scanned: ISA address retrieved from Super I/O registers 15 Addresses scanned: ISA address retrieved from Super I/O registers
@@ -24,6 +22,14 @@ Supported chips:
24 Prefix: 'w83667hg' 22 Prefix: 'w83667hg'
25 Addresses scanned: ISA address retrieved from Super I/O registers 23 Addresses scanned: ISA address retrieved from Super I/O registers
26 Datasheet: Available from Nuvoton upon request 24 Datasheet: Available from Nuvoton upon request
25 * Nuvoton NCT6775F/W83667HG-I
26 Prefix: 'nct6775'
27 Addresses scanned: ISA address retrieved from Super I/O registers
28 Datasheet: Available from Nuvoton upon request
29 * Nuvoton NCT6776F
30 Prefix: 'nct6776'
31 Addresses scanned: ISA address retrieved from Super I/O registers
32 Datasheet: Available from Nuvoton upon request
27 33
28Authors: 34Authors:
29 Jean Delvare <khali@linux-fr.org> 35 Jean Delvare <khali@linux-fr.org>
@@ -36,19 +42,28 @@ Description
36----------- 42-----------
37 43
38This driver implements support for the Winbond W83627EHF, W83627EHG, 44This driver implements support for the Winbond W83627EHF, W83627EHG,
39W83627DHG, W83627DHG-P, W83667HG and W83667HG-B super I/O chips. 45W83627DHG, W83627DHG-P, W83667HG, W83667HG-B, W83667HG-I (NCT6775F),
40We will refer to them collectively as Winbond chips. 46and NCT6776F super I/O chips. We will refer to them collectively as
41 47Winbond chips.
42The chips implement three temperature sensors, five fan rotation 48
43speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 49The chips implement three temperature sensors (up to four for 667HG-B, and nine
44VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG and 667HG), alarms 50for NCT6775F and NCT6776F), five fan rotation speed sensors, ten analog voltage
45with beep warnings (control unimplemented), and some automatic fan 51sensors (only nine for the 627DHG), one VID (6 pins for the 627EHF/EHG, 8 pins
46regulation strategies (plus manual fan control mode). 52for the 627DHG and 667HG), alarms with beep warnings (control unimplemented),
53and some automatic fan regulation strategies (plus manual fan control mode).
54
55The temperature sensor sources on W82677HG-B, NCT6775F, and NCT6776F are
56configurable. temp4 and higher attributes are only reported if its temperature
57source differs from the temperature sources of the already reported temperature
58sensors. The configured source for each of the temperature sensors is provided
59in tempX_label.
47 60
48Temperatures are measured in degrees Celsius and measurement resolution is 1 61Temperatures are measured in degrees Celsius and measurement resolution is 1
49degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when 62degC for temp1 and and 0.5 degC for temp2 and temp3. For temp4 and higher,
50the temperature gets higher than high limit; it stays on until the temperature 63resolution is 1 degC for W83667HG-B and 0.0 degC for NCT6775F and NCT6776F.
51falls below the hysteresis value. 64An alarm is triggered when the temperature gets higher than high limit;
65it stays on until the temperature falls below the hysteresis value.
66Alarms are only supported for temp1, temp2, and temp3.
52 67
53Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 68Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
54triggered if the rotation speed has dropped below a programmable limit. Fan 69triggered if the rotation speed has dropped below a programmable limit. Fan
@@ -80,7 +95,8 @@ prog -> pwm4 (not on 667HG and 667HG-B; the programmable setting is not
80 95
81name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG, 96name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG,
82 it is set to "w83627ehf", for the W83627DHG it is set to "w83627dhg", 97 it is set to "w83627ehf", for the W83627DHG it is set to "w83627dhg",
83 and for the W83667HG it is set to "w83667hg". 98 for the W83667HG and W83667HG-B it is set to "w83667hg", for NCT6775F it
99 is set to "nct6775", and for NCT6776F it is set to "nct6776".
84 100
85pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: 101pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
86 0 (stop) to 255 (full) 102 0 (stop) to 255 (full)
@@ -90,6 +106,18 @@ pwm[1-4]_enable - this file controls mode of fan/temperature control:
90 * 2 "Thermal Cruise" mode 106 * 2 "Thermal Cruise" mode
91 * 3 "Fan Speed Cruise" mode 107 * 3 "Fan Speed Cruise" mode
92 * 4 "Smart Fan III" mode 108 * 4 "Smart Fan III" mode
109 * 5 "Smart Fan IV" mode
110
111 SmartFan III mode is not supported on NCT6776F.
112
113 SmartFan IV mode is configurable only if it was configured at system
114 startup, and is only supported for W83677HG-B, NCT6775F, and NCT6776F.
115 SmartFan IV operational parameters can not be configured at this time,
116 and the various pwm attributes are not used in SmartFan IV mode.
117 The attributes can be written to, which is useful if you plan to
118 configure the system for a different pwm mode. However, the information
119 returned when reading pwm attributes is unrelated to SmartFan IV
120 operation.
93 121
94pwm[1-4]_mode - controls if output is PWM or DC level 122pwm[1-4]_mode - controls if output is PWM or DC level
95 * 0 DC output (0 - 12v) 123 * 0 DC output (0 - 12v)
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d
index ecbc1e4574b..129b0a3b555 100644
--- a/Documentation/hwmon/w83781d
+++ b/Documentation/hwmon/w83781d
@@ -403,7 +403,7 @@ found out the following values do work as a form of coarse pwm:
403 403
4040x80 - seems to turn fans off after some time(1-2 minutes)... might be 4040x80 - seems to turn fans off after some time(1-2 minutes)... might be
405some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an 405some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an
406old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attemp at Qfan 406old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attempt at Qfan
407that was dropped at the BIOS) 407that was dropped at the BIOS)
4080x81 - off 4080x81 - off
4090x82 - slightly "on-ner" than off, but my fans do not get to move. I can 4090x82 - slightly "on-ner" than off, but my fans do not get to move. I can
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d
index 5663e491655..90387c3540f 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d
@@ -93,7 +93,7 @@ The sysfs interface to the beep bitmask has migrated from the original legacy
93method of a single sysfs beep_mask file to a newer method using multiple 93method of a single sysfs beep_mask file to a newer method using multiple
94*_beep files as described in .../Documentation/hwmon/sysfs-interface. 94*_beep files as described in .../Documentation/hwmon/sysfs-interface.
95 95
96A similar change has occured for the bitmap corresponding to the alarms. The 96A similar change has occurred for the bitmap corresponding to the alarms. The
97original legacy method used a single sysfs alarms file containing a bitmap 97original legacy method used a single sysfs alarms file containing a bitmap
98of triggered alarms. The newer method uses multiple sysfs *_alarm files 98of triggered alarms. The newer method uses multiple sysfs *_alarm files
99(again following the pattern described in sysfs-interface). 99(again following the pattern described in sysfs-interface).
diff --git a/Documentation/hwmon/w83795 b/Documentation/hwmon/w83795
new file mode 100644
index 00000000000..9f160371f46
--- /dev/null
+++ b/Documentation/hwmon/w83795
@@ -0,0 +1,127 @@
1Kernel driver w83795
2====================
3
4Supported chips:
5 * Winbond/Nuvoton W83795G
6 Prefix: 'w83795g'
7 Addresses scanned: I2C 0x2c - 0x2f
8 Datasheet: Available for download on nuvoton.com
9 * Winbond/Nuvoton W83795ADG
10 Prefix: 'w83795adg'
11 Addresses scanned: I2C 0x2c - 0x2f
12 Datasheet: Available for download on nuvoton.com
13
14Authors:
15 Wei Song (Nuvoton)
16 Jean Delvare <khali@linux-fr.org>
17
18
19Pin mapping
20-----------
21
22Here is a summary of the pin mapping for the W83795G and W83795ADG.
23This can be useful to convert data provided by board manufacturers
24into working libsensors configuration statements.
25
26 W83795G |
27 Pin | Name | Register | Sysfs attribute
28------------------------------------------------------------------
29 13 | VSEN1 (VCORE1) | 10h | in0
30 14 | VSEN2 (VCORE2) | 11h | in1
31 15 | VSEN3 (VCORE3) | 12h | in2
32 16 | VSEN4 | 13h | in3
33 17 | VSEN5 | 14h | in4
34 18 | VSEN6 | 15h | in5
35 19 | VSEN7 | 16h | in6
36 20 | VSEN8 | 17h | in7
37 21 | VSEN9 | 18h | in8
38 22 | VSEN10 | 19h | in9
39 23 | VSEN11 | 1Ah | in10
40 28 | VTT | 1Bh | in11
41 24 | 3VDD | 1Ch | in12
42 25 | 3VSB | 1Dh | in13
43 26 | VBAT | 1Eh | in14
44 3 | VSEN12/TR5 | 1Fh | in15/temp5
45 4 | VSEN13/TR5 | 20h | in16/temp6
46 5/ 6 | VDSEN14/TR1/TD1 | 21h | in17/temp1
47 7/ 8 | VDSEN15/TR2/TD2 | 22h | in18/temp2
48 9/ 10 | VDSEN16/TR3/TD3 | 23h | in19/temp3
49 11/ 12 | VDSEN17/TR4/TD4 | 24h | in20/temp4
50 40 | FANIN1 | 2Eh | fan1
51 42 | FANIN2 | 2Fh | fan2
52 44 | FANIN3 | 30h | fan3
53 46 | FANIN4 | 31h | fan4
54 48 | FANIN5 | 32h | fan5
55 50 | FANIN6 | 33h | fan6
56 52 | FANIN7 | 34h | fan7
57 54 | FANIN8 | 35h | fan8
58 57 | FANIN9 | 36h | fan9
59 58 | FANIN10 | 37h | fan10
60 59 | FANIN11 | 38h | fan11
61 60 | FANIN12 | 39h | fan12
62 31 | FANIN13 | 3Ah | fan13
63 35 | FANIN14 | 3Bh | fan14
64 41 | FANCTL1 | 10h (bank 2) | pwm1
65 43 | FANCTL2 | 11h (bank 2) | pwm2
66 45 | FANCTL3 | 12h (bank 2) | pwm3
67 47 | FANCTL4 | 13h (bank 2) | pwm4
68 49 | FANCTL5 | 14h (bank 2) | pwm5
69 51 | FANCTL6 | 15h (bank 2) | pwm6
70 53 | FANCTL7 | 16h (bank 2) | pwm7
71 55 | FANCTL8 | 17h (bank 2) | pwm8
72 29/ 30 | PECI/TSI (DTS1) | 26h | temp7
73 29/ 30 | PECI/TSI (DTS2) | 27h | temp8
74 29/ 30 | PECI/TSI (DTS3) | 28h | temp9
75 29/ 30 | PECI/TSI (DTS4) | 29h | temp10
76 29/ 30 | PECI/TSI (DTS5) | 2Ah | temp11
77 29/ 30 | PECI/TSI (DTS6) | 2Bh | temp12
78 29/ 30 | PECI/TSI (DTS7) | 2Ch | temp13
79 29/ 30 | PECI/TSI (DTS8) | 2Dh | temp14
80 27 | CASEOPEN# | 46h | intrusion0
81
82 W83795ADG |
83 Pin | Name | Register | Sysfs attribute
84------------------------------------------------------------------
85 10 | VSEN1 (VCORE1) | 10h | in0
86 11 | VSEN2 (VCORE2) | 11h | in1
87 12 | VSEN3 (VCORE3) | 12h | in2
88 13 | VSEN4 | 13h | in3
89 14 | VSEN5 | 14h | in4
90 15 | VSEN6 | 15h | in5
91 16 | VSEN7 | 16h | in6
92 17 | VSEN8 | 17h | in7
93 22 | VTT | 1Bh | in11
94 18 | 3VDD | 1Ch | in12
95 19 | 3VSB | 1Dh | in13
96 20 | VBAT | 1Eh | in14
97 48 | VSEN12/TR5 | 1Fh | in15/temp5
98 1 | VSEN13/TR5 | 20h | in16/temp6
99 2/ 3 | VDSEN14/TR1/TD1 | 21h | in17/temp1
100 4/ 5 | VDSEN15/TR2/TD2 | 22h | in18/temp2
101 6/ 7 | VDSEN16/TR3/TD3 | 23h | in19/temp3
102 8/ 9 | VDSEN17/TR4/TD4 | 24h | in20/temp4
103 32 | FANIN1 | 2Eh | fan1
104 34 | FANIN2 | 2Fh | fan2
105 36 | FANIN3 | 30h | fan3
106 37 | FANIN4 | 31h | fan4
107 38 | FANIN5 | 32h | fan5
108 39 | FANIN6 | 33h | fan6
109 40 | FANIN7 | 34h | fan7
110 41 | FANIN8 | 35h | fan8
111 43 | FANIN9 | 36h | fan9
112 44 | FANIN10 | 37h | fan10
113 45 | FANIN11 | 38h | fan11
114 46 | FANIN12 | 39h | fan12
115 24 | FANIN13 | 3Ah | fan13
116 28 | FANIN14 | 3Bh | fan14
117 33 | FANCTL1 | 10h (bank 2) | pwm1
118 35 | FANCTL2 | 11h (bank 2) | pwm2
119 23 | PECI (DTS1) | 26h | temp7
120 23 | PECI (DTS2) | 27h | temp8
121 23 | PECI (DTS3) | 28h | temp9
122 23 | PECI (DTS4) | 29h | temp10
123 23 | PECI (DTS5) | 2Ah | temp11
124 23 | PECI (DTS6) | 2Bh | temp12
125 23 | PECI (DTS7) | 2Ch | temp13
126 23 | PECI (DTS8) | 2Dh | temp14
127 21 | CASEOPEN# | 46h | intrusion0
diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt
new file mode 100644
index 00000000000..7dcd1a4e726
--- /dev/null
+++ b/Documentation/hwspinlock.txt
@@ -0,0 +1,293 @@
1Hardware Spinlock Framework
2
31. Introduction
4
5Hardware spinlock modules provide hardware assistance for synchronization
6and mutual exclusion between heterogeneous processors and those not operating
7under a single, shared operating system.
8
9For example, OMAP4 has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP,
10each of which is running a different Operating System (the master, A9,
11is usually running Linux and the slave processors, the M3 and the DSP,
12are running some flavor of RTOS).
13
14A generic hwspinlock framework allows platform-independent drivers to use
15the hwspinlock device in order to access data structures that are shared
16between remote processors, that otherwise have no alternative mechanism
17to accomplish synchronization and mutual exclusion operations.
18
19This is necessary, for example, for Inter-processor communications:
20on OMAP4, cpu-intensive multimedia tasks are offloaded by the host to the
21remote M3 and/or C64x+ slave processors (by an IPC subsystem called Syslink).
22
23To achieve fast message-based communications, a minimal kernel support
24is needed to deliver messages arriving from a remote processor to the
25appropriate user process.
26
27This communication is based on simple data structures that is shared between
28the remote processors, and access to it is synchronized using the hwspinlock
29module (remote processor directly places new messages in this shared data
30structure).
31
32A common hwspinlock interface makes it possible to have generic, platform-
33independent, drivers.
34
352. User API
36
37 struct hwspinlock *hwspin_lock_request(void);
38 - dynamically assign an hwspinlock and return its address, or NULL
39 in case an unused hwspinlock isn't available. Users of this
40 API will usually want to communicate the lock's id to the remote core
41 before it can be used to achieve synchronization.
42 Can be called from an atomic context (this function will not sleep) but
43 not from within interrupt context.
44
45 struct hwspinlock *hwspin_lock_request_specific(unsigned int id);
46 - assign a specific hwspinlock id and return its address, or NULL
47 if that hwspinlock is already in use. Usually board code will
48 be calling this function in order to reserve specific hwspinlock
49 ids for predefined purposes.
50 Can be called from an atomic context (this function will not sleep) but
51 not from within interrupt context.
52
53 int hwspin_lock_free(struct hwspinlock *hwlock);
54 - free a previously-assigned hwspinlock; returns 0 on success, or an
55 appropriate error code on failure (e.g. -EINVAL if the hwspinlock
56 is already free).
57 Can be called from an atomic context (this function will not sleep) but
58 not from within interrupt context.
59
60 int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int timeout);
61 - lock a previously-assigned hwspinlock with a timeout limit (specified in
62 msecs). If the hwspinlock is already taken, the function will busy loop
63 waiting for it to be released, but give up when the timeout elapses.
64 Upon a successful return from this function, preemption is disabled so
65 the caller must not sleep, and is advised to release the hwspinlock as
66 soon as possible, in order to minimize remote cores polling on the
67 hardware interconnect.
68 Returns 0 when successful and an appropriate error code otherwise (most
69 notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
70 The function will never sleep.
71
72 int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int timeout);
73 - lock a previously-assigned hwspinlock with a timeout limit (specified in
74 msecs). If the hwspinlock is already taken, the function will busy loop
75 waiting for it to be released, but give up when the timeout elapses.
76 Upon a successful return from this function, preemption and the local
77 interrupts are disabled, so the caller must not sleep, and is advised to
78 release the hwspinlock as soon as possible.
79 Returns 0 when successful and an appropriate error code otherwise (most
80 notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
81 The function will never sleep.
82
83 int hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, unsigned int to,
84 unsigned long *flags);
85 - lock a previously-assigned hwspinlock with a timeout limit (specified in
86 msecs). If the hwspinlock is already taken, the function will busy loop
87 waiting for it to be released, but give up when the timeout elapses.
88 Upon a successful return from this function, preemption is disabled,
89 local interrupts are disabled and their previous state is saved at the
90 given flags placeholder. The caller must not sleep, and is advised to
91 release the hwspinlock as soon as possible.
92 Returns 0 when successful and an appropriate error code otherwise (most
93 notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
94 The function will never sleep.
95
96 int hwspin_trylock(struct hwspinlock *hwlock);
97 - attempt to lock a previously-assigned hwspinlock, but immediately fail if
98 it is already taken.
99 Upon a successful return from this function, preemption is disabled so
100 caller must not sleep, and is advised to release the hwspinlock as soon as
101 possible, in order to minimize remote cores polling on the hardware
102 interconnect.
103 Returns 0 on success and an appropriate error code otherwise (most
104 notably -EBUSY if the hwspinlock was already taken).
105 The function will never sleep.
106
107 int hwspin_trylock_irq(struct hwspinlock *hwlock);
108 - attempt to lock a previously-assigned hwspinlock, but immediately fail if
109 it is already taken.
110 Upon a successful return from this function, preemption and the local
111 interrupts are disabled so caller must not sleep, and is advised to
112 release the hwspinlock as soon as possible.
113 Returns 0 on success and an appropriate error code otherwise (most
114 notably -EBUSY if the hwspinlock was already taken).
115 The function will never sleep.
116
117 int hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags);
118 - attempt to lock a previously-assigned hwspinlock, but immediately fail if
119 it is already taken.
120 Upon a successful return from this function, preemption is disabled,
121 the local interrupts are disabled and their previous state is saved
122 at the given flags placeholder. The caller must not sleep, and is advised
123 to release the hwspinlock as soon as possible.
124 Returns 0 on success and an appropriate error code otherwise (most
125 notably -EBUSY if the hwspinlock was already taken).
126 The function will never sleep.
127
128 void hwspin_unlock(struct hwspinlock *hwlock);
129 - unlock a previously-locked hwspinlock. Always succeed, and can be called
130 from any context (the function never sleeps). Note: code should _never_
131 unlock an hwspinlock which is already unlocked (there is no protection
132 against this).
133
134 void hwspin_unlock_irq(struct hwspinlock *hwlock);
135 - unlock a previously-locked hwspinlock and enable local interrupts.
136 The caller should _never_ unlock an hwspinlock which is already unlocked.
137 Doing so is considered a bug (there is no protection against this).
138 Upon a successful return from this function, preemption and local
139 interrupts are enabled. This function will never sleep.
140
141 void
142 hwspin_unlock_irqrestore(struct hwspinlock *hwlock, unsigned long *flags);
143 - unlock a previously-locked hwspinlock.
144 The caller should _never_ unlock an hwspinlock which is already unlocked.
145 Doing so is considered a bug (there is no protection against this).
146 Upon a successful return from this function, preemption is reenabled,
147 and the state of the local interrupts is restored to the state saved at
148 the given flags. This function will never sleep.
149
150 int hwspin_lock_get_id(struct hwspinlock *hwlock);
151 - retrieve id number of a given hwspinlock. This is needed when an
152 hwspinlock is dynamically assigned: before it can be used to achieve
153 mutual exclusion with a remote cpu, the id number should be communicated
154 to the remote task with which we want to synchronize.
155 Returns the hwspinlock id number, or -EINVAL if hwlock is null.
156
1573. Typical usage
158
159#include <linux/hwspinlock.h>
160#include <linux/err.h>
161
162int hwspinlock_example1(void)
163{
164 struct hwspinlock *hwlock;
165 int ret;
166
167 /* dynamically assign a hwspinlock */
168 hwlock = hwspin_lock_request();
169 if (!hwlock)
170 ...
171
172 id = hwspin_lock_get_id(hwlock);
173 /* probably need to communicate id to a remote processor now */
174
175 /* take the lock, spin for 1 sec if it's already taken */
176 ret = hwspin_lock_timeout(hwlock, 1000);
177 if (ret)
178 ...
179
180 /*
181 * we took the lock, do our thing now, but do NOT sleep
182 */
183
184 /* release the lock */
185 hwspin_unlock(hwlock);
186
187 /* free the lock */
188 ret = hwspin_lock_free(hwlock);
189 if (ret)
190 ...
191
192 return ret;
193}
194
195int hwspinlock_example2(void)
196{
197 struct hwspinlock *hwlock;
198 int ret;
199
200 /*
201 * assign a specific hwspinlock id - this should be called early
202 * by board init code.
203 */
204 hwlock = hwspin_lock_request_specific(PREDEFINED_LOCK_ID);
205 if (!hwlock)
206 ...
207
208 /* try to take it, but don't spin on it */
209 ret = hwspin_trylock(hwlock);
210 if (!ret) {
211 pr_info("lock is already taken\n");
212 return -EBUSY;
213 }
214
215 /*
216 * we took the lock, do our thing now, but do NOT sleep
217 */
218
219 /* release the lock */
220 hwspin_unlock(hwlock);
221
222 /* free the lock */
223 ret = hwspin_lock_free(hwlock);
224 if (ret)
225 ...
226
227 return ret;
228}
229
230
2314. API for implementors
232
233 int hwspin_lock_register(struct hwspinlock *hwlock);
234 - to be called from the underlying platform-specific implementation, in
235 order to register a new hwspinlock instance. Can be called from an atomic
236 context (this function will not sleep) but not from within interrupt
237 context. Returns 0 on success, or appropriate error code on failure.
238
239 struct hwspinlock *hwspin_lock_unregister(unsigned int id);
240 - to be called from the underlying vendor-specific implementation, in order
241 to unregister an existing (and unused) hwspinlock instance.
242 Can be called from an atomic context (will not sleep) but not from
243 within interrupt context.
244 Returns the address of hwspinlock on success, or NULL on error (e.g.
245 if the hwspinlock is sill in use).
246
2475. struct hwspinlock
248
249This struct represents an hwspinlock instance. It is registered by the
250underlying hwspinlock implementation using the hwspin_lock_register() API.
251
252/**
253 * struct hwspinlock - vendor-specific hwspinlock implementation
254 *
255 * @dev: underlying device, will be used with runtime PM api
256 * @ops: vendor-specific hwspinlock handlers
257 * @id: a global, unique, system-wide, index of the lock.
258 * @lock: initialized and used by hwspinlock core
259 * @owner: underlying implementation module, used to maintain module ref count
260 */
261struct hwspinlock {
262 struct device *dev;
263 const struct hwspinlock_ops *ops;
264 int id;
265 spinlock_t lock;
266 struct module *owner;
267};
268
269The underlying implementation is responsible to assign the dev, ops, id and
270owner members. The lock member, OTOH, is initialized and used by the hwspinlock
271core.
272
2736. Implementation callbacks
274
275There are three possible callbacks defined in 'struct hwspinlock_ops':
276
277struct hwspinlock_ops {
278 int (*trylock)(struct hwspinlock *lock);
279 void (*unlock)(struct hwspinlock *lock);
280 void (*relax)(struct hwspinlock *lock);
281};
282
283The first two callbacks are mandatory:
284
285The ->trylock() callback should make a single attempt to take the lock, and
286return 0 on failure and 1 on success. This callback may _not_ sleep.
287
288The ->unlock() callback releases the lock. It always succeed, and it, too,
289may _not_ sleep.
290
291The ->relax() callback is optional. It is called by hwspinlock core while
292spinning on a lock, and can be used by the underlying implementation to force
293a delay between two successive invocations of ->trylock(). It may _not_ sleep.
diff --git a/Documentation/i2c/busses/i2c-diolan-u2c b/Documentation/i2c/busses/i2c-diolan-u2c
new file mode 100644
index 00000000000..30fe4bb9a06
--- /dev/null
+++ b/Documentation/i2c/busses/i2c-diolan-u2c
@@ -0,0 +1,26 @@
1Kernel driver i2c-diolan-u2c
2
3Supported adapters:
4 * Diolan U2C-12 I2C-USB adapter
5 Documentation:
6 http://www.diolan.com/i2c/u2c12.html
7
8Author: Guenter Roeck <guenter.roeck@ericsson.com>
9
10Description
11-----------
12
13This is the driver for the Diolan U2C-12 USB-I2C adapter.
14
15The Diolan U2C-12 I2C-USB Adapter provides a low cost solution to connect
16a computer to I2C slave devices using a USB interface. It also supports
17connectivity to SPI devices.
18
19This driver only supports the I2C interface of U2C-12. The driver does not use
20interrupts.
21
22
23Module parameters
24-----------------
25
26* frequency: I2C bus frequency
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 93fe76e5652..2871fd50034 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -16,8 +16,10 @@ Supported adapters:
16 * Intel EP80579 (Tolapai) 16 * Intel EP80579 (Tolapai)
17 * Intel 82801JI (ICH10) 17 * Intel 82801JI (ICH10)
18 * Intel 5/3400 Series (PCH) 18 * Intel 5/3400 Series (PCH)
19 * Intel Cougar Point (PCH) 19 * Intel 6 Series (PCH)
20 * Intel Patsburg (PCH) 20 * Intel Patsburg (PCH)
21 * Intel DH89xxCC (PCH)
22 * Intel Panther Point (PCH)
21 Datasheets: Publicly available at the Intel website 23 Datasheets: Publicly available at the Intel website
22 24
23On Intel Patsburg and later chipsets, both the normal host SMBus controller 25On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/i2c/busses/i2c-parport-light b/Documentation/i2c/busses/i2c-parport-light
index bdc9cbb2e0f..c22ee063e1e 100644
--- a/Documentation/i2c/busses/i2c-parport-light
+++ b/Documentation/i2c/busses/i2c-parport-light
@@ -4,7 +4,7 @@ Author: Jean Delvare <khali@linux-fr.org>
4 4
5This driver is a light version of i2c-parport. It doesn't depend 5This driver is a light version of i2c-parport. It doesn't depend
6on the parport driver, and uses direct I/O access instead. This might be 6on the parport driver, and uses direct I/O access instead. This might be
7prefered on embedded systems where wasting memory for the clean but heavy 7preferred on embedded systems where wasting memory for the clean but heavy
8parport handling is not an option. The drawback is a reduced portability 8parport handling is not an option. The drawback is a reduced portability
9and the impossibility to daisy-chain other parallel port devices. 9and the impossibility to daisy-chain other parallel port devices.
10 10
diff --git a/Documentation/i2c/busses/i2c-sis96x b/Documentation/i2c/busses/i2c-sis96x
index 70e6a0cc1e1..0b979f3252a 100644
--- a/Documentation/i2c/busses/i2c-sis96x
+++ b/Documentation/i2c/busses/i2c-sis96x
@@ -35,7 +35,7 @@ or perhaps this...
35 35
36(kernel versions later than 2.4.18 may fill in the "Unknown"s) 36(kernel versions later than 2.4.18 may fill in the "Unknown"s)
37 37
38If you cant see it please look on quirk_sis_96x_smbus 38If you can't see it please look on quirk_sis_96x_smbus
39(drivers/pci/quirks.c) (also if southbridge detection fails) 39(drivers/pci/quirks.c) (also if southbridge detection fails)
40 40
41I suspect that this driver could be made to work for the following SiS 41I suspect that this driver could be made to work for the following SiS
diff --git a/Documentation/i2c/busses/i2c-taos-evm b/Documentation/i2c/busses/i2c-taos-evm
index 9146e33be6d..63f62bcbf59 100644
--- a/Documentation/i2c/busses/i2c-taos-evm
+++ b/Documentation/i2c/busses/i2c-taos-evm
@@ -13,7 +13,7 @@ Currently supported devices are:
13 13
14* TAOS TSL2550 EVM 14* TAOS TSL2550 EVM
15 15
16For addtional information on TAOS products, please see 16For additional information on TAOS products, please see
17 http://www.taosinc.com/ 17 http://www.taosinc.com/
18 18
19 19
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index 87da405a859..9edb75d8c9b 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
100 (...) 100 (...)
101 i2c_adap = i2c_get_adapter(2); 101 i2c_adap = i2c_get_adapter(2);
102 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 102 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); 103 strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
105 normal_i2c, NULL); 105 normal_i2c, NULL);
106 i2c_put_adapter(i2c_adap); 106 i2c_put_adapter(i2c_adap);
diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients
index 9a45f9bb6a2..d6991625c40 100644
--- a/Documentation/i2c/upgrading-clients
+++ b/Documentation/i2c/upgrading-clients
@@ -61,7 +61,7 @@ static int example_attach(struct i2c_adapter *adap, int addr, int kind)
61 return 0; 61 return 0;
62} 62}
63 63
64static int __devexit example_detach(struct i2c_client *client) 64static int example_detach(struct i2c_client *client)
65{ 65{
66 struct example_state *state = i2c_get_clientdata(client); 66 struct example_state *state = i2c_get_clientdata(client);
67 67
@@ -81,7 +81,7 @@ static struct i2c_driver example_driver = {
81 .name = "example", 81 .name = "example",
82 }, 82 },
83 .attach_adapter = example_attach_adapter, 83 .attach_adapter = example_attach_adapter,
84 .detach_client = __devexit_p(example_detach), 84 .detach_client = example_detach,
85 .suspend = example_suspend, 85 .suspend = example_suspend,
86 .resume = example_resume, 86 .resume = example_resume,
87}; 87};
@@ -93,7 +93,7 @@ Updating the client
93The new style binding model will check against a list of supported 93The new style binding model will check against a list of supported
94devices and their associated address supplied by the code registering 94devices and their associated address supplied by the code registering
95the busses. This means that the driver .attach_adapter and 95the busses. This means that the driver .attach_adapter and
96.detach_adapter methods can be removed, along with the addr_data, 96.detach_client methods can be removed, along with the addr_data,
97as follows: 97as follows:
98 98
99- static struct i2c_driver example_driver; 99- static struct i2c_driver example_driver;
@@ -110,14 +110,14 @@ as follows:
110 110
111 static struct i2c_driver example_driver = { 111 static struct i2c_driver example_driver = {
112- .attach_adapter = example_attach_adapter, 112- .attach_adapter = example_attach_adapter,
113- .detach_client = __devexit_p(example_detach), 113- .detach_client = example_detach,
114 } 114 }
115 115
116Add the probe and remove methods to the i2c_driver, as so: 116Add the probe and remove methods to the i2c_driver, as so:
117 117
118 static struct i2c_driver example_driver = { 118 static struct i2c_driver example_driver = {
119+ .probe = example_probe, 119+ .probe = example_probe,
120+ .remove = __devexit_p(example_remove), 120+ .remove = example_remove,
121 } 121 }
122 122
123Change the example_attach method to accept the new parameters 123Change the example_attach method to accept the new parameters
@@ -199,8 +199,8 @@ to delete the i2c_detach_client call. It is possible that you
199can also remove the ret variable as it is not not needed for 199can also remove the ret variable as it is not not needed for
200any of the core functions. 200any of the core functions.
201 201
202- static int __devexit example_detach(struct i2c_client *client) 202- static int example_detach(struct i2c_client *client)
203+ static int __devexit example_remove(struct i2c_client *client) 203+ static int example_remove(struct i2c_client *client)
204{ 204{
205 struct example_state *state = i2c_get_clientdata(client); 205 struct example_state *state = i2c_get_clientdata(client);
206 206
@@ -253,7 +253,7 @@ static int example_probe(struct i2c_client *client,
253 return 0; 253 return 0;
254} 254}
255 255
256static int __devexit example_remove(struct i2c_client *client) 256static int example_remove(struct i2c_client *client)
257{ 257{
258 struct example_state *state = i2c_get_clientdata(client); 258 struct example_state *state = i2c_get_clientdata(client);
259 259
@@ -275,7 +275,7 @@ static struct i2c_driver example_driver = {
275 }, 275 },
276 .id_table = example_idtable, 276 .id_table = example_idtable,
277 .probe = example_probe, 277 .probe = example_probe,
278 .remove = __devexit_p(example_remove), 278 .remove = example_remove,
279 .suspend = example_suspend, 279 .suspend = example_suspend,
280 .resume = example_resume, 280 .resume = example_resume,
281}; 281};
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 5ebf5af1d71..5aa53374ea2 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -38,7 +38,7 @@ static struct i2c_driver foo_driver = {
38 .name = "foo", 38 .name = "foo",
39 }, 39 },
40 40
41 .id_table = foo_ids, 41 .id_table = foo_idtable,
42 .probe = foo_probe, 42 .probe = foo_probe,
43 .remove = foo_remove, 43 .remove = foo_remove,
44 /* if device autodetection is needed: */ 44 /* if device autodetection is needed: */
diff --git a/Documentation/i2o/README b/Documentation/i2o/README
index 0ebf58c73f5..ee91e2626ff 100644
--- a/Documentation/i2o/README
+++ b/Documentation/i2o/README
@@ -53,7 +53,7 @@ Symbios Logic (Now LSI)
53BoxHill Corporation 53BoxHill Corporation
54 Loan of initial FibreChannel disk array used for development work. 54 Loan of initial FibreChannel disk array used for development work.
55 55
56European Comission 56European Commission
57 Funding the work done by the University of Helsinki 57 Funding the work done by the University of Helsinki
58 58
59SysKonnect 59SysKonnect
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 3dfb76ca693..5caa2af3320 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -177,7 +177,7 @@ static int scan_rom(char *path, char *file)
177 177
178 /* 178 /*
179 * It's OK if the ROM is unreadable. Maybe there 179 * It's OK if the ROM is unreadable. Maybe there
180 * is no ROM, or some other error ocurred. The 180 * is no ROM, or some other error occurred. The
181 * important thing is that no MCA happened. 181 * important thing is that no MCA happened.
182 */ 182 */
183 if (rc > 0) 183 if (rc > 0)
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt
index 56941ae1f5d..db798af5ef9 100644
--- a/Documentation/input/elantech.txt
+++ b/Documentation/input/elantech.txt
@@ -34,7 +34,8 @@ Contents
34Currently the Linux Elantech touchpad driver is aware of two different 34Currently the Linux Elantech touchpad driver is aware of two different
35hardware versions unimaginatively called version 1 and version 2. Version 1 35hardware versions unimaginatively called version 1 and version 2. Version 1
36is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to 36is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to
37be introduced with the EeePC and uses 6 bytes per packet. 37be introduced with the EeePC and uses 6 bytes per packet, and provides
38additional features such as position of two fingers, and width of the touch.
38 39
39The driver tries to support both hardware versions and should be compatible 40The driver tries to support both hardware versions and should be compatible
40with the Xorg Synaptics touchpad driver and its graphical configuration 41with the Xorg Synaptics touchpad driver and its graphical configuration
@@ -94,18 +95,44 @@ Currently the Linux Elantech touchpad driver provides two extra knobs under
94 can check these bits and reject any packet that appears corrupted. Using 95 can check these bits and reject any packet that appears corrupted. Using
95 this knob you can bypass that check. 96 this knob you can bypass that check.
96 97
97 It is not known yet whether hardware version 2 provides the same parity 98 Hardware version 2 does not provide the same parity bits. Only some basic
98 bits. Hence checking is disabled by default. Currently even turning it on 99 data consistency checking can be done. For now checking is disabled by
99 will do nothing. 100 default. Currently even turning it on will do nothing.
100
101 101
102///////////////////////////////////////////////////////////////////////////// 102/////////////////////////////////////////////////////////////////////////////
103 103
1043. Differentiating hardware versions
105 =================================
106
107To detect the hardware version, read the version number as param[0].param[1].param[2]
108
109 4 bytes version: (after the arrow is the name given in the Dell-provided driver)
110 02.00.22 => EF013
111 02.06.00 => EF019
112In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
11302.00.00, 02.00.04, 02.00.06.
114
115 6 bytes:
116 02.00.30 => EF113
117 02.08.00 => EF023
118 02.08.XX => EF123
119 02.0B.00 => EF215
120 04.01.XX => Scroll_EF051
121 04.02.XX => EF051
122In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There
123appears to be almost no difference, except for EF113, which does not report
124pressure/width and has different data consistency checks.
125
126Probably all the versions with param[0] <= 01 can be considered as
1274 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as
1284 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes.
129
130/////////////////////////////////////////////////////////////////////////////
104 131
1053. Hardware version 1 1324. Hardware version 1
106 ================== 133 ==================
107 134
1083.1 Registers 1354.1 Registers
109 ~~~~~~~~~ 136 ~~~~~~~~~
110 137
111By echoing a hexadecimal value to a register it contents can be altered. 138By echoing a hexadecimal value to a register it contents can be altered.
@@ -168,7 +195,7 @@ For example:
168 smart edge activation area width? 195 smart edge activation area width?
169 196
170 197
1713.2 Native relative mode 4 byte packet format 1984.2 Native relative mode 4 byte packet format
172 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 200
174byte 0: 201byte 0:
@@ -226,9 +253,13 @@ byte 3:
226 positive = down 253 positive = down
227 254
228 255
2293.3 Native absolute mode 4 byte packet format 2564.3 Native absolute mode 4 byte packet format
230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 257 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231 258
259EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and
260when 1 finger is touching, the first 2 position reports must be discarded.
261This counting is reset whenever a different number of fingers is reported.
262
232byte 0: 263byte 0:
233 firmware version 1.x: 264 firmware version 1.x:
234 265
@@ -279,11 +310,11 @@ byte 3:
279///////////////////////////////////////////////////////////////////////////// 310/////////////////////////////////////////////////////////////////////////////
280 311
281 312
2824. Hardware version 2 3135. Hardware version 2
283 ================== 314 ==================
284 315
285 316
2864.1 Registers 3175.1 Registers
287 ~~~~~~~~~ 318 ~~~~~~~~~
288 319
289By echoing a hexadecimal value to a register it contents can be altered. 320By echoing a hexadecimal value to a register it contents can be altered.
@@ -316,16 +347,41 @@ For example:
316 0x7f = never i.e. tap again to release) 347 0x7f = never i.e. tap again to release)
317 348
318 349
3194.2 Native absolute mode 6 byte packet format 3505.2 Native absolute mode 6 byte packet format
320 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 351 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
321 3525.2.1 Parity checking and packet re-synchronization
3224.2.1 One finger touch 353There is no parity checking, however some consistency checks can be performed.
354
355For instance for EF113:
356 SA1= packet[0];
357 A1 = packet[1];
358 B1 = packet[2];
359 SB1= packet[3];
360 C1 = packet[4];
361 D1 = packet[5];
362 if( (((SA1 & 0x3C) != 0x3C) && ((SA1 & 0xC0) != 0x80)) || // check Byte 1
363 (((SA1 & 0x0C) != 0x0C) && ((SA1 & 0xC0) == 0x80)) || // check Byte 1 (one finger pressed)
364 (((SA1 & 0xC0) != 0x80) && (( A1 & 0xF0) != 0x00)) || // check Byte 2
365 (((SB1 & 0x3E) != 0x38) && ((SA1 & 0xC0) != 0x80)) || // check Byte 4
366 (((SB1 & 0x0E) != 0x08) && ((SA1 & 0xC0) == 0x80)) || // check Byte 4 (one finger pressed)
367 (((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5
368 // error detected
369
370For all the other ones, there are just a few constant bits:
371 if( ((packet[0] & 0x0C) != 0x04) ||
372 ((packet[3] & 0x0f) != 0x02) )
373 // error detected
374
375
376In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
377
3785.2.1 One/Three finger touch
323 ~~~~~~~~~~~~~~~~ 379 ~~~~~~~~~~~~~~~~
324 380
325byte 0: 381byte 0:
326 382
327 bit 7 6 5 4 3 2 1 0 383 bit 7 6 5 4 3 2 1 0
328 n1 n0 . . . . R L 384 n1 n0 w3 w2 . . R L
329 385
330 L, R = 1 when Left, Right mouse button pressed 386 L, R = 1 when Left, Right mouse button pressed
331 n1..n0 = numbers of fingers on touchpad 387 n1..n0 = numbers of fingers on touchpad
@@ -333,24 +389,40 @@ byte 0:
333byte 1: 389byte 1:
334 390
335 bit 7 6 5 4 3 2 1 0 391 bit 7 6 5 4 3 2 1 0
336 . . . . . x10 x9 x8 392 p7 p6 p5 p4 . x10 x9 x8
337 393
338byte 2: 394byte 2:
339 395
340 bit 7 6 5 4 3 2 1 0 396 bit 7 6 5 4 3 2 1 0
341 x7 x6 x5 x4 x4 x2 x1 x0 397 x7 x6 x5 x4 x3 x2 x1 x0
342 398
343 x10..x0 = absolute x value (horizontal) 399 x10..x0 = absolute x value (horizontal)
344 400
345byte 3: 401byte 3:
346 402
347 bit 7 6 5 4 3 2 1 0 403 bit 7 6 5 4 3 2 1 0
348 . . . . . . . . 404 n4 vf w1 w0 . . . b2
405
406 n4 = set if more than 3 fingers (only in 3 fingers mode)
407 vf = a kind of flag ? (only on EF123, 0 when finger is over one
408 of the buttons, 1 otherwise)
409 w3..w0 = width of the finger touch (not EF113)
410 b2 (on EF113 only, 0 otherwise), b2.R.L indicates one button pressed:
411 0 = none
412 1 = Left
413 2 = Right
414 3 = Middle (Left and Right)
415 4 = Forward
416 5 = Back
417 6 = Another one
418 7 = Another one
349 419
350byte 4: 420byte 4:
351 421
352 bit 7 6 5 4 3 2 1 0 422 bit 7 6 5 4 3 2 1 0
353 . . . . . . y9 y8 423 p3 p1 p2 p0 . . y9 y8
424
425 p7..p0 = pressure (not EF113)
354 426
355byte 5: 427byte 5:
356 428
@@ -363,6 +435,11 @@ byte 5:
3634.2.2 Two finger touch 4354.2.2 Two finger touch
364 ~~~~~~~~~~~~~~~~ 436 ~~~~~~~~~~~~~~~~
365 437
438Note that the two pairs of coordinates are not exactly the coordinates of the
439two fingers, but only the pair of the lower-left and upper-right coordinates.
440So the actual fingers might be situated on the other diagonal of the square
441defined by these two points.
442
366byte 0: 443byte 0:
367 444
368 bit 7 6 5 4 3 2 1 0 445 bit 7 6 5 4 3 2 1 0
@@ -376,14 +453,14 @@ byte 1:
376 bit 7 6 5 4 3 2 1 0 453 bit 7 6 5 4 3 2 1 0
377 ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 454 ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
378 455
379 ax8..ax0 = first finger absolute x value 456 ax8..ax0 = lower-left finger absolute x value
380 457
381byte 2: 458byte 2:
382 459
383 bit 7 6 5 4 3 2 1 0 460 bit 7 6 5 4 3 2 1 0
384 ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 461 ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
385 462
386 ay8..ay0 = first finger absolute y value 463 ay8..ay0 = lower-left finger absolute y value
387 464
388byte 3: 465byte 3:
389 466
@@ -395,11 +472,11 @@ byte 4:
395 bit 7 6 5 4 3 2 1 0 472 bit 7 6 5 4 3 2 1 0
396 bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 473 bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
397 474
398 bx8..bx0 = second finger absolute x value 475 bx8..bx0 = upper-right finger absolute x value
399 476
400byte 5: 477byte 5:
401 478
402 bit 7 6 5 4 3 2 1 0 479 bit 7 6 5 4 3 2 1 0
403 by7 by8 by5 by4 by3 by2 by1 by0 480 by7 by8 by5 by4 by3 by2 by1 by0
404 481
405 by8..by0 = second finger absolute y value 482 by8..by0 = upper-right finger absolute y value
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
new file mode 100644
index 00000000000..23fcb05175b
--- /dev/null
+++ b/Documentation/input/event-codes.txt
@@ -0,0 +1,262 @@
1The input protocol uses a map of types and codes to express input device values
2to userspace. This document describes the types and codes and how and when they
3may be used.
4
5A single hardware event generates multiple input events. Each input event
6contains the new value of a single data item. A special event type, EV_SYN, is
7used to separate input events into packets of input data changes occurring at
8the same moment in time. In the following, the term "event" refers to a single
9input event encompassing a type, code, and value.
10
11The input protocol is a stateful protocol. Events are emitted only when values
12of event codes have changed. However, the state is maintained within the Linux
13input subsystem; drivers do not need to maintain the state and may attempt to
14emit unchanged values without harm. Userspace may obtain the current state of
15event code values using the EVIOCG* ioctls defined in linux/input.h. The event
16reports supported by a device are also provided by sysfs in
17class/input/event*/device/capabilities/, and the properties of a device are
18provided in class/input/event*/device/properties.
19
20Types:
21==========
22Types are groupings of codes under a logical input construct. Each type has a
23set of applicable codes to be used in generating events. See the Codes section
24for details on valid codes for each type.
25
26* EV_SYN:
27 - Used as markers to separate events. Events may be separated in time or in
28 space, such as with the multitouch protocol.
29
30* EV_KEY:
31 - Used to describe state changes of keyboards, buttons, or other key-like
32 devices.
33
34* EV_REL:
35 - Used to describe relative axis value changes, e.g. moving the mouse 5 units
36 to the left.
37
38* EV_ABS:
39 - Used to describe absolute axis value changes, e.g. describing the
40 coordinates of a touch on a touchscreen.
41
42* EV_MSC:
43 - Used to describe miscellaneous input data that do not fit into other types.
44
45* EV_SW:
46 - Used to describe binary state input switches.
47
48* EV_LED:
49 - Used to turn LEDs on devices on and off.
50
51* EV_SND:
52 - Used to output sound to devices.
53
54* EV_REP:
55 - Used for autorepeating devices.
56
57* EV_FF:
58 - Used to send force feedback commands to an input device.
59
60* EV_PWR:
61 - A special type for power button and switch input.
62
63* EV_FF_STATUS:
64 - Used to receive force feedback device status.
65
66Codes:
67==========
68Codes define the precise type of event.
69
70EV_SYN:
71----------
72EV_SYN event values are undefined. Their usage is defined only by when they are
73sent in the evdev event stream.
74
75* SYN_REPORT:
76 - Used to synchronize and separate events into packets of input data changes
77 occurring at the same moment in time. For example, motion of a mouse may set
78 the REL_X and REL_Y values for one motion, then emit a SYN_REPORT. The next
79 motion will emit more REL_X and REL_Y values and send another SYN_REPORT.
80
81* SYN_CONFIG:
82 - TBD
83
84* SYN_MT_REPORT:
85 - Used to synchronize and separate touch events. See the
86 multi-touch-protocol.txt document for more information.
87
88* SYN_DROPPED:
89 - Used to indicate buffer overrun in the evdev client's event queue.
90 Client should ignore all events up to and including next SYN_REPORT
91 event and query the device (using EVIOCG* ioctls) to obtain its
92 current state.
93
94EV_KEY:
95----------
96EV_KEY events take the form KEY_<name> or BTN_<name>. For example, KEY_A is used
97to represent the 'A' key on a keyboard. When a key is depressed, an event with
98the key's code is emitted with value 1. When the key is released, an event is
99emitted with value 0. Some hardware send events when a key is repeated. These
100events have a value of 2. In general, KEY_<name> is used for keyboard keys, and
101BTN_<name> is used for other types of momentary switch events.
102
103A few EV_KEY codes have special meanings:
104
105* BTN_TOOL_<name>:
106 - These codes are used in conjunction with input trackpads, tablets, and
107 touchscreens. These devices may be used with fingers, pens, or other tools.
108 When an event occurs and a tool is used, the corresponding BTN_TOOL_<name>
109 code should be set to a value of 1. When the tool is no longer interacting
110 with the input device, the BTN_TOOL_<name> code should be reset to 0. All
111 trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name>
112 code when events are generated.
113
114* BTN_TOUCH:
115 BTN_TOUCH is used for touch contact. While an input tool is determined to be
116 within meaningful physical contact, the value of this property must be set
117 to 1. Meaningful physical contact may mean any contact, or it may mean
118 contact conditioned by an implementation defined property. For example, a
119 touchpad may set the value to 1 only when the touch pressure rises above a
120 certain value. BTN_TOUCH may be combined with BTN_TOOL_<name> codes. For
121 example, a pen tablet may set BTN_TOOL_PEN to 1 and BTN_TOUCH to 0 while the
122 pen is hovering over but not touching the tablet surface.
123
124Note: For appropriate function of the legacy mousedev emulation driver,
125BTN_TOUCH must be the first evdev code emitted in a synchronization frame.
126
127Note: Historically a touch device with BTN_TOOL_FINGER and BTN_TOUCH was
128interpreted as a touchpad by userspace, while a similar device without
129BTN_TOOL_FINGER was interpreted as a touchscreen. For backwards compatibility
130with current userspace it is recommended to follow this distinction. In the
131future, this distinction will be deprecated and the device properties ioctl
132EVIOCGPROP, defined in linux/input.h, will be used to convey the device type.
133
134* BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP, BTN_TOOL_QUADTAP:
135 - These codes denote one, two, three, and four finger interaction on a
136 trackpad or touchscreen. For example, if the user uses two fingers and moves
137 them on the touchpad in an effort to scroll content on screen,
138 BTN_TOOL_DOUBLETAP should be set to value 1 for the duration of the motion.
139 Note that all BTN_TOOL_<name> codes and the BTN_TOUCH code are orthogonal in
140 purpose. A trackpad event generated by finger touches should generate events
141 for one code from each group. At most only one of these BTN_TOOL_<name>
142 codes should have a value of 1 during any synchronization frame.
143
144Note: Historically some drivers emitted multiple of the finger count codes with
145a value of 1 in the same synchronization frame. This usage is deprecated.
146
147Note: In multitouch drivers, the input_mt_report_finger_count() function should
148be used to emit these codes. Please see multi-touch-protocol.txt for details.
149
150EV_REL:
151----------
152EV_REL events describe relative changes in a property. For example, a mouse may
153move to the left by a certain number of units, but its absolute position in
154space is unknown. If the absolute position is known, EV_ABS codes should be used
155instead of EV_REL codes.
156
157A few EV_REL codes have special meanings:
158
159* REL_WHEEL, REL_HWHEEL:
160 - These codes are used for vertical and horizontal scroll wheels,
161 respectively.
162
163EV_ABS:
164----------
165EV_ABS events describe absolute changes in a property. For example, a touchpad
166may emit coordinates for a touch location.
167
168A few EV_ABS codes have special meanings:
169
170* ABS_DISTANCE:
171 - Used to describe the distance of a tool from an interaction surface. This
172 event should only be emitted while the tool is hovering, meaning in close
173 proximity of the device and while the value of the BTN_TOUCH code is 0. If
174 the input device may be used freely in three dimensions, consider ABS_Z
175 instead.
176
177* ABS_MT_<name>:
178 - Used to describe multitouch input events. Please see
179 multi-touch-protocol.txt for details.
180
181EV_SW:
182----------
183EV_SW events describe stateful binary switches. For example, the SW_LID code is
184used to denote when a laptop lid is closed.
185
186Upon binding to a device or resuming from suspend, a driver must report
187the current switch state. This ensures that the device, kernel, and userspace
188state is in sync.
189
190Upon resume, if the switch state is the same as before suspend, then the input
191subsystem will filter out the duplicate switch state reports. The driver does
192not need to keep the state of the switch at any time.
193
194EV_MSC:
195----------
196EV_MSC events are used for input and output events that do not fall under other
197categories.
198
199EV_LED:
200----------
201EV_LED events are used for input and output to set and query the state of
202various LEDs on devices.
203
204EV_REP:
205----------
206EV_REP events are used for specifying autorepeating events.
207
208EV_SND:
209----------
210EV_SND events are used for sending sound commands to simple sound output
211devices.
212
213EV_FF:
214----------
215EV_FF events are used to initialize a force feedback capable device and to cause
216such device to feedback.
217
218EV_PWR:
219----------
220EV_PWR events are a special type of event used specifically for power
221mangement. Its usage is not well defined. To be addressed later.
222
223Guidelines:
224==========
225The guidelines below ensure proper single-touch and multi-finger functionality.
226For multi-touch functionality, see the multi-touch-protocol.txt document for
227more information.
228
229Mice:
230----------
231REL_{X,Y} must be reported when the mouse moves. BTN_LEFT must be used to report
232the primary button press. BTN_{MIDDLE,RIGHT,4,5,etc.} should be used to report
233further buttons of the device. REL_WHEEL and REL_HWHEEL should be used to report
234scroll wheel events where available.
235
236Touchscreens:
237----------
238ABS_{X,Y} must be reported with the location of the touch. BTN_TOUCH must be
239used to report when a touch is active on the screen.
240BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch
241contact. BTN_TOOL_<name> events should be reported where possible.
242
243Trackpads:
244----------
245Legacy trackpads that only provide relative position information must report
246events like mice described above.
247
248Trackpads that provide absolute touch position must report ABS_{X,Y} for the
249location of the touch. BTN_TOUCH should be used to report when a touch is active
250on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should
251be used to report the number of touches active on the trackpad.
252
253Tablets:
254----------
255BTN_TOOL_<name> events must be reported when a stylus or other tool is active on
256the tablet. ABS_{X,Y} must be reported with the location of the tool. BTN_TOUCH
257should be used to report when the tool is in contact with the tablet.
258BTN_{STYLUS,STYLUS2} should be used to report buttons on the tool itself. Any
259button may be used for buttons on the tablet except BTN_{MOUSE,LEFT}.
260BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use
261meaningful buttons, like BTN_FORWARD, unless the button is labeled for that
262purpose on the device.
diff --git a/Documentation/input/joystick-parport.txt b/Documentation/input/joystick-parport.txt
index 1c856f32ff2..56870c70a79 100644
--- a/Documentation/input/joystick-parport.txt
+++ b/Documentation/input/joystick-parport.txt
@@ -272,7 +272,7 @@ if you want to use gamecon.c.
272 272
273 Also, the connection is a bit more complex. You'll need a bunch of diodes, 273 Also, the connection is a bit more complex. You'll need a bunch of diodes,
274and one pullup resistor. First, you connect the Directions and the button 274and one pullup resistor. First, you connect the Directions and the button
275the same as for db9, however with the diodes inbetween. 275the same as for db9, however with the diodes between.
276 276
277 Diodes 277 Diodes
278(pin 2) -----|<|----> Up 278(pin 2) -----|<|----> Up
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 8b4129de1d2..92e68bce13a 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -9,6 +9,9 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees
9and by triggering on falling and rising edges, the turn direction can 9and by triggering on falling and rising edges, the turn direction can
10be determined. 10be determined.
11 11
12Some encoders have both outputs low in stable states, whereas others also have
13a stable state with both outputs high (half-period mode).
14
12The phase diagram of these two outputs look like this: 15The phase diagram of these two outputs look like this:
13 16
14 _____ _____ _____ 17 _____ _____ _____
@@ -26,6 +29,8 @@ The phase diagram of these two outputs look like this:
26 |<-------->| 29 |<-------->|
27 one step 30 one step
28 31
32 |<-->|
33 one step (half-period mode)
29 34
30For more information, please see 35For more information, please see
31 http://en.wikipedia.org/wiki/Rotary_encoder 36 http://en.wikipedia.org/wiki/Rotary_encoder
@@ -34,6 +39,13 @@ For more information, please see
341. Events / state machine 391. Events / state machine
35------------------------- 40-------------------------
36 41
42In half-period mode, state a) and c) above are used to determine the
43rotational direction based on the last stable state. Events are reported in
44states b) and d) given that the new stable state is different from the last
45(i.e. the rotation was not reversed half-way).
46
47Otherwise, the following apply:
48
37a) Rising edge on channel A, channel B in low state 49a) Rising edge on channel A, channel B in low state
38 This state is used to recognize a clockwise turn 50 This state is used to recognize a clockwise turn
39 51
@@ -46,7 +58,7 @@ c) Falling edge on channel A, channel B in high state
46 58
47d) Falling edge on channel B, channel A in low state 59d) Falling edge on channel B, channel A in low state
48 Parking position. If the encoder enters this state, a full transition 60 Parking position. If the encoder enters this state, a full transition
49 should have happend, unless it flipped back on half the way. The 61 should have happened, unless it flipped back on half the way. The
50 'armed' state tells us about that. 62 'armed' state tells us about that.
51 63
522. Platform requirements 642. Platform requirements
@@ -96,6 +108,7 @@ static struct rotary_encoder_platform_data my_rotary_encoder_info = {
96 .gpio_b = GPIO_ROTARY_B, 108 .gpio_b = GPIO_ROTARY_B,
97 .inverted_a = 0, 109 .inverted_a = 0,
98 .inverted_b = 0, 110 .inverted_b = 0,
111 .half_period = false,
99}; 112};
100 113
101static struct platform_device rotary_encoder_device = { 114static struct platform_device rotary_encoder_device = {
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt
index 8f4289efc5c..561385d3848 100644
--- a/Documentation/input/walkera0701.txt
+++ b/Documentation/input/walkera0701.txt
@@ -77,7 +77,7 @@ pulse length:
77 77
7824 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits 7824 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits
79 79
80(Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync 80(Warning, pulses on ACK are inverted by transistor, irq is raised up on sync
81to bin change or octal value to bin change). 81to bin change or octal value to bin change).
82 82
83Binary data representations: 83Binary data representations:
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index ac293e95530..3a46e360496 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -133,6 +133,7 @@ Code Seq#(hex) Include File Comments
133'H' C0-DF net/bluetooth/hidp/hidp.h conflict! 133'H' C0-DF net/bluetooth/hidp/hidp.h conflict!
134'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict! 134'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict!
135'H' C0-DF net/bluetooth/bnep/bnep.h conflict! 135'H' C0-DF net/bluetooth/bnep/bnep.h conflict!
136'H' F1 linux/hid-roccat.h <mailto:erazor_de@users.sourceforge.net>
136'I' all linux/isdn.h conflict! 137'I' all linux/isdn.h conflict!
137'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict! 138'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict!
138'I' 40-4F linux/mISDNif.h conflict! 139'I' 40-4F linux/mISDNif.h conflict!
@@ -165,7 +166,6 @@ Code Seq#(hex) Include File Comments
165'T' all arch/x86/include/asm/ioctls.h conflict! 166'T' all arch/x86/include/asm/ioctls.h conflict!
166'T' C0-DF linux/if_tun.h conflict! 167'T' C0-DF linux/if_tun.h conflict!
167'U' all sound/asound.h conflict! 168'U' all sound/asound.h conflict!
168'U' 00-0F drivers/media/video/uvc/uvcvideo.h conflict!
169'U' 00-CF linux/uinput.h conflict! 169'U' 00-CF linux/uinput.h conflict!
170'U' 00-EF linux/usbdevice_fs.h 170'U' 00-EF linux/usbdevice_fs.h
171'U' C0-CF drivers/bluetooth/hci_uart.h 171'U' C0-CF drivers/bluetooth/hci_uart.h
@@ -258,6 +258,7 @@ Code Seq#(hex) Include File Comments
258't' 80-8F linux/isdn_ppp.h 258't' 80-8F linux/isdn_ppp.h
259't' 90 linux/toshiba.h 259't' 90 linux/toshiba.h
260'u' 00-1F linux/smb_fs.h gone 260'u' 00-1F linux/smb_fs.h gone
261'u' 20-3F linux/uvcvideo.h USB video class host driver
261'v' 00-1F linux/ext2_fs.h conflict! 262'v' 00-1F linux/ext2_fs.h conflict!
262'v' 00-1F linux/fs.h conflict! 263'v' 00-1F linux/fs.h conflict!
263'v' 00-0F linux/sonypi.h conflict! 264'v' 00-0F linux/sonypi.h conflict!
@@ -272,6 +273,7 @@ Code Seq#(hex) Include File Comments
272'z' 40-7F CAN bus card conflict! 273'z' 40-7F CAN bus card conflict!
273 <mailto:oe@port.de> 274 <mailto:oe@port.de>
274'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! 275'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
276'|' 00-7F linux/media.h
2750x80 00-1F linux/fb.h 2770x80 00-1F linux/fb.h
2760x89 00-06 arch/x86/include/asm/sockios.h 2780x89 00-06 arch/x86/include/asm/sockios.h
2770x89 0B-DF linux/sockios.h 2790x89 0B-DF linux/sockios.h
@@ -302,6 +304,7 @@ Code Seq#(hex) Include File Comments
3020xB0 all RATIO devices in development: 3040xB0 all RATIO devices in development:
303 <mailto:vgo@ratio.de> 305 <mailto:vgo@ratio.de>
3040xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> 3060xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
3070xB3 00 linux/mmc/ioctl.h
3050xC0 00-0F linux/usb/iowarrior.h 3080xC0 00-0F linux/usb/iowarrior.h
3060xCB 00-1F CBM serial IEC bus in development: 3090xCB 00-1F CBM serial IEC bus in development:
307 <mailto:michael.klein@puffin.lb.shuttle.de> 310 <mailto:michael.klein@puffin.lb.shuttle.de>
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt
index f6dece5b701..c76c21d87e8 100644
--- a/Documentation/iostats.txt
+++ b/Documentation/iostats.txt
@@ -1,8 +1,6 @@
1I/O statistics fields 1I/O statistics fields
2--------------- 2---------------
3 3
4Last modified Sep 30, 2003
5
6Since 2.4.20 (and some versions before, with patches), and 2.5.45, 4Since 2.4.20 (and some versions before, with patches), and 2.5.45,
7more extensive disk statistics have been introduced to help measure disk 5more extensive disk statistics have been introduced to help measure disk
8activity. Tools such as sar and iostat typically interpret these and do 6activity. Tools such as sar and iostat typically interpret these and do
@@ -46,11 +44,12 @@ the above example, the first field of statistics would be 446216.
46By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll 44By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll
47find just the eleven fields, beginning with 446216. If you look at 45find just the eleven fields, beginning with 446216. If you look at
48/proc/diskstats, the eleven fields will be preceded by the major and 46/proc/diskstats, the eleven fields will be preceded by the major and
49minor device numbers, and device name. Each of these formats provide 47minor device numbers, and device name. Each of these formats provides
50eleven fields of statistics, each meaning exactly the same things. 48eleven fields of statistics, each meaning exactly the same things.
51All fields except field 9 are cumulative since boot. Field 9 should 49All fields except field 9 are cumulative since boot. Field 9 should
52go to zero as I/Os complete; all others only increase. Yes, these are 50go to zero as I/Os complete; all others only increase (unless they
5332 bit unsigned numbers, and on a very busy or long-lived system they 51overflow and wrap). Yes, these are (32-bit or 64-bit) unsigned long
52(native word size) numbers, and on a very busy or long-lived system they
54may wrap. Applications should be prepared to deal with that; unless 53may wrap. Applications should be prepared to deal with that; unless
55your observations are measured in large numbers of minutes or hours, 54your observations are measured in large numbers of minutes or hours,
56they should not wrap twice before you notice them. 55they should not wrap twice before you notice them.
@@ -96,11 +95,11 @@ introduced when changes collide, so (for instance) adding up all the
96read I/Os issued per partition should equal those made to the disks ... 95read I/Os issued per partition should equal those made to the disks ...
97but due to the lack of locking it may only be very close. 96but due to the lack of locking it may only be very close.
98 97
99In 2.6, there are counters for each cpu, which made the lack of locking 98In 2.6, there are counters for each CPU, which make the lack of locking
100almost a non-issue. When the statistics are read, the per-cpu counters 99almost a non-issue. When the statistics are read, the per-CPU counters
101are summed (possibly overflowing the unsigned 32-bit variable they are 100are summed (possibly overflowing the unsigned long variable they are
102summed to) and the result given to the user. There is no convenient 101summed to) and the result given to the user. There is no convenient
103user interface for accessing the per-cpu counters themselves. 102user interface for accessing the per-CPU counters themselves.
104 103
105Disks vs Partitions 104Disks vs Partitions
106------------------- 105-------------------
diff --git a/Documentation/irqflags-tracing.txt b/Documentation/irqflags-tracing.txt
index 6a444877ee0..67aa71e7303 100644
--- a/Documentation/irqflags-tracing.txt
+++ b/Documentation/irqflags-tracing.txt
@@ -53,5 +53,5 @@ implementation in an architecture: lockdep will detect that and will
53turn itself off. I.e. the lock validator will still be reliable. There 53turn itself off. I.e. the lock validator will still be reliable. There
54should be no crashes due to irq-tracing bugs. (except if the assembly 54should be no crashes due to irq-tracing bugs. (except if the assembly
55changes break other code by modifying conditions or registers that 55changes break other code by modifying conditions or registers that
56shouldnt be) 56shouldn't be)
57 57
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI
index 309eb5ed942..1688b5a1fd7 100644
--- a/Documentation/isdn/INTERFACE.CAPI
+++ b/Documentation/isdn/INTERFACE.CAPI
@@ -240,7 +240,7 @@ Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert
240messages between their transport encoding described in the CAPI 2.0 standard 240messages between their transport encoding described in the CAPI 2.0 standard
241and their _cmsg structure representation. Note that capi_cmsg2message() does 241and their _cmsg structure representation. Note that capi_cmsg2message() does
242not know or check the size of its destination buffer. The caller must make 242not know or check the size of its destination buffer. The caller must make
243sure it is big enough to accomodate the resulting CAPI message. 243sure it is big enough to accommodate the resulting CAPI message.
244 244
245 245
2465. Lower Layer Interface Functions 2465. Lower Layer Interface Functions
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO
index b63301a0381..050d37fe6d4 100644
--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a
11fork. So if you have any comments or updates for this file, please try 11fork. So if you have any comments or updates for this file, please try
12to update the original English file first. 12to update the original English file first.
13 13
14Last Updated: 2008/10/24 14Last Updated: 2011/03/31
15================================== 15==================================
16これは、 16これは、
17linux-2.6.28/Documentation/HOWTO 17linux-2.6.38/Documentation/HOWTO
18の和訳です。 18の和訳です。
19 19
20翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 20翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
21翻訳日: 2008/10/24 21翻訳日: 2011/3/28
22翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 22翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
23校正者: 松倉さん <nbh--mats at nifty dot com> 23校正者: 松倉さん <nbh--mats at nifty dot com>
24 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> 24 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
@@ -256,8 +256,8 @@ Linux カーネルの開発プロセスは現在幾つかの異なるメイン
256 - メインの 2.6.x カーネルツリー 256 - メインの 2.6.x カーネルツリー
257 - 2.6.x.y -stable カーネルツリー 257 - 2.6.x.y -stable カーネルツリー
258 - 2.6.x -git カーネルパッチ 258 - 2.6.x -git カーネルパッチ
259 - 2.6.x -mm カーネルパッチ
260 - サブシステム毎のカーネルツリーとパッチ 259 - サブシステム毎のカーネルツリーとパッチ
260 - 統合テストのための 2.6.x -next カーネルツリー
261 261
2622.6.x カーネルツリー 2622.6.x カーネルツリー
263----------------- 263-----------------
@@ -268,9 +268,9 @@ Linux カーネルの開発プロセスは現在幾つかの異なるメイン
268 268
269 - 新しいカーネルがリリースされた直後に、2週間の特別期間が設けられ、 269 - 新しいカーネルがリリースされた直後に、2週間の特別期間が設けられ、
270 この期間中に、メンテナ達は Linus に大きな差分を送ることができます。 270 この期間中に、メンテナ達は Linus に大きな差分を送ることができます。
271 このような差分は通常 -mm カーネルに数週間含まれてきたパッチです。 271 このような差分は通常 -next カーネルに数週間含まれてきたパッチです。
272 大きな変更は git(カーネルのソース管理ツール、詳細は 272 大きな変更は git(カーネルのソース管理ツール、詳細は
273 http://git.or.cz/ 参照) を使って送るのが好ましいやり方ですが、パッ 273 http://git-scm.com/ 参照) を使って送るのが好ましいやり方ですが、パッ
274 チファイルの形式のまま送るのでも十分です。 274 チファイルの形式のまま送るのでも十分です。
275 275
276 - 2週間後、-rc1 カーネルがリリースされ、この後にはカーネル全体の安定 276 - 2週間後、-rc1 カーネルがリリースされ、この後にはカーネル全体の安定
@@ -333,86 +333,44 @@ git リポジトリで管理されているLinus のカーネルツリーの毎
333れは -rc カーネルと比べて、パッチが大丈夫かどうかも確認しないで自動的 333れは -rc カーネルと比べて、パッチが大丈夫かどうかも確認しないで自動的
334に生成されるので、より実験的です。 334に生成されるので、より実験的です。
335 335
3362.6.x -mm カーネルパッチ
337------------------------
338
339Andrew Morton によってリリースされる実験的なカーネルパッチ群です。
340Andrew は個別のサブシステムカーネルツリーとパッチを全て集めてきて
341linux-kernel メーリングリストで収集された多数のパッチと同時に一つにま
342とめます。
343このツリーは新機能とパッチが検証される場となります。ある期間の間パッチ
344が -mm に入って価値を証明されたら、Andrew やサブシステムメンテナが、
345メインラインへ入れるように Linus にプッシュします。
346
347メインカーネルツリーに含めるために Linus に送る前に、すべての新しいパッ
348チが -mm ツリーでテストされることが強く推奨されています。マージウィン
349ドウが開く前に -mm ツリーに現れなかったパッチはメインラインにマージさ
350れることは困難になります。
351
352これらのカーネルは安定して動作すべきシステムとして使うのには適切ではあ
353りませんし、カーネルブランチの中でももっとも動作にリスクが高いものです。
354
355もしあなたが、カーネル開発プロセスの支援をしたいと思っているのであれば、
356どうぞこれらのカーネルリリースをテストに使ってみて、そしてもし問題があ
357れば、またもし全てが正しく動作したとしても、linux-kernel メーリングリ
358ストにフィードバックを提供してください。
359
360すべての他の実験的パッチに加えて、これらのカーネルは通常リリース時点で
361メインラインの -git カーネルに含まれる全ての変更も含んでいます。
362
363-mm カーネルは決まったスケジュールではリリースされません、しかし通常幾
364つかの -mm カーネル (1 から 3 が普通)が各-rc カーネルの間にリリースさ
365れます。
366
367サブシステム毎のカーネルツリーとパッチ 336サブシステム毎のカーネルツリーとパッチ
368------------------------------------------- 337-------------------------------------------
369 338
370カーネルの様々な領域で何が起きているかを見られるようにするため、多くの 339それぞれのカーネルサブシステムのメンテナ達は --- そして多くのカーネル
371カーネルサブシステム開発者は彼らの開発ツリーを公開しています。これらの 340サブシステムの開発者達も --- 各自の最新の開発状況をソースリポジトリに
372ツリーは説明したように -mm カーネルリリースに入れ込まれます。 341公開しています。そのため、自分とは異なる領域のカーネルで何が起きている
373 342かを他の人が見られるようになっています。開発が早く進んでいる領域では、
374以下はさまざまなカーネルツリーの中のいくつかのリスト- 343開発者は自身の投稿がどのサブシステムカーネルツリーを元にしているか質問
375 344されるので、その投稿とすでに進行中の他の作業との衝突が避けられます。
376 git ツリー- 345
377 - Kbuild の開発ツリー、Sam Ravnborg <sam@ravnborg.org> 346大部分のこれらのリポジトリは git ツリーです。しかしその他の SCM や
378 git.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git 347quilt シリーズとして公開されているパッチキューも使われています。これら
379 348のサブシステムリポジトリのアドレスは MAINTAINERS ファイルにリストされ
380 - ACPI の開発ツリー、 Len Brown <len.brown@intel.com> 349ています。これらの多くは http://git.kernel.org/ で参照することができま
381 git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git 350す。
382
383 - Block の開発ツリー、Jens Axboe <axboe@suse.de>
384 git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
385
386 - DRM の開発ツリー、Dave Airlie <airlied@linux.ie>
387 git.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git
388
389 - ia64 の開発ツリー、Tony Luck <tony.luck@intel.com>
390 git.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
391
392 - infiniband, Roland Dreier <rolandd@cisco.com>
393 git.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
394
395 - libata, Jeff Garzik <jgarzik@pobox.com>
396 git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
397
398 - ネットワークドライバ, Jeff Garzik <jgarzik@pobox.com>
399 git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
400
401 - pcmcia, Dominik Brodowski <linux@dominikbrodowski.net>
402 git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
403
404 - SCSI, James Bottomley <James.Bottomley@hansenpartnership.com>
405 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
406
407 - x86, Ingo Molnar <mingo@elte.hu>
408 git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
409
410 quilt ツリー-
411 - USB, ドライバコアと I2C, Greg Kroah-Hartman <gregkh@suse.de>
412 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
413 351
414 その他のカーネルツリーは http://git.kernel.org/ と MAINTAINERS ファ 352提案されたパッチがこのようなサブシステムツリーにコミットされる前に、メー
415 イルに一覧表があります。 353リングリストで事前にレビューにかけられます(以下の対応するセクションを
354参照)。いくつかのカーネルサブシステムでは、このレビューは patchwork
355というツールによって追跡されます。Patchwork は web インターフェイスに
356よってパッチ投稿の表示、パッチへのコメント付けや改訂などができ、そして
357メンテナはパッチに対して、レビュー中、受付済み、拒否というようなマーク
358をつけることができます。大部分のこれらの patchwork のサイトは
359http://patchwork.kernel.org/ でリストされています。
360
361統合テストのための 2.6.x -next カーネルツリー
362---------------------------------------------
363
364サブシステムツリーの更新内容がメインラインの 2.6.x ツリーにマージされ
365る前に、それらは統合テストされる必要があります。この目的のため、実質的
366に全サブシステムツリーからほぼ毎日プルされてできる特別なテスト用のリ
367ポジトリが存在します-
368 http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git
369 http://linux.f-seidel.de/linux-next/pmwiki/
370
371このやり方によって、-next カーネルは次のマージ機会でどんなものがメイン
372ラインカーネルにマージされるか、おおまかなの展望を提供します。-next
373カーネルの実行テストを行う冒険好きなテスターは大いに歓迎されます
416 374
417バグレポート 375バグレポート
418------------- 376-------------
@@ -673,10 +631,9 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を
673じところからスタートしたのですから。 631じところからスタートしたのですから。
674 632
675Paolo Ciarrocchi に感謝、彼は彼の書いた "Development Process" 633Paolo Ciarrocchi に感謝、彼は彼の書いた "Development Process"
676(http://linux.tar.bz/articles/2.6-development_process)セクショ 634(http://lwn.net/Articles/94386/) セクションをこのテキストの原型にする
677ンをこのテキストの原型にすることを許可してくれました。 635ことを許可してくれました。Rundy Dunlap と Gerrit Huizenga はメーリング
678Rundy Dunlap と Gerrit Huizenga はメーリングリストでやるべきこととやっ 636リストでやるべきこととやってはいけないことのリストを提供してくれました。
679てはいけないことのリストを提供してくれました。
680以下の人々のレビュー、コメント、貢献に感謝。 637以下の人々のレビュー、コメント、貢献に感謝。
681Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, 638Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
682Vojtech Pavlik, Jan Kara, Josh Boyer, Kees Cook, Andrew Morton, Andi 639Vojtech Pavlik, Jan Kara, Josh Boyer, Kees Cook, Andrew Morton, Andi
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 4a990317b84..68e32bb6bd8 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -26,11 +26,11 @@ Additional options to the assembler (for built-in and modules).
26 26
27AFLAGS_MODULE 27AFLAGS_MODULE
28-------------------------------------------------- 28--------------------------------------------------
29Addtional module specific options to use for $(AS). 29Additional module specific options to use for $(AS).
30 30
31AFLAGS_KERNEL 31AFLAGS_KERNEL
32-------------------------------------------------- 32--------------------------------------------------
33Addtional options for $(AS) when used for assembler 33Additional options for $(AS) when used for assembler
34code for code that is compiled as built-in. 34code for code that is compiled as built-in.
35 35
36KCFLAGS 36KCFLAGS
@@ -39,12 +39,12 @@ Additional options to the C compiler (for built-in and modules).
39 39
40CFLAGS_KERNEL 40CFLAGS_KERNEL
41-------------------------------------------------- 41--------------------------------------------------
42Addtional options for $(CC) when used to compile 42Additional options for $(CC) when used to compile
43code that is compiled as built-in. 43code that is compiled as built-in.
44 44
45CFLAGS_MODULE 45CFLAGS_MODULE
46-------------------------------------------------- 46--------------------------------------------------
47Addtional module specific options to use for $(CC). 47Additional module specific options to use for $(CC).
48 48
49LDFLAGS_MODULE 49LDFLAGS_MODULE
50-------------------------------------------------- 50--------------------------------------------------
@@ -146,7 +146,7 @@ INSTALL_MOD_STRIP
146INSTALL_MOD_STRIP, if defined, will cause modules to be 146INSTALL_MOD_STRIP, if defined, will cause modules to be
147stripped after they are installed. If INSTALL_MOD_STRIP is '1', then 147stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
148the default option --strip-debug will be used. Otherwise, 148the default option --strip-debug will be used. Otherwise,
149INSTALL_MOD_STRIP will used as the options to the strip command. 149INSTALL_MOD_STRIP value will be used as the options to the strip command.
150 150
151INSTALL_FW_PATH 151INSTALL_FW_PATH
152-------------------------------------------------- 152--------------------------------------------------
@@ -196,3 +196,21 @@ to be included in the databases, separated by blank space. E.g.:
196To get all available archs you can also specify all. E.g.: 196To get all available archs you can also specify all. E.g.:
197 197
198 $ make ALLSOURCE_ARCHS=all tags 198 $ make ALLSOURCE_ARCHS=all tags
199
200KBUILD_ENABLE_EXTRA_GCC_CHECKS
201--------------------------------------------------
202If enabled over the make command line with "W=1", it turns on additional
203gcc -W... options for more extensive build-time checking.
204
205KBUILD_BUILD_TIMESTAMP
206--------------------------------------------------
207Setting this to a date string overrides the timestamp used in the
208UTS_VERSION definition (uname -v in the running kernel). The value has to
209be a string that can be passed to date -d. The default value
210is the output of the date command at one point during build.
211
212KBUILD_BUILD_USER, KBUILD_BUILD_HOST
213--------------------------------------------------
214These two variables allow to override the user@host string displayed during
215boot and in /proc/version. The default value is the output of the commands
216whoami and host, respectively.
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index b507d61fd41..44e2649fbb2 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -113,6 +113,13 @@ applicable everywhere (see syntax).
113 That will limit the usefulness but on the other hand avoid 113 That will limit the usefulness but on the other hand avoid
114 the illegal configurations all over. 114 the illegal configurations all over.
115 115
116- limiting menu display: "visible if" <expr>
117 This attribute is only applicable to menu blocks, if the condition is
118 false, the menu block is not displayed to the user (the symbols
119 contained there can still be selected by other symbols, though). It is
120 similar to a conditional "prompt" attribude for individual menu
121 entries. Default value of "visible" is true.
122
116- numerical ranges: "range" <symbol> <symbol> ["if" <expr>] 123- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
117 This allows to limit the range of possible input values for int 124 This allows to limit the range of possible input values for int
118 and hex symbols. The user can only input a value which is larger than 125 and hex symbols. The user can only input a value which is larger than
@@ -303,7 +310,8 @@ menu:
303 "endmenu" 310 "endmenu"
304 311
305This defines a menu block, see "Menu structure" above for more 312This defines a menu block, see "Menu structure" above for more
306information. The only possible options are dependencies. 313information. The only possible options are dependencies and "visible"
314attributes.
307 315
308if: 316if:
309 317
@@ -381,3 +389,25 @@ config FOO
381 389
382limits FOO to module (=m) or disabled (=n). 390limits FOO to module (=m) or disabled (=n).
383 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 cca46b1a0f6..c313d71324b 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -48,11 +48,6 @@ KCONFIG_OVERWRITECONFIG
48If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not 48If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
49break symlinks when .config is a symlink to somewhere else. 49break symlinks when .config is a symlink to somewhere else.
50 50
51KCONFIG_NOTIMESTAMP
52--------------------------------------------------
53If this environment variable exists and is non-null, the timestamp line
54in generated .config files is omitted.
55
56______________________________________________________________________ 51______________________________________________________________________
57Environment variables for '{allyes/allmod/allno/rand}config' 52Environment variables for '{allyes/allmod/allno/rand}config'
58 53
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 86e3cd0d26a..47435e56c5d 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -40,11 +40,13 @@ This document describes the Linux kernel Makefiles.
40 --- 6.6 Commands useful for building a boot image 40 --- 6.6 Commands useful for building a boot image
41 --- 6.7 Custom kbuild commands 41 --- 6.7 Custom kbuild commands
42 --- 6.8 Preprocessing linker scripts 42 --- 6.8 Preprocessing linker scripts
43 --- 6.9 Generic header files
43 44
44 === 7 Kbuild syntax for exported headers 45 === 7 Kbuild syntax for exported headers
45 --- 7.1 header-y 46 --- 7.1 header-y
46 --- 7.2 objhdr-y 47 --- 7.2 objhdr-y
47 --- 7.3 destination-y 48 --- 7.3 destination-y
49 --- 7.4 generic-y
48 50
49 === 8 Kbuild Variables 51 === 8 Kbuild Variables
50 === 9 Makefile language 52 === 9 Makefile language
@@ -499,6 +501,18 @@ more details, with real examples.
499 gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. 501 gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
500 Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options 502 Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
501 503
504 cc-disable-warning
505 cc-disable-warning checks if gcc supports a given warning and returns
506 the commandline switch to disable it. This special function is needed,
507 because gcc 4.4 and later accept any unknown -Wno-* option and only
508 warn about it if there is another warning in the source file.
509
510 Example:
511 KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
512
513 In the above example, -Wno-unused-but-set-variable will be added to
514 KBUILD_CFLAGS only if gcc really accepts it.
515
502 cc-version 516 cc-version
503 cc-version returns a numerical version of the $(CC) compiler version. 517 cc-version returns a numerical version of the $(CC) compiler version.
504 The format is <major><minor> where both are two digits. So for example 518 The format is <major><minor> where both are two digits. So for example
@@ -955,6 +969,11 @@ When kbuild executes, the following steps are followed (roughly):
955 used when linking modules. This is often a linker script. 969 used when linking modules. This is often a linker script.
956 From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). 970 From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
957 971
972 KBUILD_ARFLAGS Options for $(AR) when creating archives
973
974 $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic
975 mode) if this option is supported by $(AR).
976
958--- 6.2 Add prerequisites to archprepare: 977--- 6.2 Add prerequisites to archprepare:
959 978
960 The archprepare: rule is used to list prerequisites that need to be 979 The archprepare: rule is used to list prerequisites that need to be
@@ -1209,6 +1228,14 @@ When kbuild executes, the following steps are followed (roughly):
1209 The kbuild infrastructure for *lds file are used in several 1228 The kbuild infrastructure for *lds file are used in several
1210 architecture-specific files. 1229 architecture-specific files.
1211 1230
1231--- 6.9 Generic header files
1232
1233 The directory include/asm-generic contains the header files
1234 that may be shared between individual architectures.
1235 The recommended approach how to use a generic header file is
1236 to list the file in the Kbuild file.
1237 See "7.4 generic-y" for further info on syntax etc.
1238
1212=== 7 Kbuild syntax for exported headers 1239=== 7 Kbuild syntax for exported headers
1213 1240
1214The kernel include a set of headers that is exported to userspace. 1241The kernel include a set of headers that is exported to userspace.
@@ -1265,6 +1292,32 @@ See subsequent chapter for the syntax of the Kbuild file.
1265 In the example above all exported headers in the Kbuild file 1292 In the example above all exported headers in the Kbuild file
1266 will be located in the directory "include/linux" when exported. 1293 will be located in the directory "include/linux" when exported.
1267 1294
1295 --- 7.4 generic-y
1296
1297 If an architecture uses a verbatim copy of a header from
1298 include/asm-generic then this is listed in the file
1299 arch/$(ARCH)/include/asm/Kbuild like this:
1300
1301 Example:
1302 #arch/x86/include/asm/Kbuild
1303 generic-y += termios.h
1304 generic-y += rtc.h
1305
1306 During the prepare phase of the build a wrapper include
1307 file is generated in the directory:
1308
1309 arch/$(ARCH)/include/generated/asm
1310
1311 When a header is exported where the architecture uses
1312 the generic header a similar wrapper is generated as part
1313 of the set of exported headers in the directory:
1314
1315 usr/include/asm
1316
1317 The generated wrapper will in both cases look like the following:
1318
1319 Example: termios.h
1320 #include <asm-generic/termios.h>
1268 1321
1269=== 8 Kbuild Variables 1322=== 8 Kbuild Variables
1270 1323
@@ -1325,7 +1378,8 @@ The top Makefile exports the following variables:
1325 If this variable is specified, will cause modules to be stripped 1378 If this variable is specified, will cause modules to be stripped
1326 after they are installed. If INSTALL_MOD_STRIP is '1', then the 1379 after they are installed. If INSTALL_MOD_STRIP is '1', then the
1327 default option --strip-debug will be used. Otherwise, 1380 default option --strip-debug will be used. Otherwise,
1328 INSTALL_MOD_STRIP will used as the option(s) to the strip command. 1381 INSTALL_MOD_STRIP value will be used as the option(s) to the strip
1382 command.
1329 1383
1330 1384
1331=== 9 Makefile language 1385=== 9 Makefile language
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f4a04c0c7ed..5438a2d7907 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -245,7 +245,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
245 245
246 acpi_sleep= [HW,ACPI] Sleep options 246 acpi_sleep= [HW,ACPI] Sleep options
247 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, 247 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
248 old_ordering, s4_nonvs, sci_force_enable } 248 old_ordering, nonvs, sci_force_enable }
249 See Documentation/power/video.txt for information on 249 See Documentation/power/video.txt for information on
250 s3_bios and s3_mode. 250 s3_bios and s3_mode.
251 s3_beep is for debugging; it makes the PC's speaker beep 251 s3_beep is for debugging; it makes the PC's speaker beep
@@ -626,6 +626,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
626 disable= [IPV6] 626 disable= [IPV6]
627 See Documentation/networking/ipv6.txt. 627 See Documentation/networking/ipv6.txt.
628 628
629 disable_ddw [PPC/PSERIES]
630 Disable Dynamic DMA Window support. Use this if
631 to workaround buggy firmware.
632
629 disable_ipv6= [IPV6] 633 disable_ipv6= [IPV6]
630 See Documentation/networking/ipv6.txt. 634 See Documentation/networking/ipv6.txt.
631 635
@@ -695,7 +699,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
695 ekgdboc= [X86,KGDB] Allow early kernel console debugging 699 ekgdboc= [X86,KGDB] Allow early kernel console debugging
696 ekgdboc=kbd 700 ekgdboc=kbd
697 701
698 This is desgined to be used in conjunction with 702 This is designed to be used in conjunction with
699 the boot argument: earlyprintk=vga 703 the boot argument: earlyprintk=vga
700 704
701 edd= [EDD] 705 edd= [EDD]
@@ -868,6 +872,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
868 If specified, z/VM IUCV HVC accepts connections 872 If specified, z/VM IUCV HVC accepts connections
869 from listed z/VM user IDs only. 873 from listed z/VM user IDs only.
870 874
875 keep_bootcon [KNL]
876 Do not unregister boot console at start. This is only
877 useful for debugging when something happens in the window
878 between unregistering the boot console and initializing
879 the real console.
880
871 i2c_bus= [HW] Override the default board specific I2C bus speed 881 i2c_bus= [HW] Override the default board specific I2C bus speed
872 or register an additional I2C bus that is not 882 or register an additional I2C bus that is not
873 registered from board initialization code. 883 registered from board initialization code.
@@ -1580,16 +1590,25 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1580 of returning the full 64-bit number. 1590 of returning the full 64-bit number.
1581 The default is to return 64-bit inode numbers. 1591 The default is to return 64-bit inode numbers.
1582 1592
1593 nfs.nfs4_disable_idmapping=
1594 [NFSv4] When set, this option disables the NFSv4
1595 idmapper on the client, but only if the mount
1596 is using the 'sec=sys' security flavour. This may
1597 make migration from legacy NFSv2/v3 systems easier
1598 provided that the server has the appropriate support.
1599 The default is to always enable NFSv4 idmapping.
1600
1583 nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take 1601 nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take
1584 when a NMI is triggered. 1602 when a NMI is triggered.
1585 Format: [state][,regs][,debounce][,die] 1603 Format: [state][,regs][,debounce][,die]
1586 1604
1587 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels 1605 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels
1588 Format: [panic,][num] 1606 Format: [panic,][nopanic,][num]
1589 Valid num: 0 1607 Valid num: 0
1590 0 - turn nmi_watchdog off 1608 0 - turn nmi_watchdog off
1591 When panic is specified, panic when an NMI watchdog 1609 When panic is specified, panic when an NMI watchdog
1592 timeout occurs. 1610 timeout occurs (or 'nopanic' to override the opposite
1611 default).
1593 This is useful when you use a panic=... timeout and 1612 This is useful when you use a panic=... timeout and
1594 need the box quickly up again. 1613 need the box quickly up again.
1595 1614
@@ -1645,6 +1664,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1645 noexec=on: enable non-executable mappings (default) 1664 noexec=on: enable non-executable mappings (default)
1646 noexec=off: disable non-executable mappings 1665 noexec=off: disable non-executable mappings
1647 1666
1667 nosmep [X86]
1668 Disable SMEP (Supervisor Mode Execution Protection)
1669 even if it is supported by processor.
1670
1648 noexec32 [X86-64] 1671 noexec32 [X86-64]
1649 This affects only 32-bit executables. 1672 This affects only 32-bit executables.
1650 noexec32=on: enable non-executable mappings (default) 1673 noexec32=on: enable non-executable mappings (default)
@@ -1754,9 +1777,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1754 1777
1755 nosoftlockup [KNL] Disable the soft-lockup detector. 1778 nosoftlockup [KNL] Disable the soft-lockup detector.
1756 1779
1757 noswapaccount [KNL] Disable accounting of swap in memory resource
1758 controller. (See Documentation/cgroups/memory.txt)
1759
1760 nosync [HW,M68K] Disables sync negotiation for all devices. 1780 nosync [HW,M68K] Disables sync negotiation for all devices.
1761 1781
1762 notsc [BUGS=X86-32] Disable Time Stamp Counter 1782 notsc [BUGS=X86-32] Disable Time Stamp Counter
@@ -1813,10 +1833,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1813 perfmon on Intel CPUs instead of the 1833 perfmon on Intel CPUs instead of the
1814 CPU specific event set. 1834 CPU specific event set.
1815 1835
1836 oops=panic Always panic on oopses. Default is to just kill the
1837 process, but there is a small probability of
1838 deadlocking the machine.
1839 This will also cause panics on machine check exceptions.
1840 Useful together with panic=30 to trigger a reboot.
1841
1816 OSS [HW,OSS] 1842 OSS [HW,OSS]
1817 See Documentation/sound/oss/oss-parameters.txt 1843 See Documentation/sound/oss/oss-parameters.txt
1818 1844
1819 panic= [KNL] Kernel behaviour on panic 1845 panic= [KNL] Kernel behaviour on panic: delay <timeout>
1846 seconds before rebooting
1820 Format: <timeout> 1847 Format: <timeout>
1821 1848
1822 parkbd.port= [HW] Parallel port number the keyboard adapter is 1849 parkbd.port= [HW] Parallel port number the keyboard adapter is
@@ -2319,6 +2346,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2319 2346
2320 softlockup_panic= 2347 softlockup_panic=
2321 [KNL] Should the soft-lockup detector generate panics. 2348 [KNL] Should the soft-lockup detector generate panics.
2349 Format: <integer>
2322 2350
2323 sonypi.*= [HW] Sony Programmable I/O Control Device driver 2351 sonypi.*= [HW] Sony Programmable I/O Control Device driver
2324 See Documentation/sonypi.txt 2352 See Documentation/sonypi.txt
@@ -2444,11 +2472,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2444 <deci-seconds>: poll all this frequency 2472 <deci-seconds>: poll all this frequency
2445 0: no polling (default) 2473 0: no polling (default)
2446 2474
2475 threadirqs [KNL]
2476 Force threading of all interrupt handlers except those
2477 marked explicitely IRQF_NO_THREAD.
2478
2447 topology= [S390] 2479 topology= [S390]
2448 Format: {off | on} 2480 Format: {off | on}
2449 Specify if the kernel should make use of the cpu 2481 Specify if the kernel should make use of the cpu
2450 topology informations if the hardware supports these. 2482 topology information if the hardware supports this.
2451 The scheduler will make use of these informations and 2483 The scheduler will make use of this information and
2452 e.g. base its process migration decisions on it. 2484 e.g. base its process migration decisions on it.
2453 Default is on. 2485 Default is on.
2454 2486
@@ -2501,8 +2533,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2501 reported either. 2533 reported either.
2502 2534
2503 unknown_nmi_panic 2535 unknown_nmi_panic
2504 [X86] 2536 [X86] Cause panic on unknown NMI.
2505 Set unknown_nmi_panic=1 early on boot.
2506 2537
2507 usbcore.autosuspend= 2538 usbcore.autosuspend=
2508 [USB] The autosuspend time delay (in seconds) used 2539 [USB] The autosuspend time delay (in seconds) used
@@ -2551,6 +2582,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2551 bytes of sense data); 2582 bytes of sense data);
2552 c = FIX_CAPACITY (decrease the reported 2583 c = FIX_CAPACITY (decrease the reported
2553 device capacity by one sector); 2584 device capacity by one sector);
2585 d = NO_READ_DISC_INFO (don't use
2586 READ_DISC_INFO command);
2587 e = NO_READ_CAPACITY_16 (don't use
2588 READ_CAPACITY_16 command);
2554 h = CAPACITY_HEURISTICS (decrease the 2589 h = CAPACITY_HEURISTICS (decrease the
2555 reported device capacity by one 2590 reported device capacity by one
2556 sector if the number is odd); 2591 sector if the number is odd);
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index 34f6638aa5a..090e6ee0453 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -11,6 +11,7 @@ with the difference that the orphan objects are not freed but only
11reported via /sys/kernel/debug/kmemleak. A similar method is used by the 11reported via /sys/kernel/debug/kmemleak. A similar method is used by the
12Valgrind tool (memcheck --leak-check) to detect the memory leaks in 12Valgrind tool (memcheck --leak-check) to detect the memory leaks in
13user-space applications. 13user-space applications.
14Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.
14 15
15Usage 16Usage
16----- 17-----
@@ -178,5 +179,4 @@ block doesn't need to be freed (some cases in the init_call functions),
178the pointer is calculated by other methods than the usual container_of 179the pointer is calculated by other methods than the usual container_of
179macro or the pointer is stored in a location not scanned by kmemleak. 180macro or the pointer is stored in a location not scanned by kmemleak.
180 181
181Page allocations and ioremap are not tracked. Only the ARM and x86 182Page allocations and ioremap are not tracked.
182architectures are currently supported.
diff --git a/Documentation/kref.txt b/Documentation/kref.txt
index ae203f91ee9..48ba715d5a6 100644
--- a/Documentation/kref.txt
+++ b/Documentation/kref.txt
@@ -156,7 +156,7 @@ static struct my_data *get_entry()
156 struct my_data *entry = NULL; 156 struct my_data *entry = NULL;
157 mutex_lock(&mutex); 157 mutex_lock(&mutex);
158 if (!list_empty(&q)) { 158 if (!list_empty(&q)) {
159 entry = container_of(q.next, struct my_q_entry, link); 159 entry = container_of(q.next, struct my_data, link);
160 kref_get(&entry->refcount); 160 kref_get(&entry->refcount);
161 } 161 }
162 mutex_unlock(&mutex); 162 mutex_unlock(&mutex);
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt
index c1c5be84e4b..803e51f6768 100644
--- a/Documentation/laptops/asus-laptop.txt
+++ b/Documentation/laptops/asus-laptop.txt
@@ -61,7 +61,7 @@ Usage
61 Hotkeys are also reported as input keys (like keyboards) you can check 61 Hotkeys are also reported as input keys (like keyboards) you can check
62 which key are supported using "xev" under X11. 62 which key are supported using "xev" under X11.
63 63
64 You can get informations on the version of your DSDT table by reading the 64 You can get information on the version of your DSDT table by reading the
65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a 65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
66 bug report to do, please include the output of this entry. 66 bug report to do, please include the output of this entry.
67 67
@@ -178,7 +178,7 @@ LED display
178----------- 178-----------
179 179
180 Some models like the W1N have a LED display that can be used to display 180 Some models like the W1N have a LED display that can be used to display
181 several informations. 181 several items of information.
182 182
183 LED display works for the following models: 183 LED display works for the following models:
184 W1000N 184 W1000N
diff --git a/Documentation/hwmon/hpfall.c b/Documentation/laptops/hpfall.c
index a4a8fc5d05d..a4a8fc5d05d 100644
--- a/Documentation/hwmon/hpfall.c
+++ b/Documentation/laptops/hpfall.c
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
index 23ce7d350d1..2bd4e82e5d9 100644
--- a/Documentation/laptops/sony-laptop.txt
+++ b/Documentation/laptops/sony-laptop.txt
@@ -14,7 +14,8 @@ Some models report hotkeys through the SNC or SPIC devices, such events are
14reported both through the ACPI subsystem as acpi events and through the INPUT 14reported both through the ACPI subsystem as acpi events and through the INPUT
15subsystem. See the logs of acpid or /proc/acpi/event and 15subsystem. See the logs of acpid or /proc/acpi/event and
16/proc/bus/input/devices to find out what those events are and which input 16/proc/bus/input/devices to find out what those events are and which input
17devices are created by the driver. 17devices are created by the driver. Additionally, loading the driver with the
18debug option will report all events in the kernel log.
18 19
19Backlight control: 20Backlight control:
20------------------ 21------------------
@@ -64,6 +65,16 @@ powers off the sound card,
64 # echo "1" > /sys/devices/platform/sony-laptop/audiopower 65 # echo "1" > /sys/devices/platform/sony-laptop/audiopower
65powers on the sound card. 66powers on the sound card.
66 67
68
69RFkill control:
70---------------
71More recent Vaio models expose a consistent set of ACPI methods to
72control radio frequency emitting devices. If you are a lucky owner of
73such a laptop you will find the necessary rfkill devices under
74/sys/class/rfkill. Check those starting with sony-* in
75 # grep . /sys/class/rfkill/*/{state,name}
76
77
67Development: 78Development:
68------------ 79------------
69 80
@@ -75,8 +86,21 @@ pass the option 'debug=1'.
75REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS. 86REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
76 87
77In your kernel logs you will find the list of all ACPI methods 88In your kernel logs you will find the list of all ACPI methods
78the SNC device has on your laptop. You can see the GCDP/GCDP methods 89the SNC device has on your laptop.
79used to pwer on/off the CD drive, but there are others. 90
91* For new models you will see a long list of meaningless method names,
92reading the DSDT table source should reveal that:
93(1) the SNC device uses an internal capability lookup table
94(2) SN00 is used to find values in the lookup table
95(3) SN06 and SN07 are used to call into the real methods based on
96 offsets you can obtain iterating the table using SN00
97(4) SN02 used to enable events.
98Some values in the capability lookup table are more or less known, see
99the code for all sony_call_snc_handle calls, others are more obscure.
100
101* For old models you can see the GCDP/GCDP methods used to pwer on/off
102the CD drive, but there are others and they are usually different from
103model to model.
80 104
81I HAVE NO IDEA WHAT THOSE METHODS DO. 105I HAVE NO IDEA WHAT THOSE METHODS DO.
82 106
@@ -108,9 +132,8 @@ Bugs/Limitations:
108 laptop, including permanent damage. 132 laptop, including permanent damage.
109 133
110* The sony-laptop and sonypi drivers do not interact at all. In the 134* The sony-laptop and sonypi drivers do not interact at all. In the
111 future, sonypi could use sony-laptop to do (part of) its business. 135 future, sonypi will be removed and replaced by sony-laptop.
112 136
113* spicctrl, which is the userspace tool used to communicate with the 137* spicctrl, which is the userspace tool used to communicate with the
114 sonypi driver (through /dev/sonypi) does not try to use the 138 sonypi driver (through /dev/sonypi) is deprecated as well since all
115 sony-laptop driver. In the future, spicctrl could try sonypi first, 139 its features are now available under the sysfs tree via sony-laptop.
116 and if it isn't present, try sony-laptop instead.
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
new file mode 100644
index 00000000000..29f481df32c
--- /dev/null
+++ b/Documentation/leds/00-INDEX
@@ -0,0 +1,8 @@
1leds-class.txt
2 - documents LED handling under Linux.
3leds-lp3944.txt
4 - notes on how to use the leds-lp3944 driver.
5leds-lp5521.txt
6 - notes on how to use the leds-lp5521 driver.
7leds-lp5523.txt
8 - notes on how to use the leds-lp5523 driver.
diff --git a/Documentation/leds-class.txt b/Documentation/leds/leds-class.txt
index 58b266bd184..4996586e27e 100644
--- a/Documentation/leds-class.txt
+++ b/Documentation/leds/leds-class.txt
@@ -95,4 +95,3 @@ There are a number of cases where a trigger might only be mappable to a
95particular LED (ACPI?). The addition of triggers provided by the LED driver 95particular LED (ACPI?). The addition of triggers provided by the LED driver
96should cover this option and be possible to add without breaking the 96should cover this option and be possible to add without breaking the
97current interface. 97current interface.
98
diff --git a/Documentation/leds-lp3944.txt b/Documentation/leds/leds-lp3944.txt
index c6eda18b15e..c6eda18b15e 100644
--- a/Documentation/leds-lp3944.txt
+++ b/Documentation/leds/leds-lp3944.txt
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index 65f4c795015..cef00d42ed5 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -12,8 +12,9 @@ Because things like lock contention can severely impact performance.
12- HOW 12- HOW
13 13
14Lockdep already has hooks in the lock functions and maps lock instances to 14Lockdep already has hooks in the lock functions and maps lock instances to
15lock classes. We build on that. The graph below shows the relation between 15lock classes. We build on that (see Documentation/lockdep-design.txt).
16the lock functions and the various hooks therein. 16The graph below shows the relation between the lock functions and the various
17hooks therein.
17 18
18 __acquire 19 __acquire
19 | 20 |
@@ -128,6 +129,37 @@ points are the points we're contending with.
128 129
129The integer part of the time values is in us. 130The integer part of the time values is in us.
130 131
132Dealing with nested locks, subclasses may appear:
133
13432...............................................................................................................................................................................................
13533
13634 &rq->lock: 13128 13128 0.43 190.53 103881.26 97454 3453404 0.00 401.11 13224683.11
13735 ---------
13836 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
13937 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
14038 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a
14139 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb
14240 ---------
14341 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
14442 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
14543 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
14644 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8
14745
14846...............................................................................................................................................................................................
14947
15048 &rq->lock/1: 11526 11488 0.33 388.73 136294.31 21461 38404 0.00 37.93 109388.53
15149 -----------
15250 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
15351 -----------
15452 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
15553 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8
15654 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
15755 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
158
159Line 48 shows statistics for the second subclass (/1) of &rq->lock class
160(subclass starts from 0), since in this case, as line 50 suggests,
161double_rq_lock actually acquires a nested lock of two spinlocks.
162
131View the top contending locks: 163View the top contending locks:
132 164
133# grep : /proc/lock_stat | head 165# grep : /proc/lock_stat | head
@@ -136,7 +168,7 @@ View the top contending locks:
136 dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24 168 dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24
137 &inode->i_mutex: 161 286 18446744073709 62882.54 1244614.55 3653 20598 18446744073709 62318.60 1693822.74 169 &inode->i_mutex: 161 286 18446744073709 62882.54 1244614.55 3653 20598 18446744073709 62318.60 1693822.74
138 &zone->lru_lock: 94 94 0.53 7.33 92.10 4366 32690 0.29 59.81 16350.06 170 &zone->lru_lock: 94 94 0.53 7.33 92.10 4366 32690 0.29 59.81 16350.06
139 &inode->i_data.i_mmap_lock: 79 79 0.40 3.77 53.03 11779 87755 0.28 116.93 29898.44 171 &inode->i_data.i_mmap_mutex: 79 79 0.40 3.77 53.03 11779 87755 0.28 116.93 29898.44
140 &q->__queue_lock: 48 50 0.52 31.62 86.31 774 13131 0.17 113.08 12277.52 172 &q->__queue_lock: 48 50 0.52 31.62 86.31 774 13131 0.17 113.08 12277.52
141 &rq->rq_lock_key: 43 47 0.74 68.50 170.63 3706 33929 0.22 107.99 17460.62 173 &rq->rq_lock_key: 43 47 0.74 68.50 170.63 3706 33929 0.22 107.99 17460.62
142 &rq->rq_lock_key#2: 39 46 0.75 6.68 49.03 2979 32292 0.17 125.17 17137.63 174 &rq->rq_lock_key#2: 39 46 0.75 6.68 49.03 2979 32292 0.17 125.17 17137.63
diff --git a/Documentation/md.txt b/Documentation/md.txt
index a81c7b4790f..2366b1c8cf1 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -552,6 +552,16 @@ also have
552 within the array where IO will be blocked. This is currently 552 within the array where IO will be blocked. This is currently
553 only supported for raid4/5/6. 553 only supported for raid4/5/6.
554 554
555 sync_min
556 sync_max
557 The two values, given as numbers of sectors, indicate a range
558 withing the array where 'check'/'repair' will operate. Must be
559 a multiple of chunk_size. When it reaches "sync_max" it will
560 pause, rather than complete.
561 You can use 'select' or 'poll' on "sync_completed" to wait for
562 that number to reach sync_max. Then you can either increase
563 "sync_max", or can write 'idle' to "sync_action".
564
555 565
556Each active md device may also have attributes specific to the 566Each active md device may also have attributes specific to the
557personality module that manages it. 567personality module that manages it.
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt
new file mode 100644
index 00000000000..76a2087db20
--- /dev/null
+++ b/Documentation/media-framework.txt
@@ -0,0 +1,353 @@
1Linux kernel media framework
2============================
3
4This document describes the Linux kernel media framework, its data structures,
5functions and their usage.
6
7
8Introduction
9------------
10
11The media controller API is documented in DocBook format in
12Documentation/DocBook/v4l/media-controller.xml. This document will focus on
13the kernel-side implementation of the media framework.
14
15
16Abstract media device model
17---------------------------
18
19Discovering a device internal topology, and configuring it at runtime, is one
20of the goals of the media framework. To achieve this, hardware devices are
21modeled as an oriented graph of building blocks called entities connected
22through pads.
23
24An entity is a basic media hardware building block. It can correspond to
25a large variety of logical blocks such as physical hardware devices
26(CMOS sensor for instance), logical hardware devices (a building block
27in a System-on-Chip image processing pipeline), DMA channels or physical
28connectors.
29
30A pad is a connection endpoint through which an entity can interact with
31other entities. Data (not restricted to video) produced by an entity
32flows from the entity's output to one or more entity inputs. Pads should
33not be confused with physical pins at chip boundaries.
34
35A link is a point-to-point oriented connection between two pads, either
36on the same entity or on different entities. Data flows from a source
37pad to a sink pad.
38
39
40Media device
41------------
42
43A media device is represented by a struct media_device instance, defined in
44include/media/media-device.h. Allocation of the structure is handled by the
45media device driver, usually by embedding the media_device instance in a
46larger driver-specific structure.
47
48Drivers register media device instances by calling
49
50 media_device_register(struct media_device *mdev);
51
52The caller is responsible for initializing the media_device structure before
53registration. The following fields must be set:
54
55 - dev must point to the parent device (usually a pci_dev, usb_interface or
56 platform_device instance).
57
58 - model must be filled with the device model name as a NUL-terminated UTF-8
59 string. The device/model revision must not be stored in this field.
60
61The following fields are optional:
62
63 - serial is a unique serial number stored as a NUL-terminated ASCII string.
64 The field is big enough to store a GUID in text form. If the hardware
65 doesn't provide a unique serial number this field must be left empty.
66
67 - bus_info represents the location of the device in the system as a
68 NUL-terminated ASCII string. For PCI/PCIe devices bus_info must be set to
69 "PCI:" (or "PCIe:") followed by the value of pci_name(). For USB devices,
70 the usb_make_path() function must be used. This field is used by
71 applications to distinguish between otherwise identical devices that don't
72 provide a serial number.
73
74 - hw_revision is the hardware device revision in a driver-specific format.
75 When possible the revision should be formatted with the KERNEL_VERSION
76 macro.
77
78 - driver_version is formatted with the KERNEL_VERSION macro. The version
79 minor must be incremented when new features are added to the userspace API
80 without breaking binary compatibility. The version major must be
81 incremented when binary compatibility is broken.
82
83Upon successful registration a character device named media[0-9]+ is created.
84The device major and minor numbers are dynamic. The model name is exported as
85a sysfs attribute.
86
87Drivers unregister media device instances by calling
88
89 media_device_unregister(struct media_device *mdev);
90
91Unregistering a media device that hasn't been registered is *NOT* safe.
92
93
94Entities, pads and links
95------------------------
96
97- Entities
98
99Entities are represented by a struct media_entity instance, defined in
100include/media/media-entity.h. The structure is usually embedded into a
101higher-level structure, such as a v4l2_subdev or video_device instance,
102although drivers can allocate entities directly.
103
104Drivers initialize entities by calling
105
106 media_entity_init(struct media_entity *entity, u16 num_pads,
107 struct media_pad *pads, u16 extra_links);
108
109The media_entity name, type, flags, revision and group_id fields can be
110initialized before or after calling media_entity_init. Entities embedded in
111higher-level standard structures can have some of those fields set by the
112higher-level framework.
113
114As the number of pads is known in advance, the pads array is not allocated
115dynamically but is managed by the entity driver. Most drivers will embed the
116pads array in a driver-specific structure, avoiding dynamic allocation.
117
118Drivers must set the direction of every pad in the pads array before calling
119media_entity_init. The function will initialize the other pads fields.
120
121Unlike the number of pads, the total number of links isn't always known in
122advance by the entity driver. As an initial estimate, media_entity_init
123pre-allocates a number of links equal to the number of pads plus an optional
124number of extra links. The links array will be reallocated if it grows beyond
125the initial estimate.
126
127Drivers register entities with a media device by calling
128
129 media_device_register_entity(struct media_device *mdev,
130 struct media_entity *entity);
131
132Entities are identified by a unique positive integer ID. Drivers can provide an
133ID by filling the media_entity id field prior to registration, or request the
134media controller framework to assign an ID automatically. Drivers that provide
135IDs manually must ensure that all IDs are unique. IDs are not guaranteed to be
136contiguous even when they are all assigned automatically by the framework.
137
138Drivers unregister entities by calling
139
140 media_device_unregister_entity(struct media_entity *entity);
141
142Unregistering an entity will not change the IDs of the other entities, and the
143ID will never be reused for a newly registered entity.
144
145When a media device is unregistered, all its entities are unregistered
146automatically. No manual entities unregistration is then required.
147
148Drivers free resources associated with an entity by calling
149
150 media_entity_cleanup(struct media_entity *entity);
151
152This function must be called during the cleanup phase after unregistering the
153entity. Note that the media_entity instance itself must be freed explicitly by
154the driver if required.
155
156Entities have flags that describe the entity capabilities and state.
157
158 MEDIA_ENT_FL_DEFAULT indicates the default entity for a given type.
159 This can be used to report the default audio and video devices or the
160 default camera sensor.
161
162Logical entity groups can be defined by setting the group ID of all member
163entities to the same non-zero value. An entity group serves no purpose in the
164kernel, but is reported to userspace during entities enumeration. The group_id
165field belongs to the media device driver and must not by touched by entity
166drivers.
167
168Media device drivers should define groups if several entities are logically
169bound together. Example usages include reporting
170
171 - ALSA, VBI and video nodes that carry the same media stream
172 - lens and flash controllers associated with a sensor
173
174- Pads
175
176Pads are represented by a struct media_pad instance, defined in
177include/media/media-entity.h. Each entity stores its pads in a pads array
178managed by the entity driver. Drivers usually embed the array in a
179driver-specific structure.
180
181Pads are identified by their entity and their 0-based index in the pads array.
182Both information are stored in the media_pad structure, making the media_pad
183pointer the canonical way to store and pass link references.
184
185Pads have flags that describe the pad capabilities and state.
186
187 MEDIA_PAD_FL_SINK indicates that the pad supports sinking data.
188 MEDIA_PAD_FL_SOURCE indicates that the pad supports sourcing data.
189
190One and only one of MEDIA_PAD_FL_SINK and MEDIA_PAD_FL_SOURCE must be set for
191each pad.
192
193- Links
194
195Links are represented by a struct media_link instance, defined in
196include/media/media-entity.h. Each entity stores all links originating at or
197targeting any of its pads in a links array. A given link is thus stored
198twice, once in the source entity and once in the target entity. The array is
199pre-allocated and grows dynamically as needed.
200
201Drivers create links by calling
202
203 media_entity_create_link(struct media_entity *source, u16 source_pad,
204 struct media_entity *sink, u16 sink_pad,
205 u32 flags);
206
207An entry in the link array of each entity is allocated and stores pointers
208to source and sink pads.
209
210Links have flags that describe the link capabilities and state.
211
212 MEDIA_LNK_FL_ENABLED indicates that the link is enabled and can be used
213 to transfer media data. When two or more links target a sink pad, only
214 one of them can be enabled at a time.
215 MEDIA_LNK_FL_IMMUTABLE indicates that the link enabled state can't be
216 modified at runtime. If MEDIA_LNK_FL_IMMUTABLE is set, then
217 MEDIA_LNK_FL_ENABLED must also be set since an immutable link is always
218 enabled.
219
220
221Graph traversal
222---------------
223
224The media framework provides APIs to iterate over entities in a graph.
225
226To iterate over all entities belonging to a media device, drivers can use the
227media_device_for_each_entity macro, defined in include/media/media-device.h.
228
229 struct media_entity *entity;
230
231 media_device_for_each_entity(entity, mdev) {
232 /* entity will point to each entity in turn */
233 ...
234 }
235
236Drivers might also need to iterate over all entities in a graph that can be
237reached only through enabled links starting at a given entity. The media
238framework provides a depth-first graph traversal API for that purpose.
239
240Note that graphs with cycles (whether directed or undirected) are *NOT*
241supported by the graph traversal API. To prevent infinite loops, the graph
242traversal code limits the maximum depth to MEDIA_ENTITY_ENUM_MAX_DEPTH,
243currently defined as 16.
244
245Drivers initiate a graph traversal by calling
246
247 media_entity_graph_walk_start(struct media_entity_graph *graph,
248 struct media_entity *entity);
249
250The graph structure, provided by the caller, is initialized to start graph
251traversal at the given entity.
252
253Drivers can then retrieve the next entity by calling
254
255 media_entity_graph_walk_next(struct media_entity_graph *graph);
256
257When the graph traversal is complete the function will return NULL.
258
259Graph traversal can be interrupted at any moment. No cleanup function call is
260required and the graph structure can be freed normally.
261
262Helper functions can be used to find a link between two given pads, or a pad
263connected to another pad through an enabled link
264
265 media_entity_find_link(struct media_pad *source,
266 struct media_pad *sink);
267
268 media_entity_remote_source(struct media_pad *pad);
269
270Refer to the kerneldoc documentation for more information.
271
272
273Use count and power handling
274----------------------------
275
276Due to the wide differences between drivers regarding power management needs,
277the media controller does not implement power management. However, the
278media_entity structure includes a use_count field that media drivers can use to
279track the number of users of every entity for power management needs.
280
281The use_count field is owned by media drivers and must not be touched by entity
282drivers. Access to the field must be protected by the media device graph_mutex
283lock.
284
285
286Links setup
287-----------
288
289Link properties can be modified at runtime by calling
290
291 media_entity_setup_link(struct media_link *link, u32 flags);
292
293The flags argument contains the requested new link flags.
294
295The only configurable property is the ENABLED link flag to enable/disable a
296link. Links marked with the IMMUTABLE link flag can not be enabled or disabled.
297
298When a link is enabled or disabled, the media framework calls the
299link_setup operation for the two entities at the source and sink of the link,
300in that order. If the second link_setup call fails, another link_setup call is
301made on the first entity to restore the original link flags.
302
303Media device drivers can be notified of link setup operations by setting the
304media_device::link_notify pointer to a callback function. If provided, the
305notification callback will be called before enabling and after disabling
306links.
307
308Entity drivers must implement the link_setup operation if any of their links
309is non-immutable. The operation must either configure the hardware or store
310the configuration information to be applied later.
311
312Link configuration must not have any side effect on other links. If an enabled
313link at a sink pad prevents another link at the same pad from being disabled,
314the link_setup operation must return -EBUSY and can't implicitly disable the
315first enabled link.
316
317
318Pipelines and media streams
319---------------------------
320
321When starting streaming, drivers must notify all entities in the pipeline to
322prevent link states from being modified during streaming by calling
323
324 media_entity_pipeline_start(struct media_entity *entity,
325 struct media_pipeline *pipe);
326
327The function will mark all entities connected to the given entity through
328enabled links, either directly or indirectly, as streaming.
329
330The media_pipeline instance pointed to by the pipe argument will be stored in
331every entity in the pipeline. Drivers should embed the media_pipeline structure
332in higher-level pipeline structures and can then access the pipeline through
333the media_entity pipe field.
334
335Calls to media_entity_pipeline_start() can be nested. The pipeline pointer must
336be identical for all nested calls to the function.
337
338When stopping the stream, drivers must notify the entities with
339
340 media_entity_pipeline_stop(struct media_entity *entity);
341
342If multiple calls to media_entity_pipeline_start() have been made the same
343number of media_entity_pipeline_stop() calls are required to stop streaming. The
344media_entity pipe field is reset to NULL on the last nested stop call.
345
346Link configuration will fail with -EBUSY by default if either end of the link is
347a streaming entity. Links that can be modified while streaming must be marked
348with the MEDIA_LNK_FL_DYNAMIC flag.
349
350If other operations need to be disallowed on streaming entities (such as
351changing entities configuration parameters) drivers can explicitly check the
352media_entity stream_count field to find out if an entity is streaming. This
353operation must be done with the media_device graph_mutex held.
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 631ad2f1b22..f0d3a8026a5 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -21,6 +21,7 @@ Contents:
21 - SMP barrier pairing. 21 - SMP barrier pairing.
22 - Examples of memory barrier sequences. 22 - Examples of memory barrier sequences.
23 - Read memory barriers vs load speculation. 23 - Read memory barriers vs load speculation.
24 - Transitivity
24 25
25 (*) Explicit kernel barriers. 26 (*) Explicit kernel barriers.
26 27
@@ -959,6 +960,63 @@ the speculation will be cancelled and the value reloaded:
959 retrieved : : +-------+ 960 retrieved : : +-------+
960 961
961 962
963TRANSITIVITY
964------------
965
966Transitivity is a deeply intuitive notion about ordering that is not
967always provided by real computer systems. The following example
968demonstrates transitivity (also called "cumulativity"):
969
970 CPU 1 CPU 2 CPU 3
971 ======================= ======================= =======================
972 { X = 0, Y = 0 }
973 STORE X=1 LOAD X STORE Y=1
974 <general barrier> <general barrier>
975 LOAD Y LOAD X
976
977Suppose that CPU 2's load from X returns 1 and its load from Y returns 0.
978This indicates that CPU 2's load from X in some sense follows CPU 1's
979store to X and that CPU 2's load from Y in some sense preceded CPU 3's
980store to Y. The question is then "Can CPU 3's load from X return 0?"
981
982Because CPU 2's load from X in some sense came after CPU 1's store, it
983is natural to expect that CPU 3's load from X must therefore return 1.
984This expectation is an example of transitivity: if a load executing on
985CPU A follows a load from the same variable executing on CPU B, then
986CPU A's load must either return the same value that CPU B's load did,
987or must return some later value.
988
989In the Linux kernel, use of general memory barriers guarantees
990transitivity. Therefore, in the above example, if CPU 2's load from X
991returns 1 and its load from Y returns 0, then CPU 3's load from X must
992also return 1.
993
994However, transitivity is -not- guaranteed for read or write barriers.
995For example, suppose that CPU 2's general barrier in the above example
996is changed to a read barrier as shown below:
997
998 CPU 1 CPU 2 CPU 3
999 ======================= ======================= =======================
1000 { X = 0, Y = 0 }
1001 STORE X=1 LOAD X STORE Y=1
1002 <read barrier> <general barrier>
1003 LOAD Y LOAD X
1004
1005This substitution destroys transitivity: in this example, it is perfectly
1006legal for CPU 2's load from X to return 1, its load from Y to return 0,
1007and CPU 3's load from X to return 0.
1008
1009The key point is that although CPU 2's read barrier orders its pair
1010of loads, it does not guarantee to order CPU 1's store. Therefore, if
1011this example runs on a system where CPUs 1 and 2 share a store buffer
1012or a level of cache, CPU 2 might have early access to CPU 1's writes.
1013General barriers are therefore required to ensure that all CPUs agree
1014on the combined order of CPU 1's and CPU 2's accesses.
1015
1016To reiterate, if your code requires transitivity, use general barriers
1017throughout.
1018
1019
962======================== 1020========================
963EXPLICIT KERNEL BARRIERS 1021EXPLICIT KERNEL BARRIERS
964======================== 1022========================
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 57e7e9cc187..8f485d72cf2 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -126,36 +126,51 @@ config options.
126-------------------------------- 126--------------------------------
1274 sysfs files for memory hotplug 1274 sysfs files for memory hotplug
128-------------------------------- 128--------------------------------
129All sections have their device information under /sys/devices/system/memory as 129All sections have their device information in sysfs. Each section is part of
130a memory block under /sys/devices/system/memory as
130 131
131/sys/devices/system/memory/memoryXXX 132/sys/devices/system/memory/memoryXXX
132(XXX is section id.) 133(XXX is the section id.)
133 134
134Now, XXX is defined as start_address_of_section / section_size. 135Now, XXX is defined as (start_address_of_section / section_size) of the first
136section contained in the memory block. The files 'phys_index' and
137'end_phys_index' under each directory report the beginning and end section id's
138for the memory block covered by the sysfs directory. It is expected that all
139memory sections in this range are present and no memory holes exist in the
140range. Currently there is no way to determine if there is a memory hole, but
141the existence of one should not affect the hotplug capabilities of the memory
142block.
135 143
136For example, assume 1GiB section size. A device for a memory starting at 144For example, assume 1GiB section size. A device for a memory starting at
1370x100000000 is /sys/device/system/memory/memory4 1450x100000000 is /sys/device/system/memory/memory4
138(0x100000000 / 1Gib = 4) 146(0x100000000 / 1Gib = 4)
139This device covers address range [0x100000000 ... 0x140000000) 147This device covers address range [0x100000000 ... 0x140000000)
140 148
141Under each section, you can see 4 files. 149Under each section, you can see 4 or 5 files, the end_phys_index file being
150a recent addition and not present on older kernels.
142 151
143/sys/devices/system/memory/memoryXXX/phys_index 152/sys/devices/system/memory/memoryXXX/start_phys_index
153/sys/devices/system/memory/memoryXXX/end_phys_index
144/sys/devices/system/memory/memoryXXX/phys_device 154/sys/devices/system/memory/memoryXXX/phys_device
145/sys/devices/system/memory/memoryXXX/state 155/sys/devices/system/memory/memoryXXX/state
146/sys/devices/system/memory/memoryXXX/removable 156/sys/devices/system/memory/memoryXXX/removable
147 157
148'phys_index' : read-only and contains section id, same as XXX. 158'phys_index' : read-only and contains section id of the first section
149'state' : read-write 159 in the memory block, same as XXX.
150 at read: contains online/offline state of memory. 160'end_phys_index' : read-only and contains section id of the last section
151 at write: user can specify "online", "offline" command 161 in the memory block.
152'phys_device': read-only: designed to show the name of physical memory device. 162'state' : read-write
153 This is not well implemented now. 163 at read: contains online/offline state of memory.
154'removable' : read-only: contains an integer value indicating 164 at write: user can specify "online", "offline" command
155 whether the memory section is removable or not 165 which will be performed on al sections in the block.
156 removable. A value of 1 indicates that the memory 166'phys_device' : read-only: designed to show the name of physical memory
157 section is removable and a value of 0 indicates that 167 device. This is not well implemented now.
158 it is not removable. 168'removable' : read-only: contains an integer value indicating
169 whether the memory block is removable or not
170 removable. A value of 1 indicates that the memory
171 block is removable and a value of 0 indicates that
172 it is not removable. A memory block is removable only if
173 every section in the block is removable.
159 174
160NOTE: 175NOTE:
161 These directories/files appear after physical memory hotplug phase. 176 These directories/files appear after physical memory hotplug phase.
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README
index 8ace35ebdcd..cc887ecfd6e 100644
--- a/Documentation/mips/AU1xxx_IDE.README
+++ b/Documentation/mips/AU1xxx_IDE.README
@@ -39,13 +39,13 @@ Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
39 Interface and Linux Device Driver" Application Note. 39 Interface and Linux Device Driver" Application Note.
40 40
41 41
42FILES, CONFIGS AND COMPATABILITY 42FILES, CONFIGS AND COMPATIBILITY
43-------------------------------- 43--------------------------------
44 44
45Two files are introduced: 45Two files are introduced:
46 46
47 a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h' 47 a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h'
48 containes : struct _auide_hwif 48 contains : struct _auide_hwif
49 timing parameters for PIO mode 0/1/2/3/4 49 timing parameters for PIO mode 0/1/2/3/4
50 timing parameters for MWDMA 0/1/2 50 timing parameters for MWDMA 0/1/2
51 51
diff --git a/Documentation/misc-devices/ics932s401 b/Documentation/misc-devices/ics932s401
index 07a739f406d..bdac67ff6e3 100644
--- a/Documentation/misc-devices/ics932s401
+++ b/Documentation/misc-devices/ics932s401
@@ -5,7 +5,7 @@ Supported chips:
5 * IDT ICS932S401 5 * IDT ICS932S401
6 Prefix: 'ics932s401' 6 Prefix: 'ics932s401'
7 Addresses scanned: I2C 0x69 7 Addresses scanned: I2C 0x69
8 Datasheet: Publically available at the IDT website 8 Datasheet: Publicly available at the IDT website
9 9
10Author: Darrick J. Wong 10Author: Darrick J. Wong
11 11
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/misc-devices/lis3lv02d
index 06534f25e64..f1a4ec840f8 100644
--- a/Documentation/hwmon/lis3lv02d
+++ b/Documentation/misc-devices/lis3lv02d
@@ -17,8 +17,8 @@ Description
17This driver provides support for the accelerometer found in various HP laptops 17This driver provides support for the accelerometer found in various HP laptops
18sporting the feature officially called "HP Mobile Data Protection System 3D" or 18sporting the feature officially called "HP Mobile Data Protection System 3D" or
19"HP 3D DriveGuard". It detects automatically laptops with this sensor. Known 19"HP 3D DriveGuard". It detects automatically laptops with this sensor. Known
20models (full list can be found in drivers/hwmon/hp_accel.c) will have their 20models (full list can be found in drivers/platform/x86/hp_accel.c) will have
21axis automatically oriented on standard way (eg: you can directly play 21their axis automatically oriented on standard way (eg: you can directly play
22neverball). The accelerometer data is readable via 22neverball). The accelerometer data is readable via
23/sys/devices/platform/lis3lv02d. Reported values are scaled 23/sys/devices/platform/lis3lv02d. Reported values are scaled
24to mg values (1/1000th of earth gravity). 24to mg values (1/1000th of earth gravity).
diff --git a/Documentation/misc-devices/spear-pcie-gadget.txt b/Documentation/misc-devices/spear-pcie-gadget.txt
new file mode 100644
index 00000000000..02c13ef5e90
--- /dev/null
+++ b/Documentation/misc-devices/spear-pcie-gadget.txt
@@ -0,0 +1,130 @@
1Spear PCIe Gadget Driver:
2
3Author
4=============
5Pratyush Anand (pratyush.anand@st.com)
6
7Location
8============
9driver/misc/spear13xx_pcie_gadget.c
10
11Supported Chip:
12===================
13SPEAr1300
14SPEAr1310
15
16Menuconfig option:
17==========================
18Device Drivers
19 Misc devices
20 PCIe gadget support for SPEAr13XX platform
21purpose
22===========
23This driver has several nodes which can be read/written by configfs interface.
24Its main purpose is to configure selected dual mode PCIe controller as device
25and then program its various registers to configure it as a particular device
26type. This driver can be used to show spear's PCIe device capability.
27
28Description of different nodes:
29=================================
30
31read behavior of nodes:
32------------------------------
33link :gives ltssm status.
34int_type :type of supported interrupt
35no_of_msi :zero if MSI is not enabled by host. A positive value is the
36 number of MSI vector granted.
37vendor_id :returns programmed vendor id (hex)
38device_id :returns programmed device id(hex)
39bar0_size: :returns size of bar0 in hex.
40bar0_address :returns address of bar0 mapped area in hex.
41bar0_rw_offset :returns offset of bar0 for which bar0_data will return value.
42bar0_data :returns data at bar0_rw_offset.
43
44write behavior of nodes:
45------------------------------
46link :write UP to enable ltsmm DOWN to disable
47int_type :write interrupt type to be configured and (int_type could be
48 INTA, MSI or NO_INT). Select MSI only when you have programmed
49 no_of_msi node.
50no_of_msi :number of MSI vector needed.
51inta :write 1 to assert INTA and 0 to de-assert.
52send_msi :write MSI vector to be sent.
53vendor_id :write vendor id(hex) to be programmed.
54device_id :write device id(hex) to be programmed.
55bar0_size :write size of bar0 in hex. default bar0 size is 1000 (hex)
56 bytes.
57bar0_address :write address of bar0 mapped area in hex. (default mapping of
58 bar0 is SYSRAM1(E0800000). Always program bar size before bar
59 address. Kernel might modify bar size and address for alignment, so
60 read back bar size and address after writing to cross check.
61bar0_rw_offset :write offset of bar0 for which bar0_data will write value.
62bar0_data :write data to be written at bar0_rw_offset.
63
64Node programming example
65===========================
66Program all PCIe registers in such a way that when this device is connected
67to the PCIe host, then host sees this device as 1MB RAM.
68#mount -t configfs none /Config
69For nth PCIe Device Controller
70# cd /config/pcie_gadget.n/
71Now you have all the nodes in this directory.
72program vendor id as 0x104a
73# echo 104A >> vendor_id
74
75program device id as 0xCD80
76# echo CD80 >> device_id
77
78program BAR0 size as 1MB
79# echo 100000 >> bar0_size
80
81check for programmed bar0 size
82# cat bar0_size
83
84Program BAR0 Address as DDR (0x2100000). This is the physical address of
85memory, which is to be made visible to PCIe host. Similarly any other peripheral
86can also be made visible to PCIe host. E.g., if you program base address of UART
87as BAR0 address then when this device will be connected to a host, it will be
88visible as UART.
89# echo 2100000 >> bar0_address
90
91program interrupt type : INTA
92# echo INTA >> int_type
93
94go for link up now.
95# echo UP >> link
96
97It will have to be insured that, once link up is done on gadget, then only host
98is initialized and start to search PCIe devices on its port.
99
100/*wait till link is up*/
101# cat link
102wait till it returns UP.
103
104To assert INTA
105# echo 1 >> inta
106
107To de-assert INTA
108# echo 0 >> inta
109
110if MSI is to be used as interrupt, program no of msi vector needed (say4)
111# echo 4 >> no_of_msi
112
113select MSI as interrupt type
114# echo MSI >> int_type
115
116go for link up now
117# echo UP >> link
118
119wait till link is up
120# cat link
121An application can repetitively read this node till link is found UP. It can
122sleep between two read.
123
124wait till msi is enabled
125# cat no_of_msi
126Should return 4 (number of requested MSI vector)
127
128to send msi vector 2
129# echo 2 >> send_msi
130#cd -
diff --git a/Documentation/mmc/00-INDEX b/Documentation/mmc/00-INDEX
index fca586f5b85..93dd7a71407 100644
--- a/Documentation/mmc/00-INDEX
+++ b/Documentation/mmc/00-INDEX
@@ -2,3 +2,5 @@
2 - this file 2 - this file
3mmc-dev-attrs.txt 3mmc-dev-attrs.txt
4 - info on SD and MMC device attributes 4 - info on SD and MMC device attributes
5mmc-dev-parts.txt
6 - info on SD and MMC device partitions
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index ff2bd685bce..8898a95b41e 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -1,3 +1,13 @@
1SD and MMC Block Device Attributes
2==================================
3
4These attributes are defined for the block devices associated with the
5SD or MMC device.
6
7The following attributes are read/write.
8
9 force_ro Enforce read-only access even if write protect switch is off.
10
1SD and MMC Device Attributes 11SD and MMC Device Attributes
2============================ 12============================
3 13
diff --git a/Documentation/mmc/mmc-dev-parts.txt b/Documentation/mmc/mmc-dev-parts.txt
new file mode 100644
index 00000000000..2db28b8e662
--- /dev/null
+++ b/Documentation/mmc/mmc-dev-parts.txt
@@ -0,0 +1,27 @@
1SD and MMC Device Partitions
2============================
3
4Device partitions are additional logical block devices present on the
5SD/MMC device.
6
7As of this writing, MMC boot partitions as supported and exposed as
8/dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
9parent /dev/mmcblkX.
10
11MMC Boot Partitions
12===================
13
14Read and write access is provided to the two MMC boot partitions. Due to
15the sensitive nature of the boot partition contents, which often store
16a bootloader or bootloader configuration tables crucial to booting the
17platform, write access is disabled by default to reduce the chance of
18accidental bricking.
19
20To enable write access to /dev/mmcblkXbootY, disable the forced read-only
21access with:
22
23echo 0 > /sys/block/mmcblkXbootY/force_ro
24
25To re-enable read-only access:
26
27echo 1 > /sys/block/mmcblkXbootY/force_ro
diff --git a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt
index 4af8071a6d1..dadfe8147ab 100644
--- a/Documentation/networking/3c359.txt
+++ b/Documentation/networking/3c359.txt
@@ -45,7 +45,7 @@ debugging messages on, that must be done by modified the source code.
45 45
46Variable MTU size: 46Variable MTU size:
47 47
48The driver can handle a MTU size upto either 4500 or 18000 depending upon 48The driver can handle a MTU size up to either 4500 or 18000 depending upon
49ring speed. The driver also changes the size of the receive buffers as part 49ring speed. The driver also changes the size of the receive buffers as part
50of the mtu re-sizing, so if you set mtu = 18000, you will need to be able 50of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
51to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 51to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200
index 616a8e540b0..b7658bed490 100644
--- a/Documentation/networking/README.ipw2200
+++ b/Documentation/networking/README.ipw2200
@@ -256,7 +256,7 @@ You can set the debug level via:
256 256
257Where $VALUE would be a number in the case of this sysfs entry. The 257Where $VALUE would be a number in the case of this sysfs entry. The
258input to sysfs files does not have to be a number. For example, the 258input to sysfs files does not have to be a number. For example, the
259firmware loader used by hotplug utilizes sysfs entries for transfering 259firmware loader used by hotplug utilizes sysfs entries for transferring
260the firmware image from user space into the driver. 260the firmware image from user space into the driver.
261 261
262The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries 262The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 77f0cdd5b0d..88d4afbdef9 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -1,4 +1,4 @@
1[state: 21-11-2010] 1[state: 17-04-2011]
2 2
3BATMAN-ADV 3BATMAN-ADV
4---------- 4----------
@@ -19,6 +19,7 @@ duce the overhead to a minimum. It does not depend on any (other)
19network driver, and can be used on wifi as well as ethernet lan, 19network driver, and can be used on wifi as well as ethernet lan,
20vpn, etc ... (anything with ethernet-style layer 2). 20vpn, etc ... (anything with ethernet-style layer 2).
21 21
22
22CONFIGURATION 23CONFIGURATION
23------------- 24-------------
24 25
@@ -67,15 +68,16 @@ All mesh wide settings can be found in batman's own interface
67folder: 68folder:
68 69
69# ls /sys/class/net/bat0/mesh/ 70# ls /sys/class/net/bat0/mesh/
70# aggregated_ogms bonding fragmentation orig_interval 71# aggregated_ogms gw_bandwidth hop_penalty
71# vis_mode 72# bonding gw_mode orig_interval
73# fragmentation gw_sel_class vis_mode
72 74
73 75
74There is a special folder for debugging informations: 76There is a special folder for debugging information:
75 77
76# ls /sys/kernel/debug/batman_adv/bat0/ 78# ls /sys/kernel/debug/batman_adv/bat0/
77# originators socket transtable_global transtable_local 79# gateways socket transtable_global vis_data
78# vis_data 80# originators softif_neigh transtable_local
79 81
80 82
81Some of the files contain all sort of status information regard- 83Some of the files contain all sort of status information regard-
@@ -159,13 +161,13 @@ face. Each entry can/has to have the following values:
159-> "TQ mac value" - src mac's link quality towards mac address 161-> "TQ mac value" - src mac's link quality towards mac address
160 of a neighbor originator's interface which 162 of a neighbor originator's interface which
161 is being used for routing 163 is being used for routing
162-> "HNA mac" - HNA announced by source mac 164-> "TT mac" - TT announced by source mac
163-> "PRIMARY" - this is a primary interface 165-> "PRIMARY" - this is a primary interface
164-> "SEC mac" - secondary mac address of source 166-> "SEC mac" - secondary mac address of source
165 (requires preceding PRIMARY) 167 (requires preceding PRIMARY)
166 168
167The TQ value has a range from 4 to 255 with 255 being the best. 169The TQ value has a range from 4 to 255 with 255 being the best.
168The HNA entries are showing which hosts are connected to the mesh 170The TT entries are showing which hosts are connected to the mesh
169via bat0 or being bridged into the mesh network. The PRIMARY/SEC 171via bat0 or being bridged into the mesh network. The PRIMARY/SEC
170values are only applied on primary interfaces 172values are only applied on primary interfaces
171 173
@@ -198,7 +200,7 @@ abled during run time. Following log_levels are defined:
198 200
1990 - All debug output disabled 2010 - All debug output disabled
2001 - Enable messages related to routing / flooding / broadcasting 2021 - Enable messages related to routing / flooding / broadcasting
2012 - Enable route or hna added / changed / deleted 2032 - Enable route or tt entry added / changed / deleted
2023 - Enable all messages 2043 - Enable all messages
203 205
204The debug output can be changed at runtime using the file 206The debug output can be changed at runtime using the file
@@ -206,7 +208,7 @@ The debug output can be changed at runtime using the file
206 208
207# echo 2 > /sys/class/net/bat0/mesh/log_level 209# echo 2 > /sys/class/net/bat0/mesh/log_level
208 210
209will enable debug messages for when routes or HNAs change. 211will enable debug messages for when routes or TTs change.
210 212
211 213
212BATCTL 214BATCTL
@@ -230,9 +232,8 @@ CONTACT
230Please send us comments, experiences, questions, anything :) 232Please send us comments, experiences, questions, anything :)
231 233
232IRC: #batman on irc.freenode.org 234IRC: #batman on irc.freenode.org
233Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org 235Mailing-list: b.a.t.m.a.n@open-mesh.org (optional subscription
234 (optional subscription at 236 at https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
235 https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
236 237
237You can also contact the Authors: 238You can also contact the Authors:
238 239
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 25d2f4141d2..675612ff41a 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -1,7 +1,7 @@
1 1
2 Linux Ethernet Bonding Driver HOWTO 2 Linux Ethernet Bonding Driver HOWTO
3 3
4 Latest update: 23 September 2009 4 Latest update: 27 April 2011
5 5
6Initial release : Thomas Davis <tadavis at lbl.gov> 6Initial release : Thomas Davis <tadavis at lbl.gov>
7Corrections, HA extensions : 2000/10/03-15 : 7Corrections, HA extensions : 2000/10/03-15 :
@@ -368,7 +368,7 @@ fail_over_mac
368 gratuitous ARP is lost, communication may be 368 gratuitous ARP is lost, communication may be
369 disrupted. 369 disrupted.
370 370
371 When this policy is used in conjuction with the mii 371 When this policy is used in conjunction with the mii
372 monitor, devices which assert link up prior to being 372 monitor, devices which assert link up prior to being
373 able to actually transmit and receive are particularly 373 able to actually transmit and receive are particularly
374 susceptible to loss of the gratuitous ARP, and an 374 susceptible to loss of the gratuitous ARP, and an
@@ -585,25 +585,23 @@ mode
585 chosen. 585 chosen.
586 586
587num_grat_arp 587num_grat_arp
588
589 Specifies the number of gratuitous ARPs to be issued after a
590 failover event. One gratuitous ARP is issued immediately after
591 the failover, subsequent ARPs are sent at a rate of one per link
592 monitor interval (arp_interval or miimon, whichever is active).
593
594 The valid range is 0 - 255; the default value is 1. This option
595 affects only the active-backup mode. This option was added for
596 bonding version 3.3.0.
597
598num_unsol_na 588num_unsol_na
599 589
600 Specifies the number of unsolicited IPv6 Neighbor Advertisements 590 Specify the number of peer notifications (gratuitous ARPs and
601 to be issued after a failover event. One unsolicited NA is issued 591 unsolicited IPv6 Neighbor Advertisements) to be issued after a
602 immediately after the failover. 592 failover event. As soon as the link is up on the new slave
593 (possibly immediately) a peer notification is sent on the
594 bonding device and each VLAN sub-device. This is repeated at
595 each link monitor interval (arp_interval or miimon, whichever
596 is active) if the number is greater than 1.
597
598 The valid range is 0 - 255; the default value is 1. These options
599 affect only the active-backup mode. These options were added for
600 bonding versions 3.3.0 and 3.4.0 respectively.
603 601
604 The valid range is 0 - 255; the default value is 1. This option 602 From Linux 2.6.40 and bonding version 3.7.1, these notifications
605 affects only the active-backup mode. This option was added for 603 are generated by the ipv4 and ipv6 code and the numbers of
606 bonding version 3.4.0. 604 repetitions cannot be set independently.
607 605
608primary 606primary
609 607
@@ -772,8 +770,17 @@ resend_igmp
772 a failover event. One membership report is issued immediately after 770 a failover event. One membership report is issued immediately after
773 the failover, subsequent packets are sent in each 200ms interval. 771 the failover, subsequent packets are sent in each 200ms interval.
774 772
775 The valid range is 0 - 255; the default value is 1. This option 773 The valid range is 0 - 255; the default value is 1. A value of 0
776 was added for bonding version 3.7.0. 774 prevents the IGMP membership report from being issued in response
775 to the failover event.
776
777 This option is useful for bonding modes balance-rr (0), active-backup
778 (1), balance-tlb (5) and balance-alb (6), in which a failover can
779 switch the IGMP traffic from one slave to another. Therefore a fresh
780 IGMP report must be issued to cause the switch to forward the incoming
781 IGMP traffic over the newly selected slave.
782
783 This option was added for bonding version 3.7.0.
777 784
7783. Configuring Bonding Devices 7853. Configuring Bonding Devices
779============================== 786==============================
@@ -2558,18 +2565,15 @@ enslaved.
255816. Resources and Links 256516. Resources and Links
2559======================= 2566=======================
2560 2567
2561The latest version of the bonding driver can be found in the latest 2568 The latest version of the bonding driver can be found in the latest
2562version of the linux kernel, found on http://kernel.org 2569version of the linux kernel, found on http://kernel.org
2563 2570
2564The latest version of this document can be found in either the latest 2571 The latest version of this document can be found in the latest kernel
2565kernel source (named Documentation/networking/bonding.txt), or on the 2572source (named Documentation/networking/bonding.txt).
2566bonding sourceforge site:
2567
2568http://www.sourceforge.net/projects/bonding
2569 2573
2570Discussions regarding the bonding driver take place primarily on the 2574 Discussions regarding the usage of the bonding driver take place on the
2571bonding-devel mailing list, hosted at sourceforge.net. If you have 2575bonding-devel mailing list, hosted at sourceforge.net. If you have questions or
2572questions or problems, post them to the list. The list address is: 2576problems, post them to the list. The list address is:
2573 2577
2574bonding-devel@lists.sourceforge.net 2578bonding-devel@lists.sourceforge.net
2575 2579
@@ -2578,6 +2582,17 @@ be found at:
2578 2582
2579https://lists.sourceforge.net/lists/listinfo/bonding-devel 2583https://lists.sourceforge.net/lists/listinfo/bonding-devel
2580 2584
2585 Discussions regarding the developpement of the bonding driver take place
2586on the main Linux network mailing list, hosted at vger.kernel.org. The list
2587address is:
2588
2589netdev@vger.kernel.org
2590
2591 The administrative interface (to subscribe or unsubscribe) can
2592be found at:
2593
2594http://vger.kernel.org/vger-lists.html#netdev
2595
2581Donald Becker's Ethernet Drivers and diag programs may be found at : 2596Donald Becker's Ethernet Drivers and diag programs may be found at :
2582 - http://web.archive.org/web/*/http://www.scyld.com/network/ 2597 - http://web.archive.org/web/*/http://www.scyld.com/network/
2583 2598
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt
index 7fe7a9a33a4..e52fd62bef3 100644
--- a/Documentation/networking/caif/Linux-CAIF.txt
+++ b/Documentation/networking/caif/Linux-CAIF.txt
@@ -136,7 +136,7 @@ The CAIF Protocol implementation contains:
136 - CFMUX CAIF Mux layer. Handles multiplexing between multiple 136 - CFMUX CAIF Mux layer. Handles multiplexing between multiple
137 physical bearers and multiple channels such as VEI, Datagram, etc. 137 physical bearers and multiple channels such as VEI, Datagram, etc.
138 The MUX keeps track of the existing CAIF Channels and 138 The MUX keeps track of the existing CAIF Channels and
139 Physical Instances and selects the apropriate instance based 139 Physical Instances and selects the appropriate instance based
140 on Channel-Id and Physical-ID. 140 on Channel-Id and Physical-ID.
141 141
142 - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length 142 - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt
index 0cb8cb9098f..9efd0687dc4 100644
--- a/Documentation/networking/caif/spi_porting.txt
+++ b/Documentation/networking/caif/spi_porting.txt
@@ -150,7 +150,7 @@ static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
150void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) 150void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
151{ 151{
152 /* If xfer is true then you should assert the SPI_INT to indicate to 152 /* If xfer is true then you should assert the SPI_INT to indicate to
153 * the master that you are ready to recieve the data from the master 153 * the master that you are ready to receive the data from the master
154 * SPI. If xfer is false then you should de-assert SPI_INT to indicate 154 * SPI. If xfer is false then you should de-assert SPI_INT to indicate
155 * that the transfer is done. 155 * that the transfer is done.
156 */ 156 */
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 5b04b67ddca..56ca3b75376 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -240,7 +240,7 @@ solution for a couple of reasons:
240 the user application using the common CAN filter mechanisms. Inside 240 the user application using the common CAN filter mechanisms. Inside
241 this filter definition the (interested) type of errors may be 241 this filter definition the (interested) type of errors may be
242 selected. The reception of error frames is disabled by default. 242 selected. The reception of error frames is disabled by default.
243 The format of the CAN error frame is briefly decribed in the Linux 243 The format of the CAN error frame is briefly described in the Linux
244 header file "include/linux/can/error.h". 244 header file "include/linux/can/error.h".
245 245
2464. How to use Socket CAN 2464. How to use Socket CAN
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt
index 04ca06325b0..7f531ad8328 100644
--- a/Documentation/networking/dns_resolver.txt
+++ b/Documentation/networking/dns_resolver.txt
@@ -139,8 +139,8 @@ the key will be discarded and recreated when the data it holds has expired.
139dns_query() returns a copy of the value attached to the key, or an error if 139dns_query() returns a copy of the value attached to the key, or an error if
140that is indicated instead. 140that is indicated instead.
141 141
142See <file:Documentation/keys-request-key.txt> for further information about 142See <file:Documentation/security/keys-request-key.txt> for further
143request-key function. 143information about request-key function.
144 144
145 145
146========= 146=========
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt
index 23c995e6403..f41ea240522 100644
--- a/Documentation/networking/ieee802154.txt
+++ b/Documentation/networking/ieee802154.txt
@@ -9,7 +9,7 @@ The Linux-ZigBee project goal is to provide complete implementation
9of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack 9of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack
10of protocols for organizing Low-Rate Wireless Personal Area Networks. 10of protocols for organizing Low-Rate Wireless Personal Area Networks.
11 11
12Currently only IEEE 802.15.4 layer is implemented. We have choosen 12Currently only IEEE 802.15.4 layer is implemented. We have chosen
13to use plain Berkeley socket API, the generic Linux networking stack 13to use plain Berkeley socket API, the generic Linux networking stack
14to transfer IEEE 802.15.4 messages and a special protocol over genetlink 14to transfer IEEE 802.15.4 messages and a special protocol over genetlink
15for configuration/management 15for configuration/management
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt
index 98953c0d534..9a2a037194a 100644
--- a/Documentation/networking/igb.txt
+++ b/Documentation/networking/igb.txt
@@ -93,6 +93,19 @@ Additional Configurations
93 REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not 93 REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not
94 found, the system will fallback to MSI or to Legacy interrupts. 94 found, the system will fallback to MSI or to Legacy interrupts.
95 95
96 MAC and VLAN anti-spoofing feature
97 ----------------------------------
98 When a malicious driver attempts to send a spoofed packet, it is dropped by
99 the hardware and not transmitted. An interrupt is sent to the PF driver
100 notifying it of the spoof attempt.
101
102 When a spoofed packet is detected the PF driver will send the following
103 message to the system log (displayed by the "dmesg" command):
104
105 Spoof event(s) detected on VF(n)
106
107 Where n=the VF that attempted to do the spoofing.
108
96Support 109Support
97======= 110=======
98 111
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index ac3b4a726a1..d3d653a5f9b 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -280,6 +280,17 @@ tcp_max_orphans - INTEGER
280 more aggressively. Let me to remind again: each orphan eats 280 more aggressively. Let me to remind again: each orphan eats
281 up to ~64K of unswappable memory. 281 up to ~64K of unswappable memory.
282 282
283tcp_max_ssthresh - INTEGER
284 Limited Slow-Start for TCP with large congestion windows (cwnd) defined in
285 RFC3742. Limited slow-start is a mechanism to limit growth of the cwnd
286 on the region where cwnd is larger than tcp_max_ssthresh. TCP increases cwnd
287 by at most tcp_max_ssthresh segments, and by at least tcp_max_ssthresh/2
288 segments per RTT when the cwnd is above tcp_max_ssthresh.
289 If TCP connection increased cwnd to thousands (or tens of thousands) segments,
290 and thousands of packets were being dropped during slow-start, you can set
291 tcp_max_ssthresh to improve performance for new TCP connection.
292 Default: 0 (off)
293
283tcp_max_syn_backlog - INTEGER 294tcp_max_syn_backlog - INTEGER
284 Maximal number of remembered connection requests, which are 295 Maximal number of remembered connection requests, which are
285 still did not receive an acknowledgment from connecting client. 296 still did not receive an acknowledgment from connecting client.
diff --git a/Documentation/networking/olympic.txt b/Documentation/networking/olympic.txt
index c65a94010ea..b95b5bf9675 100644
--- a/Documentation/networking/olympic.txt
+++ b/Documentation/networking/olympic.txt
@@ -65,7 +65,7 @@ together.
65 65
66Variable MTU size: 66Variable MTU size:
67 67
68The driver can handle a MTU size upto either 4500 or 18000 depending upon 68The driver can handle a MTU size up to either 4500 or 18000 depending upon
69ring speed. The driver also changes the size of the receive buffers as part 69ring speed. The driver also changes the size of the receive buffers as part
70of the mtu re-sizing, so if you set mtu = 18000, you will need to be able 70of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
71to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 71to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 073894d1c09..4acea660372 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -223,7 +223,7 @@ we will get the following buffer structure:
223 223
224A frame can be of any size with the only condition it can fit in a block. A block 224A frame can be of any size with the only condition it can fit in a block. A block
225can only hold an integer number of frames, or in other words, a frame cannot 225can only hold an integer number of frames, or in other words, a frame cannot
226be spawned accross two blocks, so there are some details you have to take into 226be 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 227account when choosing the frame_size. See "Mapping and use of the circular
228buffer (ring)". 228buffer (ring)".
229 229
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index 24ad2adba6e..81003581f47 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -154,9 +154,28 @@ connections, one per accept()'d socket.
154 write(cfd, msg, msglen); 154 write(cfd, msg, msglen);
155 } 155 }
156 156
157Connections are established between two endpoints by a "third party" 157Connections are traditionally established between two endpoints by a
158application. This means that both endpoints are passive; so connect() 158"third party" application. This means that both endpoints are passive.
159is not possible. 159
160
161As of Linux kernel version 2.6.39, it is also possible to connect
162two endpoints directly, using connect() on the active side. This is
163intended to support the newer Nokia Wireless Modem API, as found in
164e.g. the Nokia Slim Modem in the ST-Ericsson U8500 platform:
165
166 struct sockaddr_spn spn;
167 int fd;
168
169 fd = socket(PF_PHONET, SOCK_SEQPACKET, PN_PROTO_PIPE);
170 memset(&spn, 0, sizeof(spn));
171 spn.spn_family = AF_PHONET;
172 spn.spn_obj = ...;
173 spn.spn_dev = ...;
174 spn.spn_resource = 0xD9;
175 connect(fd, (struct sockaddr *)&spn, sizeof(spn));
176 /* normal I/O here ... */
177 close(fd);
178
160 179
161WARNING: 180WARNING:
162When polling a connected pipe socket for writability, there is an 181When polling a connected pipe socket for writability, there is an
@@ -181,45 +200,9 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
181 interface index of the network interface created by PNPIPE_ENCAP, 200 interface index of the network interface created by PNPIPE_ENCAP,
182 or zero if encapsulation is off. 201 or zero if encapsulation is off.
183 202
184 203 PNPIPE_HANDLE is a read-only integer value. It contains the underlying
185Phonet Pipe-controller Implementation 204 identifier ("pipe handle") of the pipe. This is only defined for
186------------------------------------- 205 socket descriptors that are already connected or being connected.
187
188Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig
189option. It is useful when communicating with those Nokia Modems which do not
190implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
191U8500 platform.
192
193The implementation is based on the Data Connection Establishment Sequence
194depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
195document.
196
197It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
198between itself and a remote pipe-end point (e.g. modem).
199
200The implementation adds socket options at SOL_PNPIPE level:
201
202 PNPIPE_PIPE_HANDLE
203 It accepts an integer argument for setting value of pipe handle.
204
205 PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe
206 is disabled. If the value is non-zero, the pipe is enabled. If the pipe
207 is not (yet) connected, ENOTCONN is error is returned.
208
209The implementation also adds socket 'connect'. On calling the 'connect', pipe
210will be created between the source socket and the destination, and the pipe
211state will be set to PIPE_DISABLED.
212
213After a pipe has been created and enabled successfully, the Pipe data can be
214exchanged between the host-pep and remote-pep (modem).
215
216User-space would typically follow below sequence with Pipe controller:-
217-socket
218-bind
219-setsockopt for PNPIPE_PIPE_HANDLE
220-connect
221-setsockopt for PNPIPE_ENCAP_IP
222-setsockopt for PNPIPE_ENABLE
223 206
224 207
225Authors 208Authors
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index 9d4e0f4df5a..4be0c039edb 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -37,7 +37,7 @@ To associate an interface with a physical adapter use "ethtool -p <ethX>".
37The corresponding adapter's LED will blink multiple times. 37The corresponding adapter's LED will blink multiple times.
38 38
393. Features supported: 393. Features supported:
40a. Jumbo frames. Xframe I/II supports MTU upto 9600 bytes, 40a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes,
41modifiable using ifconfig command. 41modifiable using ifconfig command.
42 42
43b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit 43b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
@@ -49,7 +49,7 @@ significant performance improvement on certain platforms(SGI Altix,
49IBM xSeries). 49IBM xSeries).
50 50
51d. MSI/MSI-X. Can be enabled on platforms which support this feature 51d. MSI/MSI-X. Can be enabled on platforms which support this feature
52(IA64, Xeon) resulting in noticeable performance improvement(upto 7% 52(IA64, Xeon) resulting in noticeable performance improvement(up to 7%
53on certain platforms). 53on certain platforms).
54 54
55e. Statistics. Comprehensive MAC-level and software statistics displayed 55e. Statistics. Comprehensive MAC-level and software statistics displayed
diff --git a/Documentation/networking/tc-actions-env-rules.txt b/Documentation/networking/tc-actions-env-rules.txt
index dcadf6f88e3..70d6cf60825 100644
--- a/Documentation/networking/tc-actions-env-rules.txt
+++ b/Documentation/networking/tc-actions-env-rules.txt
@@ -1,5 +1,5 @@
1 1
2The "enviromental" rules for authors of any new tc actions are: 2The "environmental" rules for authors of any new tc actions are:
3 3
41) If you stealeth or borroweth any packet thou shalt be branching 41) If you stealeth or borroweth any packet thou shalt be branching
5from the righteous path and thou shalt cloneth. 5from the righteous path and thou shalt cloneth.
@@ -20,7 +20,7 @@ this way any action downstream can stomp on the packet.
203) Dropping packets you don't own is a no-no. You simply return 203) Dropping packets you don't own is a no-no. You simply return
21TC_ACT_SHOT to the caller and they will drop it. 21TC_ACT_SHOT to the caller and they will drop it.
22 22
23The "enviromental" rules for callers of actions (qdiscs etc) are: 23The "environmental" rules for callers of actions (qdiscs etc) are:
24 24
25*) Thou art responsible for freeing anything returned as being 25*) Thou art responsible for freeing anything returned as being
26TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is 26TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 57080cd7457..88880839ece 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -1,6 +1,6 @@
1Device Power Management 1Device Power Management
2 2
3Copyright (c) 2010 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu> 4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu>
5 5
6 6
@@ -159,18 +159,18 @@ matter, and the kernel is responsible for keeping track of it. By contrast,
159whether or not a wakeup-capable device should issue wakeup events is a policy 159whether or not a wakeup-capable device should issue wakeup events is a policy
160decision, and it is managed by user space through a sysfs attribute: the 160decision, and it is managed by user space through a sysfs attribute: the
161power/wakeup file. User space can write the strings "enabled" or "disabled" to 161power/wakeup file. User space can write the strings "enabled" or "disabled" to
162set or clear the should_wakeup flag, respectively. Reads from the file will 162set or clear the "should_wakeup" flag, respectively. This file is only present
163return the corresponding string if can_wakeup is true, but if can_wakeup is 163for wakeup-capable devices (i.e. devices whose "can_wakeup" flags are set)
164false then reads will return an empty string, to indicate that the device 164and is created (or removed) by device_set_wakeup_capable(). Reads from the
165doesn't support wakeup events. (But even though the file appears empty, writes 165file will return the corresponding string.
166will still affect the should_wakeup flag.)
167 166
168The device_may_wakeup() routine returns true only if both flags are set. 167The device_may_wakeup() routine returns true only if both flags are set.
169Drivers should check this routine when putting devices in a low-power state 168This information is used by subsystems, like the PCI bus type code, to see
170during a system sleep transition, to see whether or not to enable the devices' 169whether or not to enable the devices' wakeup mechanisms. If device wakeup
171wakeup mechanisms. However for runtime power management, wakeup events should 170mechanisms are enabled or disabled directly by drivers, they also should use
172be enabled whenever the device and driver both support them, regardless of the 171device_may_wakeup() to decide what to do during a system sleep transition.
173should_wakeup flag. 172However for runtime power management, wakeup events should be enabled whenever
173the device and driver both support them, regardless of the should_wakeup flag.
174 174
175 175
176/sys/devices/.../power/control files 176/sys/devices/.../power/control files
@@ -249,23 +249,18 @@ various phases always run after tasks have been frozen and before they are
249unfrozen. Furthermore, the *_noirq phases run at a time when IRQ handlers have 249unfrozen. Furthermore, the *_noirq phases run at a time when IRQ handlers have
250been disabled (except for those marked with the IRQ_WAKEUP flag). 250been disabled (except for those marked with the IRQ_WAKEUP flag).
251 251
252Most phases use bus, type, and class callbacks (that is, methods defined in 252All phases use bus, type, or class callbacks (that is, methods defined in
253dev->bus->pm, dev->type->pm, and dev->class->pm). The prepare and complete 253dev->bus->pm, dev->type->pm, or dev->class->pm). These callbacks are mutually
254phases are exceptions; they use only bus callbacks. When multiple callbacks 254exclusive, so if the device type provides a struct dev_pm_ops object pointed to
255are used in a phase, they are invoked in the order: <class, type, bus> during 255by its pm field (i.e. both dev->type and dev->type->pm are defined), the
256power-down transitions and in the opposite order during power-up transitions. 256callbacks included in that object (i.e. dev->type->pm) will be used. Otherwise,
257For example, during the suspend phase the PM core invokes 257if the class provides a struct dev_pm_ops object pointed to by its pm field
258 258(i.e. both dev->class and dev->class->pm are defined), the PM core will use the
259 dev->class->pm.suspend(dev); 259callbacks from that object (i.e. dev->class->pm). Finally, if the pm fields of
260 dev->type->pm.suspend(dev); 260both the device type and class objects are NULL (or those objects do not exist),
261 dev->bus->pm.suspend(dev); 261the callbacks provided by the bus (that is, the callbacks from dev->bus->pm)
262 262will be used (this allows device types to override callbacks provided by bus
263before moving on to the next device, whereas during the resume phase the core 263types or classes if necessary).
264invokes
265
266 dev->bus->pm.resume(dev);
267 dev->type->pm.resume(dev);
268 dev->class->pm.resume(dev);
269 264
270These callbacks may in turn invoke device- or driver-specific methods stored in 265These callbacks may in turn invoke device- or driver-specific methods stored in
271dev->driver->pm, but they don't have to. 266dev->driver->pm, but they don't have to.
@@ -284,11 +279,15 @@ When the system goes into the standby or memory sleep state, the phases are:
284 time.) Unlike the other suspend-related phases, during the prepare 279 time.) Unlike the other suspend-related phases, during the prepare
285 phase the device tree is traversed top-down. 280 phase the device tree is traversed top-down.
286 281
287 The prepare phase uses only a bus callback. After the callback method 282 In addition to that, if device drivers need to allocate additional
288 returns, no new children may be registered below the device. The method 283 memory to be able to hadle device suspend correctly, that should be
289 may also prepare the device or driver in some way for the upcoming 284 done in the prepare phase.
290 system power transition, but it should not put the device into a 285
291 low-power state. 286 After the prepare callback method returns, no new children may be
287 registered below the device. The method may also prepare the device or
288 driver in some way for the upcoming system power transition (for
289 example, by allocating additional memory required for this purpose), but
290 it should not put the device into a low-power state.
292 291
293 2. The suspend methods should quiesce the device to stop it from performing 292 2. The suspend methods should quiesce the device to stop it from performing
294 I/O. They also may save the device registers and put it into the 293 I/O. They also may save the device registers and put it into the
@@ -372,7 +371,7 @@ Drivers need to be able to handle hardware which has been reset since the
372suspend methods were called, for example by complete reinitialization. 371suspend methods were called, for example by complete reinitialization.
373This may be the hardest part, and the one most protected by NDA'd documents 372This may be the hardest part, and the one most protected by NDA'd documents
374and chip errata. It's simplest if the hardware state hasn't changed since 373and chip errata. It's simplest if the hardware state hasn't changed since
375the suspend was carried out, but that can't be guaranteed (in fact, it ususally 374the suspend was carried out, but that can't be guaranteed (in fact, it usually
376is not the case). 375is not the case).
377 376
378Drivers must also be prepared to notice that the device has been removed 377Drivers must also be prepared to notice that the device has been removed
@@ -507,6 +506,49 @@ routines. Nevertheless, different callback pointers are used in case there is a
507situation where it actually matters. 506situation where it actually matters.
508 507
509 508
509Device Power Domains
510--------------------
511Sometimes devices share reference clocks or other power resources. In those
512cases it generally is not possible to put devices into low-power states
513individually. Instead, a set of devices sharing a power resource can be put
514into a low-power state together at the same time by turning off the shared
515power resource. Of course, they also need to be put into the full-power state
516together, by turning the shared power resource on. A set of devices with this
517property is often referred to as a power domain.
518
519Support for power domains is provided through the pwr_domain field of struct
520device. This field is a pointer to an object of type struct dev_power_domain,
521defined in include/linux/pm.h, providing a set of power management callbacks
522analogous to the subsystem-level and device driver callbacks that are executed
523for the given device during all power transitions, in addition to the respective
524subsystem-level callbacks. Specifically, the power domain "suspend" callbacks
525(i.e. ->runtime_suspend(), ->suspend(), ->freeze(), ->poweroff(), etc.) are
526executed after the analogous subsystem-level callbacks, while the power domain
527"resume" callbacks (i.e. ->runtime_resume(), ->resume(), ->thaw(), ->restore,
528etc.) are executed before the analogous subsystem-level callbacks. Error codes
529returned by the "suspend" and "resume" power domain callbacks are ignored.
530
531Power domain ->runtime_idle() callback is executed before the subsystem-level
532->runtime_idle() callback and the result returned by it is not ignored. Namely,
533if it returns error code, the subsystem-level ->runtime_idle() callback will not
534be called and the helper function rpm_idle() executing it will return error
535code. This mechanism is intended to help platforms where saving device state
536is a time consuming operation and should only be carried out if all devices
537in the power domain are idle, before turning off the shared power resource(s).
538Namely, the power domain ->runtime_idle() callback may return error code until
539the pm_runtime_idle() helper (or its asychronous version) has been called for
540all devices in the power domain (it is recommended that the returned error code
541be -EBUSY in those cases), preventing the subsystem-level ->runtime_idle()
542callback from being run prematurely.
543
544The support for device power domains is only relevant to platforms needing to
545use the same subsystem-level (e.g. platform bus type) and device driver power
546management callbacks in many different power domain configurations and wanting
547to avoid incorporating the support for power domains into the subsystem-level
548callbacks. The other platforms need not implement it or take it into account
549in any way.
550
551
510System Devices 552System Devices
511-------------- 553--------------
512System devices (sysdevs) follow a slightly different API, which can be found in 554System devices (sysdevs) follow a slightly different API, which can be found in
diff --git a/Documentation/power/notifiers.txt b/Documentation/power/notifiers.txt
index ae1b7ec0768..c2a4a346c0d 100644
--- a/Documentation/power/notifiers.txt
+++ b/Documentation/power/notifiers.txt
@@ -1,46 +1,41 @@
1Suspend notifiers 1Suspend notifiers
2 (C) 2007 Rafael J. Wysocki <rjw@sisk.pl>, GPL 2 (C) 2007-2011 Rafael J. Wysocki <rjw@sisk.pl>, GPL
3 3
4There are some operations that device drivers may want to carry out in their 4There are some operations that subsystems or drivers may want to carry out
5.suspend() routines, but shouldn't, because they can cause the hibernation or 5before hibernation/suspend or after restore/resume, but they require the system
6suspend to fail. For example, a driver may want to allocate a substantial amount 6to be fully functional, so the drivers' and subsystems' .suspend() and .resume()
7of memory (like 50 MB) in .suspend(), but that shouldn't be done after the 7or even .prepare() and .complete() callbacks are not suitable for this purpose.
8swsusp's memory shrinker has run. 8For example, device drivers may want to upload firmware to their devices after
9 9resume/restore, but they cannot do it by calling request_firmware() from their
10Also, there may be some operations, that subsystems want to carry out before a 10.resume() or .complete() routines (user land processes are frozen at these
11hibernation/suspend or after a restore/resume, requiring the system to be fully 11points). The solution may be to load the firmware into memory before processes
12functional, so the drivers' .suspend() and .resume() routines are not suitable 12are frozen and upload it from there in the .resume() routine.
13for this purpose. For example, device drivers may want to upload firmware to 13A suspend/hibernation notifier may be used for this purpose.
14their devices after a restore from a hibernation image, but they cannot do it by 14
15calling request_firmware() from their .resume() routines (user land processes 15The subsystems or drivers having such needs can register suspend notifiers that
16are frozen at this point). The solution may be to load the firmware into 16will be called upon the following events by the PM core:
17memory before processes are frozen and upload it from there in the .resume()
18routine. Of course, a hibernation notifier may be used for this purpose.
19
20The subsystems that have such needs can register suspend notifiers that will be
21called upon the following events by the suspend core:
22 17
23PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will 18PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will
24 be frozen immediately. 19 be frozen immediately.
25 20
26PM_POST_HIBERNATION The system memory state has been restored from a 21PM_POST_HIBERNATION The system memory state has been restored from a
27 hibernation image or an error occured during the 22 hibernation image or an error occurred during
28 hibernation. Device drivers' .resume() callbacks have 23 hibernation. Device drivers' restore callbacks have
29 been executed and tasks have been thawed. 24 been executed and tasks have been thawed.
30 25
31PM_RESTORE_PREPARE The system is going to restore a hibernation image. 26PM_RESTORE_PREPARE The system is going to restore a hibernation image.
32 If all goes well the restored kernel will issue a 27 If all goes well, the restored kernel will issue a
33 PM_POST_HIBERNATION notification. 28 PM_POST_HIBERNATION notification.
34 29
35PM_POST_RESTORE An error occurred during the hibernation restore. 30PM_POST_RESTORE An error occurred during restore from hibernation.
36 Device drivers' .resume() callbacks have been executed 31 Device drivers' restore callbacks have been executed
37 and tasks have been thawed. 32 and tasks have been thawed.
38 33
39PM_SUSPEND_PREPARE The system is preparing for a suspend. 34PM_SUSPEND_PREPARE The system is preparing for suspend.
40 35
41PM_POST_SUSPEND The system has just resumed or an error occured during 36PM_POST_SUSPEND The system has just resumed or an error occurred during
42 the suspend. Device drivers' .resume() callbacks have 37 suspend. Device drivers' resume callbacks have been
43 been executed and tasks have been thawed. 38 executed and tasks have been thawed.
44 39
45It is generally assumed that whatever the notifiers do for 40It is generally assumed that whatever the notifiers do for
46PM_HIBERNATION_PREPARE, should be undone for PM_POST_HIBERNATION. Analogously, 41PM_HIBERNATION_PREPARE, should be undone for PM_POST_HIBERNATION. Analogously,
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index cd445582d1f..5ae70a12c1e 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -178,7 +178,7 @@ opp_find_freq_ceil - Search for an available OPP which is *at least* the
178 if (!IS_ERR(opp)) 178 if (!IS_ERR(opp))
179 soc_switch_to_freq_voltage(freq); 179 soc_switch_to_freq_voltage(freq);
180 else 180 else
181 /* do something when we cant satisfy the req */ 181 /* do something when we can't satisfy the req */
182 /* do other stuff */ 182 /* do other stuff */
183 } 183 }
184 184
diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt
index bdec39b9bd7..b42419b52e4 100644
--- a/Documentation/power/regulator/machine.txt
+++ b/Documentation/power/regulator/machine.txt
@@ -53,11 +53,11 @@ static struct regulator_init_data regulator1_data = {
53 53
54Regulator-1 supplies power to Regulator-2. This relationship must be registered 54Regulator-1 supplies power to Regulator-2. This relationship must be registered
55with the core so that Regulator-1 is also enabled when Consumer A enables its 55with the core so that Regulator-1 is also enabled when Consumer A enables its
56supply (Regulator-2). The supply regulator is set by the supply_regulator_dev 56supply (Regulator-2). The supply regulator is set by the supply_regulator
57field below:- 57field below:-
58 58
59static struct regulator_init_data regulator2_data = { 59static struct regulator_init_data regulator2_data = {
60 .supply_regulator_dev = &platform_regulator1_device.dev, 60 .supply_regulator = "regulator_name",
61 .constraints = { 61 .constraints = {
62 .min_uV = 1800000, 62 .min_uV = 1800000,
63 .max_uV = 2000000, 63 .max_uV = 2000000,
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index ffe55ffa540..654097b130b 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -1,6 +1,6 @@
1Run-time Power Management Framework for I/O Devices 1Run-time Power Management Framework for I/O Devices
2 2
3(C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3(C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4(C) 2010 Alan Stern <stern@rowland.harvard.edu> 4(C) 2010 Alan Stern <stern@rowland.harvard.edu>
5 5
61. Introduction 61. Introduction
@@ -44,11 +44,12 @@ struct dev_pm_ops {
44}; 44};
45 45
46The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are 46The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are
47executed by the PM core for either the bus type, or device type (if the bus 47executed by the PM core for either the device type, or the class (if the device
48type's callback is not defined), or device class (if the bus type's and device 48type's struct dev_pm_ops object does not exist), or the bus type (if the
49type's callbacks are not defined) of given device. The bus type, device type 49device type's and class' struct dev_pm_ops objects do not exist) of the given
50and device class callbacks are referred to as subsystem-level callbacks in what 50device (this allows device types to override callbacks provided by bus types or
51follows. 51classes if necessary). The bus type, device type and class callbacks are
52referred to as subsystem-level callbacks in what follows.
52 53
53By default, the callbacks are always invoked in process context with interrupts 54By default, the callbacks are always invoked in process context with interrupts
54enabled. However, subsystems can use the pm_runtime_irq_safe() helper function 55enabled. However, subsystems can use the pm_runtime_irq_safe() helper function
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 34800cc521b..4416b28630d 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -62,12 +62,12 @@ setup via another operating system for it to use. Despite the
62inconvenience, this method requires minimal work by the kernel, since 62inconvenience, this method requires minimal work by the kernel, since
63the firmware will also handle restoring memory contents on resume. 63the firmware will also handle restoring memory contents on resume.
64 64
65For suspend-to-disk, a mechanism called swsusp called 'swsusp' (Swap 65For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
66Suspend) is used to write memory contents to free swap space. 66to write memory contents to free swap space. swsusp has some restrictive
67swsusp has some restrictive requirements, but should work in most 67requirements, but should work in most cases. Some, albeit outdated,
68cases. Some, albeit outdated, documentation can be found in 68documentation can be found in Documentation/power/swsusp.txt.
69Documentation/power/swsusp.txt. Alternatively, userspace can do most 69Alternatively, userspace can do most of the actual suspend to disk work,
70of the actual suspend to disk work, see userland-swsusp.txt. 70see userland-swsusp.txt.
71 71
72Once memory state is written to disk, the system may either enter a 72Once memory state is written to disk, the system may either enter a
73low-power state (like ACPI S4), or it may simply power down. Powering 73low-power state (like ACPI S4), or it may simply power down. Powering
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index ea718891a66..ac190cf1963 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -192,7 +192,7 @@ Q: There don't seem to be any generally useful behavioral
192distinctions between SUSPEND and FREEZE. 192distinctions between SUSPEND and FREEZE.
193 193
194A: Doing SUSPEND when you are asked to do FREEZE is always correct, 194A: Doing SUSPEND when you are asked to do FREEZE is always correct,
195but it may be unneccessarily slow. If you want your driver to stay simple, 195but it may be unnecessarily slow. If you want your driver to stay simple,
196slowness may not matter to you. It can always be fixed later. 196slowness may not matter to you. It can always be fixed later.
197 197
198For devices like disk it does matter, you do not want to spindown for 198For devices like disk it does matter, you do not want to spindown for
@@ -237,7 +237,7 @@ disk. Whole sequence goes like
237 237
238 running system, user asks for suspend-to-disk 238 running system, user asks for suspend-to-disk
239 239
240 user processes are stopped (in common case there are none, but with resume-from-initrd, noone knows) 240 user processes are stopped (in common case there are none, but with resume-from-initrd, no one knows)
241 241
242 read image from disk 242 read image from disk
243 243
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 81680f9f590..1101bee4e82 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -98,7 +98,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
98The device's read() operation can be used to transfer the snapshot image from 98The device's read() operation can be used to transfer the snapshot image from
99the kernel. It has the following limitations: 99the kernel. It has the following limitations:
100- you cannot read() more than one virtual memory page at a time 100- you cannot read() more than one virtual memory page at a time
101- read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of 101- read()s across page boundaries are impossible (ie. if ypu read() 1/2 of
102 a page in the previous call, you will only be able to read() 102 a page in the previous call, you will only be able to read()
103 _at_ _most_ 1/2 of the page in the next call) 103 _at_ _most_ 1/2 of the page in the next call)
104 104
@@ -137,7 +137,7 @@ mechanism and the userland utilities using the interface SHOULD use additional
137means, such as checksums, to ensure the integrity of the snapshot image. 137means, such as checksums, to ensure the integrity of the snapshot image.
138 138
139The suspending and resuming utilities MUST lock themselves in memory, 139The suspending and resuming utilities MUST lock themselves in memory,
140preferrably using mlockall(), before calling SNAPSHOT_FREEZE. 140preferably using mlockall(), before calling SNAPSHOT_FREEZE.
141 141
142The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE 142The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE
143in the memory location pointed to by the last argument of ioctl() and proceed 143in the memory location pointed to by the last argument of ioctl() and proceed
@@ -147,7 +147,7 @@ in accordance with it:
147 (a) The suspending utility MUST NOT close the snapshot device 147 (a) The suspending utility MUST NOT close the snapshot device
148 _unless_ the whole suspend procedure is to be cancelled, in 148 _unless_ the whole suspend procedure is to be cancelled, in
149 which case, if the snapshot image has already been saved, the 149 which case, if the snapshot image has already been saved, the
150 suspending utility SHOULD destroy it, preferrably by zapping 150 suspending utility SHOULD destroy it, preferably by zapping
151 its header. If the suspend is not to be cancelled, the 151 its header. If the suspend is not to be cancelled, the
152 system MUST be powered off or rebooted after the snapshot 152 system MUST be powered off or rebooted after the snapshot
153 image has been saved. 153 image has been saved.
diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
index e3960b8c868..5620fb5ac42 100644
--- a/Documentation/powerpc/00-INDEX
+++ b/Documentation/powerpc/00-INDEX
@@ -5,8 +5,6 @@ please mail me.
5 5
600-INDEX 600-INDEX
7 - this file 7 - this file
8booting-without-of.txt
9 - Booting the Linux/ppc kernel without Open Firmware
10cpu_features.txt 8cpu_features.txt
11 - info on how we support a variety of CPUs with minimal compile-time 9 - info on how we support a variety of CPUs with minimal compile-time
12 options. 10 options.
@@ -16,8 +14,6 @@ hvcs.txt
16 - IBM "Hypervisor Virtual Console Server" Installation Guide 14 - IBM "Hypervisor Virtual Console Server" Installation Guide
17mpc52xx.txt 15mpc52xx.txt
18 - Linux 2.6.x on MPC52xx family 16 - Linux 2.6.x on MPC52xx family
19mpc52xx-device-tree-bindings.txt
20 - MPC5200 Device Tree Bindings
21sound.txt 17sound.txt
22 - info on sound support under Linux/PPC 18 - info on sound support under Linux/PPC
23zImage_layout.txt 19zImage_layout.txt
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt
index 6d8be3468d7..a730ca5a07f 100644
--- a/Documentation/powerpc/hvcs.txt
+++ b/Documentation/powerpc/hvcs.txt
@@ -528,7 +528,7 @@ this driver assignment of hotplug added vty-servers may be in a different
528order than how they would be exposed on module load. Rebooting or 528order than how they would be exposed on module load. Rebooting or
529reloading the module after dynamic addition may result in the /dev/hvcs* 529reloading the module after dynamic addition may result in the /dev/hvcs*
530and vty-server coupling changing if a vty-server adapter was added in a 530and vty-server coupling changing if a vty-server adapter was added in a
531slot inbetween two other vty-server adapters. Refer to the section above 531slot between two other vty-server adapters. Refer to the section above
532on how to determine which vty-server goes with which /dev/hvcs* node. 532on how to determine which vty-server goes with which /dev/hvcs* node.
533Hint; look at the sysfs "index" attribute for the vty-server. 533Hint; look at the sysfs "index" attribute for the vty-server.
534 534
diff --git a/Documentation/pti/pti_intel_mid.txt b/Documentation/pti/pti_intel_mid.txt
new file mode 100644
index 00000000000..e7a5b6d1f7a
--- /dev/null
+++ b/Documentation/pti/pti_intel_mid.txt
@@ -0,0 +1,99 @@
1The Intel MID PTI project is HW implemented in Intel Atom
2system-on-a-chip designs based on the Parallel Trace
3Interface for MIPI P1149.7 cJTAG standard. The kernel solution
4for this platform involves the following files:
5
6./include/linux/pti.h
7./drivers/.../n_tracesink.h
8./drivers/.../n_tracerouter.c
9./drivers/.../n_tracesink.c
10./drivers/.../pti.c
11
12pti.c is the driver that enables various debugging features
13popular on platforms from certain mobile manufacturers.
14n_tracerouter.c and n_tracesink.c allow extra system information to
15be collected and routed to the pti driver, such as trace
16debugging data from a modem. Although n_tracerouter
17and n_tracesink are a part of the complete PTI solution,
18these two line disciplines can work separately from
19pti.c and route any data stream from one /dev/tty node
20to another /dev/tty node via kernel-space. This provides
21a stable, reliable connection that will not break unless
22the user-space application shuts down (plus avoids
23kernel->user->kernel context switch overheads of routing
24data).
25
26An example debugging usage for this driver system:
27 *Hook /dev/ttyPTI0 to syslogd. Opening this port will also start
28 a console device to further capture debugging messages to PTI.
29 *Hook /dev/ttyPTI1 to modem debugging data to write to PTI HW.
30 This is where n_tracerouter and n_tracesink are used.
31 *Hook /dev/pti to a user-level debugging application for writing
32 to PTI HW.
33 *Use mipi_* Kernel Driver API in other device drivers for
34 debugging to PTI by first requesting a PTI write address via
35 mipi_request_masterchannel(1).
36
37Below is example pseudo-code on how a 'privileged' application
38can hook up n_tracerouter and n_tracesink to any tty on
39a system. 'Privileged' means the application has enough
40privileges to successfully manipulate the ldisc drivers
41but is not just blindly executing as 'root'. Keep in mind
42the use of ioctl(,TIOCSETD,) is not specific to the n_tracerouter
43and n_tracesink line discpline drivers but is a generic
44operation for a program to use a line discpline driver
45on a tty port other than the default n_tty.
46
47/////////// To hook up n_tracerouter and n_tracesink /////////
48
49// Note that n_tracerouter depends on n_tracesink.
50#include <errno.h>
51#define ONE_TTY "/dev/ttyOne"
52#define TWO_TTY "/dev/ttyTwo"
53
54// needed global to hand onto ldisc connection
55static int g_fd_source = -1;
56static int g_fd_sink = -1;
57
58// these two vars used to grab LDISC values from loaded ldisc drivers
59// in OS. Look at /proc/tty/ldiscs to get the right numbers from
60// the ldiscs loaded in the system.
61int source_ldisc_num, sink_ldisc_num = -1;
62int retval;
63
64g_fd_source = open(ONE_TTY, O_RDWR); // must be R/W
65g_fd_sink = open(TWO_TTY, O_RDWR); // must be R/W
66
67if (g_fd_source <= 0) || (g_fd_sink <= 0) {
68 // doubt you'll want to use these exact error lines of code
69 printf("Error on open(). errno: %d\n",errno);
70 return errno;
71}
72
73retval = ioctl(g_fd_sink, TIOCSETD, &sink_ldisc_num);
74if (retval < 0) {
75 printf("Error on ioctl(). errno: %d\n", errno);
76 return errno;
77}
78
79retval = ioctl(g_fd_source, TIOCSETD, &source_ldisc_num);
80if (retval < 0) {
81 printf("Error on ioctl(). errno: %d\n", errno);
82 return errno;
83}
84
85/////////// To disconnect n_tracerouter and n_tracesink ////////
86
87// First make sure data through the ldiscs has stopped.
88
89// Second, disconnect ldiscs. This provides a
90// little cleaner shutdown on tty stack.
91sink_ldisc_num = 0;
92source_ldisc_num = 0;
93ioctl(g_fd_uart, TIOCSETD, &sink_ldisc_num);
94ioctl(g_fd_gadget, TIOCSETD, &source_ldisc_num);
95
96// Three, program closes connection, and cleanup:
97close(g_fd_uart);
98close(g_fd_gadget);
99g_fd_uart = g_fd_gadget = NULL;
diff --git a/Documentation/ptp/ptp.txt b/Documentation/ptp/ptp.txt
new file mode 100644
index 00000000000..ae8fef86b83
--- /dev/null
+++ b/Documentation/ptp/ptp.txt
@@ -0,0 +1,89 @@
1
2* PTP hardware clock infrastructure for Linux
3
4 This patch set introduces support for IEEE 1588 PTP clocks in
5 Linux. Together with the SO_TIMESTAMPING socket options, this
6 presents a standardized method for developing PTP user space
7 programs, synchronizing Linux with external clocks, and using the
8 ancillary features of PTP hardware clocks.
9
10 A new class driver exports a kernel interface for specific clock
11 drivers and a user space interface. The infrastructure supports a
12 complete set of PTP hardware clock functionality.
13
14 + Basic clock operations
15 - Set time
16 - Get time
17 - Shift the clock by a given offset atomically
18 - Adjust clock frequency
19
20 + Ancillary clock features
21 - One short or periodic alarms, with signal delivery to user program
22 - Time stamp external events
23 - Period output signals configurable from user space
24 - Synchronization of the Linux system time via the PPS subsystem
25
26** PTP hardware clock kernel API
27
28 A PTP clock driver registers itself with the class driver. The
29 class driver handles all of the dealings with user space. The
30 author of a clock driver need only implement the details of
31 programming the clock hardware. The clock driver notifies the class
32 driver of asynchronous events (alarms and external time stamps) via
33 a simple message passing interface.
34
35 The class driver supports multiple PTP clock drivers. In normal use
36 cases, only one PTP clock is needed. However, for testing and
37 development, it can be useful to have more than one clock in a
38 single system, in order to allow performance comparisons.
39
40** PTP hardware clock user space API
41
42 The class driver also creates a character device for each
43 registered clock. User space can use an open file descriptor from
44 the character device as a POSIX clock id and may call
45 clock_gettime, clock_settime, and clock_adjtime. These calls
46 implement the basic clock operations.
47
48 User space programs may control the clock using standardized
49 ioctls. A program may query, enable, configure, and disable the
50 ancillary clock features. User space can receive time stamped
51 events via blocking read() and poll(). One shot and periodic
52 signals may be configured via the POSIX timer_settime() system
53 call.
54
55** Writing clock drivers
56
57 Clock drivers include include/linux/ptp_clock_kernel.h and register
58 themselves by presenting a 'struct ptp_clock_info' to the
59 registration method. Clock drivers must implement all of the
60 functions in the interface. If a clock does not offer a particular
61 ancillary feature, then the driver should just return -EOPNOTSUPP
62 from those functions.
63
64 Drivers must ensure that all of the methods in interface are
65 reentrant. Since most hardware implementations treat the time value
66 as a 64 bit integer accessed as two 32 bit registers, drivers
67 should use spin_lock_irqsave/spin_unlock_irqrestore to protect
68 against concurrent access. This locking cannot be accomplished in
69 class driver, since the lock may also be needed by the clock
70 driver's interrupt service routine.
71
72** Supported hardware
73
74 + Freescale eTSEC gianfar
75 - 2 Time stamp external triggers, programmable polarity (opt. interrupt)
76 - 2 Alarm registers (optional interrupt)
77 - 3 Periodic signals (optional interrupt)
78
79 + National DP83640
80 - 6 GPIOs programmable as inputs or outputs
81 - 6 GPIOs with dedicated functions (LED/JTAG/clock) can also be
82 used as general inputs or outputs
83 - GPIO inputs can time stamp external triggers
84 - GPIO outputs can produce periodic signals
85 - 1 interrupt pin
86
87 + Intel IXP465
88 - Auxiliary Slave/Master Mode Snapshot (optional interrupt)
89 - Target Time (optional interrupt)
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
new file mode 100644
index 00000000000..f59ded06610
--- /dev/null
+++ b/Documentation/ptp/testptp.c
@@ -0,0 +1,381 @@
1/*
2 * PTP 1588 clock support - User space test program
3 *
4 * Copyright (C) 2010 OMICRON electronics GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20#include <errno.h>
21#include <fcntl.h>
22#include <math.h>
23#include <signal.h>
24#include <stdio.h>
25#include <stdlib.h>
26#include <string.h>
27#include <sys/ioctl.h>
28#include <sys/mman.h>
29#include <sys/stat.h>
30#include <sys/time.h>
31#include <sys/timex.h>
32#include <sys/types.h>
33#include <time.h>
34#include <unistd.h>
35
36#include <linux/ptp_clock.h>
37
38#define DEVICE "/dev/ptp0"
39
40#ifndef ADJ_SETOFFSET
41#define ADJ_SETOFFSET 0x0100
42#endif
43
44#ifndef CLOCK_INVALID
45#define CLOCK_INVALID -1
46#endif
47
48/* When glibc offers the syscall, this will go away. */
49#include <sys/syscall.h>
50static int clock_adjtime(clockid_t id, struct timex *tx)
51{
52 return syscall(__NR_clock_adjtime, id, tx);
53}
54
55static clockid_t get_clockid(int fd)
56{
57#define CLOCKFD 3
58#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
59
60 return FD_TO_CLOCKID(fd);
61}
62
63static void handle_alarm(int s)
64{
65 printf("received signal %d\n", s);
66}
67
68static int install_handler(int signum, void (*handler)(int))
69{
70 struct sigaction action;
71 sigset_t mask;
72
73 /* Unblock the signal. */
74 sigemptyset(&mask);
75 sigaddset(&mask, signum);
76 sigprocmask(SIG_UNBLOCK, &mask, NULL);
77
78 /* Install the signal handler. */
79 action.sa_handler = handler;
80 action.sa_flags = 0;
81 sigemptyset(&action.sa_mask);
82 sigaction(signum, &action, NULL);
83
84 return 0;
85}
86
87static long ppb_to_scaled_ppm(int ppb)
88{
89 /*
90 * The 'freq' field in the 'struct timex' is in parts per
91 * million, but with a 16 bit binary fractional field.
92 * Instead of calculating either one of
93 *
94 * scaled_ppm = (ppb / 1000) << 16 [1]
95 * scaled_ppm = (ppb << 16) / 1000 [2]
96 *
97 * we simply use double precision math, in order to avoid the
98 * truncation in [1] and the possible overflow in [2].
99 */
100 return (long) (ppb * 65.536);
101}
102
103static void usage(char *progname)
104{
105 fprintf(stderr,
106 "usage: %s [options]\n"
107 " -a val request a one-shot alarm after 'val' seconds\n"
108 " -A val request a periodic alarm every 'val' seconds\n"
109 " -c query the ptp clock's capabilities\n"
110 " -d name device to open\n"
111 " -e val read 'val' external time stamp events\n"
112 " -f val adjust the ptp clock frequency by 'val' ppb\n"
113 " -g get the ptp clock time\n"
114 " -h prints this message\n"
115 " -p val enable output with a period of 'val' nanoseconds\n"
116 " -P val enable or disable (val=1|0) the system clock PPS\n"
117 " -s set the ptp clock time from the system time\n"
118 " -S set the system time from the ptp clock time\n"
119 " -t val shift the ptp clock time by 'val' seconds\n",
120 progname);
121}
122
123int main(int argc, char *argv[])
124{
125 struct ptp_clock_caps caps;
126 struct ptp_extts_event event;
127 struct ptp_extts_request extts_request;
128 struct ptp_perout_request perout_request;
129 struct timespec ts;
130 struct timex tx;
131
132 static timer_t timerid;
133 struct itimerspec timeout;
134 struct sigevent sigevent;
135
136 char *progname;
137 int c, cnt, fd;
138
139 char *device = DEVICE;
140 clockid_t clkid;
141 int adjfreq = 0x7fffffff;
142 int adjtime = 0;
143 int capabilities = 0;
144 int extts = 0;
145 int gettime = 0;
146 int oneshot = 0;
147 int periodic = 0;
148 int perout = -1;
149 int pps = -1;
150 int settime = 0;
151
152 progname = strrchr(argv[0], '/');
153 progname = progname ? 1+progname : argv[0];
154 while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghp:P:sSt:v"))) {
155 switch (c) {
156 case 'a':
157 oneshot = atoi(optarg);
158 break;
159 case 'A':
160 periodic = atoi(optarg);
161 break;
162 case 'c':
163 capabilities = 1;
164 break;
165 case 'd':
166 device = optarg;
167 break;
168 case 'e':
169 extts = atoi(optarg);
170 break;
171 case 'f':
172 adjfreq = atoi(optarg);
173 break;
174 case 'g':
175 gettime = 1;
176 break;
177 case 'p':
178 perout = atoi(optarg);
179 break;
180 case 'P':
181 pps = atoi(optarg);
182 break;
183 case 's':
184 settime = 1;
185 break;
186 case 'S':
187 settime = 2;
188 break;
189 case 't':
190 adjtime = atoi(optarg);
191 break;
192 case 'h':
193 usage(progname);
194 return 0;
195 case '?':
196 default:
197 usage(progname);
198 return -1;
199 }
200 }
201
202 fd = open(device, O_RDWR);
203 if (fd < 0) {
204 fprintf(stderr, "opening %s: %s\n", device, strerror(errno));
205 return -1;
206 }
207
208 clkid = get_clockid(fd);
209 if (CLOCK_INVALID == clkid) {
210 fprintf(stderr, "failed to read clock id\n");
211 return -1;
212 }
213
214 if (capabilities) {
215 if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) {
216 perror("PTP_CLOCK_GETCAPS");
217 } else {
218 printf("capabilities:\n"
219 " %d maximum frequency adjustment (ppb)\n"
220 " %d programmable alarms\n"
221 " %d external time stamp channels\n"
222 " %d programmable periodic signals\n"
223 " %d pulse per second\n",
224 caps.max_adj,
225 caps.n_alarm,
226 caps.n_ext_ts,
227 caps.n_per_out,
228 caps.pps);
229 }
230 }
231
232 if (0x7fffffff != adjfreq) {
233 memset(&tx, 0, sizeof(tx));
234 tx.modes = ADJ_FREQUENCY;
235 tx.freq = ppb_to_scaled_ppm(adjfreq);
236 if (clock_adjtime(clkid, &tx)) {
237 perror("clock_adjtime");
238 } else {
239 puts("frequency adjustment okay");
240 }
241 }
242
243 if (adjtime) {
244 memset(&tx, 0, sizeof(tx));
245 tx.modes = ADJ_SETOFFSET;
246 tx.time.tv_sec = adjtime;
247 tx.time.tv_usec = 0;
248 if (clock_adjtime(clkid, &tx) < 0) {
249 perror("clock_adjtime");
250 } else {
251 puts("time shift okay");
252 }
253 }
254
255 if (gettime) {
256 if (clock_gettime(clkid, &ts)) {
257 perror("clock_gettime");
258 } else {
259 printf("clock time: %ld.%09ld or %s",
260 ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec));
261 }
262 }
263
264 if (settime == 1) {
265 clock_gettime(CLOCK_REALTIME, &ts);
266 if (clock_settime(clkid, &ts)) {
267 perror("clock_settime");
268 } else {
269 puts("set time okay");
270 }
271 }
272
273 if (settime == 2) {
274 clock_gettime(clkid, &ts);
275 if (clock_settime(CLOCK_REALTIME, &ts)) {
276 perror("clock_settime");
277 } else {
278 puts("set time okay");
279 }
280 }
281
282 if (extts) {
283 memset(&extts_request, 0, sizeof(extts_request));
284 extts_request.index = 0;
285 extts_request.flags = PTP_ENABLE_FEATURE;
286 if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) {
287 perror("PTP_EXTTS_REQUEST");
288 extts = 0;
289 } else {
290 puts("external time stamp request okay");
291 }
292 for (; extts; extts--) {
293 cnt = read(fd, &event, sizeof(event));
294 if (cnt != sizeof(event)) {
295 perror("read");
296 break;
297 }
298 printf("event index %u at %lld.%09u\n", event.index,
299 event.t.sec, event.t.nsec);
300 fflush(stdout);
301 }
302 /* Disable the feature again. */
303 extts_request.flags = 0;
304 if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) {
305 perror("PTP_EXTTS_REQUEST");
306 }
307 }
308
309 if (oneshot) {
310 install_handler(SIGALRM, handle_alarm);
311 /* Create a timer. */
312 sigevent.sigev_notify = SIGEV_SIGNAL;
313 sigevent.sigev_signo = SIGALRM;
314 if (timer_create(clkid, &sigevent, &timerid)) {
315 perror("timer_create");
316 return -1;
317 }
318 /* Start the timer. */
319 memset(&timeout, 0, sizeof(timeout));
320 timeout.it_value.tv_sec = oneshot;
321 if (timer_settime(timerid, 0, &timeout, NULL)) {
322 perror("timer_settime");
323 return -1;
324 }
325 pause();
326 timer_delete(timerid);
327 }
328
329 if (periodic) {
330 install_handler(SIGALRM, handle_alarm);
331 /* Create a timer. */
332 sigevent.sigev_notify = SIGEV_SIGNAL;
333 sigevent.sigev_signo = SIGALRM;
334 if (timer_create(clkid, &sigevent, &timerid)) {
335 perror("timer_create");
336 return -1;
337 }
338 /* Start the timer. */
339 memset(&timeout, 0, sizeof(timeout));
340 timeout.it_interval.tv_sec = periodic;
341 timeout.it_value.tv_sec = periodic;
342 if (timer_settime(timerid, 0, &timeout, NULL)) {
343 perror("timer_settime");
344 return -1;
345 }
346 while (1) {
347 pause();
348 }
349 timer_delete(timerid);
350 }
351
352 if (perout >= 0) {
353 if (clock_gettime(clkid, &ts)) {
354 perror("clock_gettime");
355 return -1;
356 }
357 memset(&perout_request, 0, sizeof(perout_request));
358 perout_request.index = 0;
359 perout_request.start.sec = ts.tv_sec + 2;
360 perout_request.start.nsec = 0;
361 perout_request.period.sec = 0;
362 perout_request.period.nsec = perout;
363 if (ioctl(fd, PTP_PEROUT_REQUEST, &perout_request)) {
364 perror("PTP_PEROUT_REQUEST");
365 } else {
366 puts("periodic output request okay");
367 }
368 }
369
370 if (pps != -1) {
371 int enable = pps ? 1 : 0;
372 if (ioctl(fd, PTP_ENABLE_PPS, enable)) {
373 perror("PTP_ENABLE_PPS");
374 } else {
375 puts("pps for system time request okay");
376 }
377 }
378
379 close(fd);
380 return 0;
381}
diff --git a/Documentation/ptp/testptp.mk b/Documentation/ptp/testptp.mk
new file mode 100644
index 00000000000..4ef2d975542
--- /dev/null
+++ b/Documentation/ptp/testptp.mk
@@ -0,0 +1,33 @@
1# PTP 1588 clock support - User space test program
2#
3# Copyright (C) 2010 OMICRON electronics GmbH
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19CC = $(CROSS_COMPILE)gcc
20INC = -I$(KBUILD_OUTPUT)/usr/include
21CFLAGS = -Wall $(INC)
22LDLIBS = -lrt
23PROGS = testptp
24
25all: $(PROGS)
26
27testptp: testptp.o
28
29clean:
30 rm -f testptp.o
31
32distclean: clean
33 rm -f $(PROGS)
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt
new file mode 100644
index 00000000000..be70ee15f8c
--- /dev/null
+++ b/Documentation/rapidio/rapidio.txt
@@ -0,0 +1,173 @@
1 The Linux RapidIO Subsystem
2
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5The RapidIO standard is a packet-based fabric interconnect standard designed for
6use in embedded systems. Development of the RapidIO standard is directed by the
7RapidIO Trade Association (RTA). The current version of the RapidIO specification
8is publicly available for download from the RTA web-site [1].
9
10This document describes the basics of the Linux RapidIO subsystem and provides
11information on its major components.
12
131 Overview
14----------
15
16Because the RapidIO subsystem follows the Linux device model it is integrated
17into the kernel similarly to other buses by defining RapidIO-specific device and
18bus types and registering them within the device model.
19
20The Linux RapidIO subsystem is architecture independent and therefore defines
21architecture-specific interfaces that provide support for common RapidIO
22subsystem operations.
23
242. Core Components
25------------------
26
27A typical RapidIO network is a combination of endpoints and switches.
28Each of these components is represented in the subsystem by an associated data
29structure. The core logical components of the RapidIO subsystem are defined
30in include/linux/rio.h file.
31
322.1 Master Port
33
34A master port (or mport) is a RapidIO interface controller that is local to the
35processor executing the Linux code. A master port generates and receives RapidIO
36packets (transactions). In the RapidIO subsystem each master port is represented
37by a rio_mport data structure. This structure contains master port specific
38resources such as mailboxes and doorbells. The rio_mport also includes a unique
39host device ID that is valid when a master port is configured as an enumerating
40host.
41
42RapidIO master ports are serviced by subsystem specific mport device drivers
43that provide functionality defined for this subsystem. To provide a hardware
44independent interface for RapidIO subsystem operations, rio_mport structure
45includes rio_ops data structure which contains pointers to hardware specific
46implementations of RapidIO functions.
47
482.2 Device
49
50A RapidIO device is any endpoint (other than mport) or switch in the network.
51All devices are presented in the RapidIO subsystem by corresponding rio_dev data
52structure. Devices form one global device list and per-network device lists
53(depending on number of available mports and networks).
54
552.3 Switch
56
57A RapidIO switch is a special class of device that routes packets between its
58ports towards their final destination. The packet destination port within a
59switch is defined by an internal routing table. A switch is presented in the
60RapidIO subsystem by rio_dev data structure expanded by additional rio_switch
61data structure, which contains switch specific information such as copy of the
62routing table and pointers to switch specific functions.
63
64The RapidIO subsystem defines the format and initialization method for subsystem
65specific switch drivers that are designed to provide hardware-specific
66implementation of common switch management routines.
67
682.4 Network
69
70A RapidIO network is a combination of interconnected endpoint and switch devices.
71Each RapidIO network known to the system is represented by corresponding rio_net
72data structure. This structure includes lists of all devices and local master
73ports that form the same network. It also contains a pointer to the default
74master port that is used to communicate with devices within the network.
75
763. Subsystem Initialization
77---------------------------
78
79In order to initialize the RapidIO subsystem, a platform must initialize and
80register at least one master port within the RapidIO network. To register mport
81within the subsystem controller driver initialization code calls function
82rio_register_mport() for each available master port. After all active master
83ports are registered with a RapidIO subsystem, the rio_init_mports() routine
84is called to perform enumeration and discovery.
85
86In the current PowerPC-based implementation a subsys_initcall() is specified to
87perform controller initialization and mport registration. At the end it directly
88calls rio_init_mports() to execute RapidIO enumeration and discovery.
89
904. Enumeration and Discovery
91----------------------------
92
93When rio_init_mports() is called it scans a list of registered master ports and
94calls an enumeration or discovery routine depending on the configured role of a
95master port: host or agent.
96
97Enumeration is performed by a master port if it is configured as a host port by
98assigning a host device ID greater than or equal to zero. A host device ID is
99assigned to a master port through the kernel command line parameter "riohdid=",
100or can be configured in a platform-specific manner. If the host device ID for
101a specific master port is set to -1, the discovery process will be performed
102for it.
103
104The enumeration and discovery routines use RapidIO maintenance transactions
105to access the configuration space of devices.
106
107The enumeration process is implemented according to the enumeration algorithm
108outlined in the RapidIO Interconnect Specification: Annex I [1].
109
110The enumeration process traverses the network using a recursive depth-first
111algorithm. When a new device is found, the enumerator takes ownership of that
112device by writing into the Host Device ID Lock CSR. It does this to ensure that
113the enumerator has exclusive right to enumerate the device. If device ownership
114is successfully acquired, the enumerator allocates a new rio_dev structure and
115initializes it according to device capabilities.
116
117If the device is an endpoint, a unique device ID is assigned to it and its value
118is written into the device's Base Device ID CSR.
119
120If the device is a switch, the enumerator allocates an additional rio_switch
121structure to store switch specific information. Then the switch's vendor ID and
122device ID are queried against a table of known RapidIO switches. Each switch
123table entry contains a pointer to a switch-specific initialization routine that
124initializes pointers to the rest of switch specific operations, and performs
125hardware initialization if necessary. A RapidIO switch does not have a unique
126device ID; it relies on hopcount and routing for device ID of an attached
127endpoint if access to its configuration registers is required. If a switch (or
128chain of switches) does not have any endpoint (except enumerator) attached to
129it, a fake device ID will be assigned to configure a route to that switch.
130In the case of a chain of switches without endpoint, one fake device ID is used
131to configure a route through the entire chain and switches are differentiated by
132their hopcount value.
133
134For both endpoints and switches the enumerator writes a unique component tag
135into device's Component Tag CSR. That unique value is used by the error
136management notification mechanism to identify a device that is reporting an
137error management event.
138
139Enumeration beyond a switch is completed by iterating over each active egress
140port of that switch. For each active link, a route to a default device ID
141(0xFF for 8-bit systems and 0xFFFF for 16-bit systems) is temporarily written
142into the routing table. The algorithm recurs by calling itself with hopcount + 1
143and the default device ID in order to access the device on the active port.
144
145After the host has completed enumeration of the entire network it releases
146devices by clearing device ID locks (calls rio_clear_locks()). For each endpoint
147in the system, it sets the Master Enable bit in the Port General Control CSR
148to indicate that enumeration is completed and agents are allowed to execute
149passive discovery of the network.
150
151The discovery process is performed by agents and is similar to the enumeration
152process that is described above. However, the discovery process is performed
153without changes to the existing routing because agents only gather information
154about RapidIO network structure and are building an internal map of discovered
155devices. This way each Linux-based component of the RapidIO subsystem has
156a complete view of the network. The discovery process can be performed
157simultaneously by several agents. After initializing its RapidIO master port
158each agent waits for enumeration completion by the host for the configured wait
159time period. If this wait time period expires before enumeration is completed,
160an agent skips RapidIO discovery and continues with remaining kernel
161initialization.
162
1635. References
164-------------
165
166[1] RapidIO Trade Association. RapidIO Interconnect Specifications.
167 http://www.rapidio.org.
168[2] Rapidio TA. Technology Comparisons.
169 http://www.rapidio.org/education/technology_comparisons/
170[3] RapidIO support for Linux.
171 http://lwn.net/Articles/139118/
172[4] Matt Porter. RapidIO for Linux. Ottawa Linux Symposium, 2005
173 http://www.kernel.org/doc/ols/2005/ols2005v2-pages-43-56.pdf
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt
new file mode 100644
index 00000000000..97f71ce575d
--- /dev/null
+++ b/Documentation/rapidio/sysfs.txt
@@ -0,0 +1,90 @@
1 RapidIO sysfs Files
2
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
51. Device Subdirectories
6------------------------
7
8For each RapidIO device, the RapidIO subsystem creates files in an individual
9subdirectory with the following name, /sys/bus/rapidio/devices/<device_name>.
10
11The format of device_name is "nn:d:iiii", where:
12
13nn - two-digit hexadecimal ID of RapidIO network where the device resides
14d - device typr: 'e' - for endpoint or 's' - for switch
15iiii - four-digit device destID for endpoints, or switchID for switches
16
17For example, below is a list of device directories that represents a typical
18RapidIO network with one switch, one host, and two agent endpoints, as it is
19seen by the enumerating host (destID = 1):
20
21/sys/bus/rapidio/devices/00:e:0000
22/sys/bus/rapidio/devices/00:e:0002
23/sys/bus/rapidio/devices/00:s:0001
24
25NOTE: An enumerating or discovering endpoint does not create a sysfs entry for
26itself, this is why an endpoint with destID=1 is not shown in the list.
27
282. Attributes Common for All Devices
29------------------------------------
30
31Each device subdirectory contains the following informational read-only files:
32
33 did - returns the device identifier
34 vid - returns the device vendor identifier
35device_rev - returns the device revision level
36 asm_did - returns identifier for the assembly containing the device
37 asm_rev - returns revision level of the assembly containing the device
38 asm_vid - returns vendor identifier of the assembly containing the device
39 destid - returns device destination ID assigned by the enumeration routine
40 (see 4.1 for switch specific details)
41 lprev - returns name of previous device (switch) on the path to the device
42 that that owns this attribute
43
44In addition to the files listed above, each device has a binary attribute file
45that allows read/write access to the device configuration registers using
46the RapidIO maintenance transactions:
47
48 config - reads from and writes to the device configuration registers.
49
50This attribute is similar in behavior to the "config" attribute of PCI devices
51and provides an access to the RapidIO device registers using standard file read
52and write operations.
53
543. Endpoint Device Attributes
55-----------------------------
56
57Currently Linux RapidIO subsystem does not create any endpoint specific sysfs
58attributes. It is possible that RapidIO master port drivers and endpoint device
59drivers will add their device-specific sysfs attributes but such attributes are
60outside the scope of this document.
61
624. Switch Device Attributes
63---------------------------
64
65RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
66common and device-specific sysfs attributes for switches. Because switches are
67integrated into the RapidIO subsystem, it offers a method to create
68device-specific sysfs attributes by specifying a callback function that may be
69set by the switch initialization routine during enumeration or discovery process.
70
714.1 Common Switch Attributes
72
73 routes - reports switch routing information in "destID port" format. This
74 attribute reports only valid routing table entries, one line for
75 each entry.
76 destid - device destination ID that defines a route to the switch
77 hopcount - number of hops on the path to the switch
78 lnext - returns names of devices linked to the switch except one of a device
79 linked to the ingress port (reported as "lprev"). This is an array
80 names with number of lines equal to number of ports in switch. If
81 a switch port has no attached device, returns "null" instead of
82 a device name.
83
844.2 Device-specific Switch Attributes
85
86Device-specific switch attributes are listed for each RapidIO switch driver
87that exports additional attributes.
88
89IDT_GEN2:
90 errlog - reads contents of device error log until it is empty.
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 9104c106208..250160469d8 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -178,38 +178,29 @@ RTC class framework, but can't be supported by the older driver.
178 setting the longer alarm time and enabling its IRQ using a single 178 setting the longer alarm time and enabling its IRQ using a single
179 request (using the same model as EFI firmware). 179 request (using the same model as EFI firmware).
180 180
181 * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, it probably 181 * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework
182 also offers update IRQs whenever the "seconds" counter changes. 182 will emulate this mechanism.
183 If needed, the RTC framework can emulate this mechanism.
184 183
185 * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... another 184 * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls
186 feature often accessible with an IRQ line is a periodic IRQ, issued 185 are emulated via a kernel hrtimer.
187 at settable frequencies (usually 2^N Hz).
188 186
189In many cases, the RTC alarm can be a system wake event, used to force 187In many cases, the RTC alarm can be a system wake event, used to force
190Linux out of a low power sleep state (or hibernation) back to a fully 188Linux out of a low power sleep state (or hibernation) back to a fully
191operational state. For example, a system could enter a deep power saving 189operational state. For example, a system could enter a deep power saving
192state until it's time to execute some scheduled tasks. 190state until it's time to execute some scheduled tasks.
193 191
194Note that many of these ioctls need not actually be implemented by your 192Note that many of these ioctls are handled by the common rtc-dev interface.
195driver. The common rtc-dev interface handles many of these nicely if your 193Some common examples:
196driver returns ENOIOCTLCMD. Some common examples:
197 194
198 * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be 195 * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be
199 called with appropriate values. 196 called with appropriate values.
200 197
201 * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the 198 * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: gets or sets
202 set_alarm/read_alarm functions will be called. 199 the alarm rtc_timer. May call the set_alarm driver function.
203 200
204 * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called 201 * RTC_IRQP_SET, RTC_IRQP_READ: These are emulated by the generic code.
205 to set the frequency while the framework will handle the read for you
206 since the frequency is stored in the irq_freq member of the rtc_device
207 structure. Your driver needs to initialize the irq_freq member during
208 init. Make sure you check the requested frequency is in range of your
209 hardware in the irq_set_freq function. If it isn't, return -EINVAL. If
210 you cannot actually change the frequency, do not define irq_set_freq.
211 202
212 * RTC_PIE_ON, RTC_PIE_OFF: the irq_set_state function will be called. 203 * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code.
213 204
214If all else fails, check out the rtc-test.c driver! 205If all else fails, check out the rtc-test.c driver!
215 206
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index 86f9f74b2b3..efe998becc5 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -2273,7 +2273,7 @@ IP forwarding is on.
2273There is a lot of useful info in here best found by going in & having a look around, 2273There is a lot of useful info in here best found by going in & having a look around,
2274so I'll take you through some entries I consider important. 2274so I'll take you through some entries I consider important.
2275 2275
2276All the processes running on the machine have there own entry defined by 2276All the processes running on the machine have their own entry defined by
2277/proc/<pid> 2277/proc/<pid>
2278So lets have a look at the init process 2278So lets have a look at the init process
2279cd /proc/1 2279cd /proc/1
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index 8239ebbcddc..99961993257 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -164,7 +164,7 @@ This is the (partial) list of the hooks:
164 It puts the scheduling entity (task) into the red-black tree and 164 It puts the scheduling entity (task) into the red-black tree and
165 increments the nr_running variable. 165 increments the nr_running variable.
166 166
167 - dequeue_tree(...) 167 - dequeue_task(...)
168 168
169 When a task is no longer runnable, this function is called to keep the 169 When a task is no longer runnable, this function is called to keep the
170 corresponding scheduling entity out of the red-black tree. It decrements 170 corresponding scheduling entity out of the red-black tree. It decrements
@@ -195,11 +195,6 @@ This is the (partial) list of the hooks:
195 This function is mostly called from time tick functions; it might lead to 195 This function is mostly called from time tick functions; it might lead to
196 process switch. This drives the running preemption. 196 process switch. This drives the running preemption.
197 197
198 - task_new(...)
199
200 The core scheduler gives the scheduling module an opportunity to manage new
201 task startup. The CFS scheduling module uses it for group scheduling, while
202 the scheduling module for a real-time task does not use it.
203 198
204 199
205 200
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt
index 373ceacc367..b7ee379b651 100644
--- a/Documentation/scheduler/sched-domains.txt
+++ b/Documentation/scheduler/sched-domains.txt
@@ -1,8 +1,7 @@
1Each CPU has a "base" scheduling domain (struct sched_domain). These are 1Each CPU has a "base" scheduling domain (struct sched_domain). The domain
2accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain
3hierarchy is built from these base domains via the ->parent pointer. ->parent 2hierarchy is built from these base domains via the ->parent pointer. ->parent
4MUST be NULL terminated, and domain structures should be per-CPU as they 3MUST be NULL terminated, and domain structures should be per-CPU as they are
5are locklessly updated. 4locklessly updated.
6 5
7Each scheduling domain spans a number of CPUs (stored in the ->span field). 6Each scheduling domain spans a number of CPUs (stored in the ->span field).
8A domain's span MUST be a superset of it child's span (this restriction could 7A domain's span MUST be a superset of it child's span (this restriction could
@@ -26,11 +25,26 @@ is treated as one entity. The load of a group is defined as the sum of the
26load of each of its member CPUs, and only when the load of a group becomes 25load of each of its member CPUs, and only when the load of a group becomes
27out of balance are tasks moved between groups. 26out of balance are tasks moved between groups.
28 27
29In kernel/sched.c, rebalance_tick is run periodically on each CPU. This 28In kernel/sched.c, trigger_load_balance() is run periodically on each CPU
30function takes its CPU's base sched domain and checks to see if has reached 29through scheduler_tick(). It raises a softirq after the next regularly scheduled
31its rebalance interval. If so, then it will run load_balance on that domain. 30rebalancing event for the current runqueue has arrived. The actual load
32rebalance_tick then checks the parent sched_domain (if it exists), and the 31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
33parent of the parent and so forth. 32in softirq context (SCHED_SOFTIRQ).
33
34The latter function takes two arguments: the current CPU and whether it was idle
35at the time the scheduler_tick() happened and iterates over all sched domains
36our CPU is on, starting from its base domain and going up the ->parent chain.
37While doing that, it checks to see if the current domain has exhausted its
38rebalance interval. If so, it runs load_balance() on that domain. It then checks
39the parent sched_domain (if it exists), and the parent of the parent and so
40forth.
41
42Initially, load_balance() finds the busiest group in the current sched domain.
43If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in
44that group. If it manages to find such a runqueue, it locks both our initial
45CPU's runqueue and the newly found busiest one and starts moving tasks from it
46to our runqueue. The exact number of tasks amounts to an imbalance previously
47computed while iterating over this sched domain's groups.
34 48
35*** Implementing sched domains *** 49*** Implementing sched domains ***
36The "base" domain will "span" the first level of the hierarchy. In the case 50The "base" domain will "span" the first level of the hierarchy. In the case
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index 5e83769c6aa..c56ec99d7b2 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -352,7 +352,7 @@ Changes from 20041229 to 20050110
352 lpfc_scsiport.c 352 lpfc_scsiport.c
353 * In remote port changes: no longer nulling target->pnode when 353 * In remote port changes: no longer nulling target->pnode when
354 removing from mapped list. Pnode get nulled when the node is 354 removing from mapped list. Pnode get nulled when the node is
355 freed (after nodev tmo). This bug was causing i/o recieved in 355 freed (after nodev tmo). This bug was causing i/o received in
356 the small window while the device was blocked to be errored w/ 356 the small window while the device was blocked to be errored w/
357 did_no_connect. With the fix, it returns host_busy 357 did_no_connect. With the fix, it returns host_busy
358 (per the pre-remote port changes). 358 (per the pre-remote port changes).
@@ -530,7 +530,7 @@ Changes from 20041018 to 20041123
530 coherent mappings. Note: There are more consistent mappings 530 coherent mappings. Note: There are more consistent mappings
531 that are using pci_dma_sync calls. Probably these should be 531 that are using pci_dma_sync calls. Probably these should be
532 removed as well. 532 removed as well.
533 * Modified lpfc_free_scsi_buf to accomodate all three scsi_buf 533 * Modified lpfc_free_scsi_buf to accommodate all three scsi_buf
534 free types to alleviate miscellaneous panics with cable pull 534 free types to alleviate miscellaneous panics with cable pull
535 testing. 535 testing.
536 * Set hotplug to default 0 and lpfc_target_remove to not remove 536 * Set hotplug to default 0 and lpfc_target_remove to not remove
@@ -583,7 +583,7 @@ Changes from 20041018 to 20041123
583 included more than once. 583 included more than once.
584 * Replaced "set_current_state(TASK_UNINTERRUPTIBLE); 584 * Replaced "set_current_state(TASK_UNINTERRUPTIBLE);
585 schedule_timeout(timeout)" with "msleep(timeout)". 585 schedule_timeout(timeout)" with "msleep(timeout)".
586 * Fixnode was loosing starget when rediscovered. We saw messages 586 * Fixnode was losing starget when rediscovered. We saw messages
587 like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a 587 like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a
588 result. Moved starget field into struct lpfc_target which is 588 result. Moved starget field into struct lpfc_target which is
589 referenced from the node. 589 referenced from the node.
@@ -604,7 +604,7 @@ Changes from 20041018 to 20041123
604 * Make 3 functions static: lpfc_get_hba_sym_node_name, 604 * Make 3 functions static: lpfc_get_hba_sym_node_name,
605 lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep 605 lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep
606 and lpfc_setup_slim_access so they're defined before being used. 606 and lpfc_setup_slim_access so they're defined before being used.
607 * Remove an unecessary list_del() in lpfc_hbadisc.c. 607 * Remove an unnecessary list_del() in lpfc_hbadisc.c.
608 * Set nlp_state before calling lpfc_nlp_list() since this will 608 * Set nlp_state before calling lpfc_nlp_list() since this will
609 potentially call fc_target_unblock which may cause a race in 609 potentially call fc_target_unblock which may cause a race in
610 queuecommand by releasing host_lock. 610 queuecommand by releasing host_lock.
@@ -753,7 +753,7 @@ Changes from 20040908 to 20040920
753 * Changed version number to 8.0.12 753 * Changed version number to 8.0.12
754 * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and 754 * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and
755 PCI_LATENCY_VALUE from lpfc_hw.h. 755 PCI_LATENCY_VALUE from lpfc_hw.h.
756 * Changes to accomodate rnid. 756 * Changes to accommodate rnid.
757 * Fix RSCN handling so RSCN NS queries only effect NPorts found in 757 * Fix RSCN handling so RSCN NS queries only effect NPorts found in
758 RSCN data. 758 RSCN data.
759 * If we rcv a plogi on a NPort queued up for discovery, clear the 759 * If we rcv a plogi on a NPort queued up for discovery, clear the
@@ -813,7 +813,7 @@ Changes from 20040908 to 20040920
813 counter instead, brd_no isn't reused anymore. Also some tiny 813 counter instead, brd_no isn't reused anymore. Also some tiny
814 whitespace cleanups in surrounding code. 814 whitespace cleanups in surrounding code.
815 * Reorder functions in lpfc_els.c to remove need for prototypes. 815 * Reorder functions in lpfc_els.c to remove need for prototypes.
816 * Removed unsed prototypes from lpfc_crtn.h - 816 * Removed unused prototypes from lpfc_crtn.h -
817 lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke. 817 lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke.
818 * Removed some unused prototypes from lpfc_crtn.h - 818 * Removed some unused prototypes from lpfc_crtn.h -
819 lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn, 819 lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn,
@@ -863,7 +863,7 @@ Changes from 20040823 to 20040908
863 * Minimal support for SCSI flat space addressing/volume set 863 * Minimal support for SCSI flat space addressing/volume set
864 addressing. Use 16 bits of LUN address so that flat 864 addressing. Use 16 bits of LUN address so that flat
865 addressing/VSA will work. 865 addressing/VSA will work.
866 * Changed 2 occurences of if( 1 != f(x)) to if(f(x) != 1) 866 * Changed 2 occurrences of if( 1 != f(x)) to if(f(x) != 1)
867 * Drop include of lpfc_cfgparm.h. 867 * Drop include of lpfc_cfgparm.h.
868 * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c. 868 * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c.
869 * Add minimum range checking property to /sys write/store 869 * Add minimum range checking property to /sys write/store
@@ -1449,7 +1449,7 @@ Changes from 20040402 to 20040409
1449 * Removed lpfc_els_chk_latt from the lpfc_config_post function. 1449 * Removed lpfc_els_chk_latt from the lpfc_config_post function.
1450 lpfc_els_chk_latt will enable the link event interrupts when 1450 lpfc_els_chk_latt will enable the link event interrupts when
1451 flogi is pending which causes two discovery state machines 1451 flogi is pending which causes two discovery state machines
1452 running parallely. 1452 running parallelly.
1453 * Add pci_disable_device to unload path. 1453 * Add pci_disable_device to unload path.
1454 * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c 1454 * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c
1455 * Call dma_map_single() & pci_map_single() directly instead of via 1455 * Call dma_map_single() & pci_map_single() directly instead of via
@@ -1590,7 +1590,7 @@ Changes from 20040326 to 20040402
1590 ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC 1590 ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC
1591 ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET 1591 ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET
1592 ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced 1592 ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced
1593 attribute "set" to be used in conjuction with the above 1593 attribute "set" to be used in conjunction with the above
1594 attributes. 1594 attributes.
1595 * Removed DLINK, enque and deque declarations now that clock 1595 * Removed DLINK, enque and deque declarations now that clock
1596 doesn't use them anymore 1596 doesn't use them anymore
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid
index 5e07d320817..d2052fdbedd 100644
--- a/Documentation/scsi/ChangeLog.megaraid
+++ b/Documentation/scsi/ChangeLog.megaraid
@@ -168,7 +168,7 @@ Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
168 168
1691. Sorted out PCI IDs to remove megaraid support overlaps. 1691. Sorted out PCI IDs to remove megaraid support overlaps.
170 Based on the patch from Daniel, sorted out PCI IDs along with 170 Based on the patch from Daniel, sorted out PCI IDs along with
171 charactor node name change from 'megadev' to 'megadev_legacy' to avoid 171 character node name change from 'megadev' to 'megadev_legacy' to avoid
172 conflict. 172 conflict.
173 --- 173 ---
174 Hopefully we'll be getting the build restriction zapped much sooner, 174 Hopefully we'll be getting the build restriction zapped much sooner,
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index b64d10d221e..9ed1d9d9678 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,40 @@
1Release Date : Wed. May 11, 2011 17:00:00 PST 2010 -
2 (emaild-id:megaraidlinux@lsi.com)
3 Adam Radford
4Current Version : 00.00.05.38-rc1
5Old Version : 00.00.05.34-rc1
6 1. Remove MSI-X black list, use MFI_REG_STATE.ready.msiEnable.
7 2. Remove un-used function megasas_return_cmd_for_smid().
8 3. Check MFI_REG_STATE.fault.resetAdapter in megasas_reset_fusion().
9 4. Disable interrupts/free_irq() in megasas_shutdown().
10 5. Fix bug where AENs could be lost in probe() and resume().
11 6. Convert 6,10,12 byte CDB's to 16 byte CDB for large LBA's for FastPath
12 IO.
13 7. Add 1078 OCR support.
14-------------------------------------------------------------------------------
15Release Date : Thu. Feb 24, 2011 17:00:00 PST 2010 -
16 (emaild-id:megaraidlinux@lsi.com)
17 Adam Radford
18Current Version : 00.00.05.34-rc1
19Old Version : 00.00.05.29-rc1
20 1. Fix some failure gotos from megasas_probe_one(), etc.
21 2. Add missing check_and_restore_queue_depth() call in
22 complete_cmd_fusion().
23 3. Enable MSI-X before calling megasas_init_fw().
24 4. Call tasklet_schedule() even if outbound_intr_status == 0 for MFI based
25 boards in MSI-X mode.
26 5. Fix megasas_probe_one() to clear PCI_MSIX_FLAGS_ENABLE in msi control
27 register in kdump kernel.
28 6. Fix megasas_get_cmd() to only print "Command pool empty" if
29 megasas_dbg_lvl is set.
30 7. Fix megasas_build_dcdb_fusion() to not filter by TYPE_DISK.
31 8. Fix megasas_build_dcdb_fusion() to use io_request->LUN[1] field.
32 9. Add MR_EVT_CFG_CLEARED to megasas_aen_polling().
33 10. Fix tasklet_init() in megasas_init_fw() to use instancet->tasklet.
34 11. Fix fault state handling in megasas_transition_to_ready().
35 12. Fix max_sectors setting for IEEE SGL's.
36 13. Fix iMR OCR support to work correctly.
37-------------------------------------------------------------------------------
1Release Date : Tues. Dec 14, 2010 17:00:00 PST 2010 - 38Release Date : Tues. Dec 14, 2010 17:00:00 PST 2010 -
2 (emaild-id:megaraidlinux@lsi.com) 39 (emaild-id:megaraidlinux@lsi.com)
3 Adam Radford 40 Adam Radford
diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx
index 8b278c10edf..9288e3d8974 100644
--- a/Documentation/scsi/ChangeLog.ncr53c8xx
+++ b/Documentation/scsi/ChangeLog.ncr53c8xx
@@ -200,7 +200,7 @@ Sun Feb 14:00 1999 Gerard Roudier (groudier@club-internet.fr)
200 By default the driver uses both IRQF_SHARED and IRQF_DISABLED. 200 By default the driver uses both IRQF_SHARED and IRQF_DISABLED.
201 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by 201 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by
202 a 53C8XX adapter and a network board. 202 a 53C8XX adapter and a network board.
203 - Tiny mispelling fixed (ABORT instead of ABRT). Was fortunately 203 - Tiny misspelling fixed (ABORT instead of ABRT). Was fortunately
204 harmless. 204 harmless.
205 - Negotiate SYNC data transfers with CCS devices. 205 - Negotiate SYNC data transfers with CCS devices.
206 206
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx
index 02ffbc1e8a8..c1933707d0b 100644
--- a/Documentation/scsi/ChangeLog.sym53c8xx
+++ b/Documentation/scsi/ChangeLog.sym53c8xx
@@ -457,7 +457,7 @@ Fri Jan 1 20:00 1999 Gerard Roudier (groudier@club-internet.fr)
457Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr) 457Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
458 * version sym53c8xx-1.0 458 * version sym53c8xx-1.0
459 - Define some new IO registers for the 896 (istat1, mbox0, mbox1) 459 - Define some new IO registers for the 896 (istat1, mbox0, mbox1)
460 - Revamp slighly the Symbios NVRAM lay-out based on the excerpt of 460 - Revamp slightly the Symbios NVRAM lay-out based on the excerpt of
461 the header file I received from Symbios. 461 the header file I received from Symbios.
462 - Check the PCI bus number for the boot order (Using a fast 462 - Check the PCI bus number for the boot order (Using a fast
463 PCI controller behing a PCI-PCI bridge seems sub-optimal). 463 PCI controller behing a PCI-PCI bridge seems sub-optimal).
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx
index 9e15b4f9cd2..19e7cd4bba6 100644
--- a/Documentation/scsi/LICENSE.qla2xxx
+++ b/Documentation/scsi/LICENSE.qla2xxx
@@ -1,11 +1,11 @@
1Copyright (c) 2003-2005 QLogic Corporation 1Copyright (c) 2003-2011 QLogic Corporation
2QLogic Linux Fibre Channel HBA Driver 2QLogic Linux/ESX Fibre Channel HBA Driver
3 3
4This program includes a device driver for Linux 2.6 that may be 4This program includes a device driver for Linux 2.6/ESX that may be
5distributed with QLogic hardware specific firmware binary file. 5distributed with QLogic hardware specific firmware binary file.
6You may modify and redistribute the device driver code under the 6You may modify and redistribute the device driver code under the
7GNU General Public License as published by the Free Software 7GNU General Public License (a copy of which is attached hereto as
8Foundation (version 2 or a later version). 8Exhibit A) published by the Free Software Foundation (version 2).
9 9
10You may redistribute the hardware specific firmware binary file 10You may redistribute the hardware specific firmware binary file
11under the following terms: 11under the following terms:
@@ -43,3 +43,285 @@ OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
43TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN 43TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
44ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN 44ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
45COMBINATION WITH THIS PROGRAM. 45COMBINATION WITH THIS PROGRAM.
46
47
48EXHIBIT A
49
50 GNU GENERAL PUBLIC LICENSE
51 Version 2, June 1991
52
53 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
54 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
55 Everyone is permitted to copy and distribute verbatim copies
56 of this license document, but changing it is not allowed.
57
58 Preamble
59
60 The licenses for most software are designed to take away your
61freedom to share and change it. By contrast, the GNU General Public
62License is intended to guarantee your freedom to share and change free
63software--to make sure the software is free for all its users. This
64General Public License applies to most of the Free Software
65Foundation's software and to any other program whose authors commit to
66using it. (Some other Free Software Foundation software is covered by
67the GNU Lesser General Public License instead.) You can apply it to
68your programs, too.
69
70 When we speak of free software, we are referring to freedom, not
71price. Our General Public Licenses are designed to make sure that you
72have the freedom to distribute copies of free software (and charge for
73this service if you wish), that you receive source code or can get it
74if you want it, that you can change the software or use pieces of it
75in new free programs; and that you know you can do these things.
76
77 To protect your rights, we need to make restrictions that forbid
78anyone to deny you these rights or to ask you to surrender the rights.
79These restrictions translate to certain responsibilities for you if you
80distribute copies of the software, or if you modify it.
81
82 For example, if you distribute copies of such a program, whether
83gratis or for a fee, you must give the recipients all the rights that
84you have. You must make sure that they, too, receive or can get the
85source code. And you must show them these terms so they know their
86rights.
87
88 We protect your rights with two steps: (1) copyright the software, and
89(2) offer you this license which gives you legal permission to copy,
90distribute and/or modify the software.
91
92 Also, for each author's protection and ours, we want to make certain
93that everyone understands that there is no warranty for this free
94software. If the software is modified by someone else and passed on, we
95want its recipients to know that what they have is not the original, so
96that any problems introduced by others will not reflect on the original
97authors' reputations.
98
99 Finally, any free program is threatened constantly by software
100patents. We wish to avoid the danger that redistributors of a free
101program will individually obtain patent licenses, in effect making the
102program proprietary. To prevent this, we have made it clear that any
103patent must be licensed for everyone's free use or not licensed at all.
104
105 The precise terms and conditions for copying, distribution and
106modification follow.
107
108 GNU GENERAL PUBLIC LICENSE
109 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
110
111 0. This License applies to any program or other work which contains
112a notice placed by the copyright holder saying it may be distributed
113under the terms of this General Public License. The "Program", below,
114refers to any such program or work, and a "work based on the Program"
115means either the Program or any derivative work under copyright law:
116that is to say, a work containing the Program or a portion of it,
117either verbatim or with modifications and/or translated into another
118language. (Hereinafter, translation is included without limitation in
119the term "modification".) Each licensee is addressed as "you".
120
121Activities other than copying, distribution and modification are not
122covered by this License; they are outside its scope. The act of
123running the Program is not restricted, and the output from the Program
124is covered only if its contents constitute a work based on the
125Program (independent of having been made by running the Program).
126Whether that is true depends on what the Program does.
127
128 1. You may copy and distribute verbatim copies of the Program's
129source code as you receive it, in any medium, provided that you
130conspicuously and appropriately publish on each copy an appropriate
131copyright notice and disclaimer of warranty; keep intact all the
132notices that refer to this License and to the absence of any warranty;
133and give any other recipients of the Program a copy of this License
134along with the Program.
135
136You may charge a fee for the physical act of transferring a copy, and
137you may at your option offer warranty protection in exchange for a fee.
138
139 2. You may modify your copy or copies of the Program or any portion
140of it, thus forming a work based on the Program, and copy and
141distribute such modifications or work under the terms of Section 1
142above, provided that you also meet all of these conditions:
143
144 a) You must cause the modified files to carry prominent notices
145 stating that you changed the files and the date of any change.
146
147 b) You must cause any work that you distribute or publish, that in
148 whole or in part contains or is derived from the Program or any
149 part thereof, to be licensed as a whole at no charge to all third
150 parties under the terms of this License.
151
152 c) If the modified program normally reads commands interactively
153 when run, you must cause it, when started running for such
154 interactive use in the most ordinary way, to print or display an
155 announcement including an appropriate copyright notice and a
156 notice that there is no warranty (or else, saying that you provide
157 a warranty) and that users may redistribute the program under
158 these conditions, and telling the user how to view a copy of this
159 License. (Exception: if the Program itself is interactive but
160 does not normally print such an announcement, your work based on
161 the Program is not required to print an announcement.)
162
163These requirements apply to the modified work as a whole. If
164identifiable sections of that work are not derived from the Program,
165and can be reasonably considered independent and separate works in
166themselves, then this License, and its terms, do not apply to those
167sections when you distribute them as separate works. But when you
168distribute the same sections as part of a whole which is a work based
169on the Program, the distribution of the whole must be on the terms of
170this License, whose permissions for other licensees extend to the
171entire whole, and thus to each and every part regardless of who wrote it.
172
173Thus, it is not the intent of this section to claim rights or contest
174your rights to work written entirely by you; rather, the intent is to
175exercise the right to control the distribution of derivative or
176collective works based on the Program.
177
178In addition, mere aggregation of another work not based on the Program
179with the Program (or with a work based on the Program) on a volume of
180a storage or distribution medium does not bring the other work under
181the scope of this License.
182
183 3. You may copy and distribute the Program (or a work based on it,
184under Section 2) in object code or executable form under the terms of
185Sections 1 and 2 above provided that you also do one of the following:
186
187 a) Accompany it with the complete corresponding machine-readable
188 source code, which must be distributed under the terms of Sections
189 1 and 2 above on a medium customarily used for software interchange; or,
190
191 b) Accompany it with a written offer, valid for at least three
192 years, to give any third party, for a charge no more than your
193 cost of physically performing source distribution, a complete
194 machine-readable copy of the corresponding source code, to be
195 distributed under the terms of Sections 1 and 2 above on a medium
196 customarily used for software interchange; or,
197
198 c) Accompany it with the information you received as to the offer
199 to distribute corresponding source code. (This alternative is
200 allowed only for noncommercial distribution and only if you
201 received the program in object code or executable form with such
202 an offer, in accord with Subsection b above.)
203
204The source code for a work means the preferred form of the work for
205making modifications to it. For an executable work, complete source
206code means all the source code for all modules it contains, plus any
207associated interface definition files, plus the scripts used to
208control compilation and installation of the executable. However, as a
209special exception, the source code distributed need not include
210anything that is normally distributed (in either source or binary
211form) with the major components (compiler, kernel, and so on) of the
212operating system on which the executable runs, unless that component
213itself accompanies the executable.
214
215If distribution of executable or object code is made by offering
216access to copy from a designated place, then offering equivalent
217access to copy the source code from the same place counts as
218distribution of the source code, even though third parties are not
219compelled to copy the source along with the object code.
220
221 4. You may not copy, modify, sublicense, or distribute the Program
222except as expressly provided under this License. Any attempt
223otherwise to copy, modify, sublicense or distribute the Program is
224void, and will automatically terminate your rights under this License.
225However, parties who have received copies, or rights, from you under
226this License will not have their licenses terminated so long as such
227parties remain in full compliance.
228
229 5. You are not required to accept this License, since you have not
230signed it. However, nothing else grants you permission to modify or
231distribute the Program or its derivative works. These actions are
232prohibited by law if you do not accept this License. Therefore, by
233modifying or distributing the Program (or any work based on the
234Program), you indicate your acceptance of this License to do so, and
235all its terms and conditions for copying, distributing or modifying
236the Program or works based on it.
237
238 6. Each time you redistribute the Program (or any work based on the
239Program), the recipient automatically receives a license from the
240original licensor to copy, distribute or modify the Program subject to
241these terms and conditions. You may not impose any further
242restrictions on the recipients' exercise of the rights granted herein.
243You are not responsible for enforcing compliance by third parties to
244this License.
245
246 7. If, as a consequence of a court judgment or allegation of patent
247infringement or for any other reason (not limited to patent issues),
248conditions are imposed on you (whether by court order, agreement or
249otherwise) that contradict the conditions of this License, they do not
250excuse you from the conditions of this License. If you cannot
251distribute so as to satisfy simultaneously your obligations under this
252License and any other pertinent obligations, then as a consequence you
253may not distribute the Program at all. For example, if a patent
254license would not permit royalty-free redistribution of the Program by
255all those who receive copies directly or indirectly through you, then
256the only way you could satisfy both it and this License would be to
257refrain entirely from distribution of the Program.
258
259If any portion of this section is held invalid or unenforceable under
260any particular circumstance, the balance of the section is intended to
261apply and the section as a whole is intended to apply in other
262circumstances.
263
264It is not the purpose of this section to induce you to infringe any
265patents or other property right claims or to contest validity of any
266such claims; this section has the sole purpose of protecting the
267integrity of the free software distribution system, which is
268implemented by public license practices. Many people have made
269generous contributions to the wide range of software distributed
270through that system in reliance on consistent application of that
271system; it is up to the author/donor to decide if he or she is willing
272to distribute software through any other system and a licensee cannot
273impose that choice.
274
275This section is intended to make thoroughly clear what is believed to
276be a consequence of the rest of this License.
277
278 8. If the distribution and/or use of the Program is restricted in
279certain countries either by patents or by copyrighted interfaces, the
280original copyright holder who places the Program under this License
281may add an explicit geographical distribution limitation excluding
282those countries, so that distribution is permitted only in or among
283countries not thus excluded. In such case, this License incorporates
284the limitation as if written in the body of this License.
285
286 9. The Free Software Foundation may publish revised and/or new versions
287of the General Public License from time to time. Such new versions will
288be similar in spirit to the present version, but may differ in detail to
289address new problems or concerns.
290
291Each version is given a distinguishing version number. If the Program
292specifies a version number of this License which applies to it and "any
293later version", you have the option of following the terms and conditions
294either of that version or of any later version published by the Free
295Software Foundation. If the Program does not specify a version number of
296this License, you may choose any version ever published by the Free Software
297Foundation.
298
299 10. If you wish to incorporate parts of the Program into other free
300programs whose distribution conditions are different, write to the author
301to ask for permission. For software which is copyrighted by the Free
302Software Foundation, write to the Free Software Foundation; we sometimes
303make exceptions for this. Our decision will be guided by the two goals
304of preserving the free status of all derivatives of our free software and
305of promoting the sharing and reuse of software generally.
306
307 NO WARRANTY
308
309 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
310FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
311OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
312PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
313OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
314MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
315TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
316PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
317REPAIR OR CORRECTION.
318
319 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
320WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
321REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
322INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
323OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
324TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
325YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
326PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
327POSSIBILITY OF SUCH DAMAGES.
diff --git a/Documentation/scsi/aha152x.txt b/Documentation/scsi/aha152x.txt
index 29ce6d87e45..94848734ac6 100644
--- a/Documentation/scsi/aha152x.txt
+++ b/Documentation/scsi/aha152x.txt
@@ -124,7 +124,7 @@ in the partition table and therefore every operating system has to know
124the right geometry to be able to interpret it. 124the right geometry to be able to interpret it.
125 125
126Moreover there are certain limitations to the C/H/S addressing scheme, 126Moreover there are certain limitations to the C/H/S addressing scheme,
127namely the address space is limited to upto 255 heads, upto 63 sectors 127namely the address space is limited to up to 255 heads, up to 63 sectors
128and a maximum of 1023 cylinders. 128and a maximum of 1023 cylinders.
129 129
130The AHA-1522 BIOS calculates the geometry by fixing the number of heads 130The AHA-1522 BIOS calculates the geometry by fixing the number of heads
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
index 16e054c9c70..64ac7093c87 100644
--- a/Documentation/scsi/aic79xx.txt
+++ b/Documentation/scsi/aic79xx.txt
@@ -267,7 +267,7 @@ The following information is available in this file:
267 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} 267 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]}
268 Definition: Set the per-target tagged queue depth on a 268 Definition: Set the per-target tagged queue depth on a
269 per controller basis. Both controllers and targets 269 per controller basis. Both controllers and targets
270 may be ommitted indicating that they should retain 270 may be omitted indicating that they should retain
271 the default tag depth. 271 the default tag depth.
272 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} 272 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32}
273 On Controller 0 273 On Controller 0
@@ -291,7 +291,7 @@ The following information is available in this file:
291 The rd_strm_bitmask is a 16 bit hex value in which 291 The rd_strm_bitmask is a 16 bit hex value in which
292 each bit represents a target. Setting the target's 292 each bit represents a target. Setting the target's
293 bit to '1' enables read streaming for that 293 bit to '1' enables read streaming for that
294 target. Controllers may be ommitted indicating that 294 target. Controllers may be omitted indicating that
295 they should retain the default read streaming setting. 295 they should retain the default read streaming setting.
296 Example: rd_strm:{0x0041} 296 Example: rd_strm:{0x0041}
297 On Controller 0 297 On Controller 0
@@ -313,7 +313,7 @@ The following information is available in this file:
313 ----------------------------------------------------------------- 313 -----------------------------------------------------------------
314 Option: dv: {value[,value...]} 314 Option: dv: {value[,value...]}
315 Definition: Set Domain Validation Policy on a per-controller basis. 315 Definition: Set Domain Validation Policy on a per-controller basis.
316 Controllers may be ommitted indicating that 316 Controllers may be omitted indicating that
317 they should retain the default read streaming setting. 317 they should retain the default read streaming setting.
318 Example: dv:{-1,0,,1,1,0} 318 Example: dv:{-1,0,,1,1,0}
319 On Controller 0 leave DV at its default setting. 319 On Controller 0 leave DV at its default setting.
@@ -340,7 +340,7 @@ The following information is available in this file:
340 Option: precomp: {value[,value...]} 340 Option: precomp: {value[,value...]}
341 Definition: Set IO Cell precompensation value on a per-controller 341 Definition: Set IO Cell precompensation value on a per-controller
342 basis. 342 basis.
343 Controllers may be ommitted indicating that 343 Controllers may be omitted indicating that
344 they should retain the default precompensation setting. 344 they should retain the default precompensation setting.
345 Example: precomp:{0x1} 345 Example: precomp:{0x1}
346 On Controller 0 set precompensation to 1. 346 On Controller 0 set precompensation to 1.
@@ -353,7 +353,7 @@ The following information is available in this file:
353 ----------------------------------------------------------------- 353 -----------------------------------------------------------------
354 Option: slewrate: {value[,value...]} 354 Option: slewrate: {value[,value...]}
355 Definition: Set IO Cell slew rate on a per-controller basis. 355 Definition: Set IO Cell slew rate on a per-controller basis.
356 Controllers may be ommitted indicating that 356 Controllers may be omitted indicating that
357 they should retain the default slew rate setting. 357 they should retain the default slew rate setting.
358 Example: slewrate:{0x1} 358 Example: slewrate:{0x1}
359 On Controller 0 set slew rate to 1. 359 On Controller 0 set slew rate to 1.
@@ -366,7 +366,7 @@ The following information is available in this file:
366 ----------------------------------------------------------------- 366 -----------------------------------------------------------------
367 Option: amplitude: {value[,value...]} 367 Option: amplitude: {value[,value...]}
368 Definition: Set IO Cell signal amplitude on a per-controller basis. 368 Definition: Set IO Cell signal amplitude on a per-controller basis.
369 Controllers may be ommitted indicating that 369 Controllers may be omitted indicating that
370 they should retain the default read streaming setting. 370 they should retain the default read streaming setting.
371 Example: amplitude:{0x1} 371 Example: amplitude:{0x1}
372 On Controller 0 set amplitude to 1. 372 On Controller 0 set amplitude to 1.
diff --git a/Documentation/scsi/hpsa.txt b/Documentation/scsi/hpsa.txt
index dca658362cb..891435a72fc 100644
--- a/Documentation/scsi/hpsa.txt
+++ b/Documentation/scsi/hpsa.txt
@@ -28,6 +28,12 @@ boot parameter "hpsa_allow_any=1" is specified, however these are not tested
28nor supported by HP with this driver. For older Smart Arrays, the cciss 28nor supported by HP with this driver. For older Smart Arrays, the cciss
29driver should still be used. 29driver should still be used.
30 30
31The "hpsa_simple_mode=1" boot parameter may be used to prevent the driver from
32putting the controller into "performant" mode. The difference is that with simple
33mode, each command completion requires an interrupt, while with "performant mode"
34(the default, and ordinarily better performing) it is possible to have multiple
35command completions indicated by a single interrupt.
36
31HPSA specific entries in /sys 37HPSA specific entries in /sys
32----------------------------- 38-----------------------------
33 39
@@ -39,6 +45,8 @@ HPSA specific entries in /sys
39 45
40 /sys/class/scsi_host/host*/rescan 46 /sys/class/scsi_host/host*/rescan
41 /sys/class/scsi_host/host*/firmware_revision 47 /sys/class/scsi_host/host*/firmware_revision
48 /sys/class/scsi_host/host*/resettable
49 /sys/class/scsi_host/host*/transport_mode
42 50
43 the host "rescan" attribute is a write only attribute. Writing to this 51 the host "rescan" attribute is a write only attribute. Writing to this
44 attribute will cause the driver to scan for new, changed, or removed devices 52 attribute will cause the driver to scan for new, changed, or removed devices
@@ -55,6 +63,21 @@ HPSA specific entries in /sys
55 root@host:/sys/class/scsi_host/host4# cat firmware_revision 63 root@host:/sys/class/scsi_host/host4# cat firmware_revision
56 7.14 64 7.14
57 65
66 The transport_mode indicates whether the controller is in "performant"
67 or "simple" mode. This is controlled by the "hpsa_simple_mode" module
68 parameter.
69
70 The "resettable" read-only attribute indicates whether a particular
71 controller is able to honor the "reset_devices" kernel parameter. If the
72 device is resettable, this file will contain a "1", otherwise, a "0". This
73 parameter is used by kdump, for example, to reset the controller at driver
74 load time to eliminate any outstanding commands on the controller and get the
75 controller into a known state so that the kdump initiated i/o will work right
76 and not be disrupted in any way by stale commands or other stale state
77 remaining on the controller from the previous kernel. This attribute enables
78 kexec tools to warn the user if they attempt to designate a device which is
79 unable to honor the reset_devices kernel parameter as a dump device.
80
58 HPSA specific disk attributes: 81 HPSA specific disk attributes:
59 ------------------------------ 82 ------------------------------
60 83
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt
index 45d61ad8c6f..ac41a9fcac7 100644
--- a/Documentation/scsi/ibmmca.txt
+++ b/Documentation/scsi/ibmmca.txt
@@ -303,7 +303,7 @@
303 (scb) and calls a local function issue_cmd(), which writes a scb 303 (scb) and calls a local function issue_cmd(), which writes a scb
304 command into subsystem I/O ports. Once the scb command is carried out, 304 command into subsystem I/O ports. Once the scb command is carried out,
305 the interrupt_handler() is invoked. If a device is determined to be 305 the interrupt_handler() is invoked. If a device is determined to be
306 existant and it has not assigned any ldn, it gets one dynamically. 306 existent and it has not assigned any ldn, it gets one dynamically.
307 For this, the whole stuff is done in ibmmca_queuecommand(). 307 For this, the whole stuff is done in ibmmca_queuecommand().
308 308
309 2.6 Abort & Reset Commands 309 2.6 Abort & Reset Commands
@@ -741,7 +741,7 @@
741 some error appeared, else it is undefined. Now, this is fixed. Before 741 some error appeared, else it is undefined. Now, this is fixed. Before
742 any SCB command gets queued, the tsb.dev_status is set to 0, so the 742 any SCB command gets queued, the tsb.dev_status is set to 0, so the
743 cmd->result won't screw up Linux higher level drivers. 743 cmd->result won't screw up Linux higher level drivers.
744 2) The reset-function has slightly improved. This is still planed for 744 2) The reset-function has slightly improved. This is still planned for
745 abort. During the abort and the reset function, no interrupts are 745 abort. During the abort and the reset function, no interrupts are
746 allowed. This is however quite hard to cope with, so the INT-status 746 allowed. This is however quite hard to cope with, so the INT-status
747 register is read. When the interrupt gets queued, one can find its 747 register is read. When the interrupt gets queued, one can find its
diff --git a/Documentation/scsi/scsi-changer.txt b/Documentation/scsi/scsi-changer.txt
index 032399b16a5..ade046ea7c1 100644
--- a/Documentation/scsi/scsi-changer.txt
+++ b/Documentation/scsi/scsi-changer.txt
@@ -102,7 +102,7 @@ Trouble?
102 102
103If you insmod the driver with "insmod debug=1", it will be verbose and 103If you insmod the driver with "insmod debug=1", it will be verbose and
104prints a lot of stuff to the syslog. Compiling the kernel with 104prints a lot of stuff to the syslog. Compiling the kernel with
105CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot 105CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages a lot
106because the kernel will translate the error codes into human-readable 106because the kernel will translate the error codes into human-readable
107strings then. 107strings then.
108 108
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 7acbebb17fa..6ff16b620d8 100644
--- a/Documentation/scsi/scsi_eh.txt
+++ b/Documentation/scsi/scsi_eh.txt
@@ -290,7 +290,7 @@ scmd->allowed.
290 SCSI transports/LLDDs automatically acquire sense data on 290 SCSI transports/LLDDs automatically acquire sense data on
291 command failures (autosense). Autosense is recommended for 291 command failures (autosense). Autosense is recommended for
292 performance reasons and as sense information could get out of 292 performance reasons and as sense information could get out of
293 sync inbetween occurrence of CHECK CONDITION and this action. 293 sync between occurrence of CHECK CONDITION and this action.
294 294
295 Note that if autosense is not supported, scmd->sense_buffer 295 Note that if autosense is not supported, scmd->sense_buffer
296 contains invalid sense data when error-completing the scmd 296 contains invalid sense data when error-completing the scmd
diff --git a/Documentation/scsi/scsi_fc_transport.txt b/Documentation/scsi/scsi_fc_transport.txt
index e00192de4d1..f79282fc48d 100644
--- a/Documentation/scsi/scsi_fc_transport.txt
+++ b/Documentation/scsi/scsi_fc_transport.txt
@@ -291,7 +291,7 @@ Transport <-> LLDD Interfaces :
291Vport support by LLDD: 291Vport support by LLDD:
292 292
293 The LLDD indicates support for vports by supplying a vport_create() 293 The LLDD indicates support for vports by supplying a vport_create()
294 function in the transport template. The presense of this function will 294 function in the transport template. The presence of this function will
295 cause the creation of the new attributes on the fc_host. As part of 295 cause the creation of the new attributes on the fc_host. As part of
296 the physical port completing its initialization relative to the 296 the physical port completing its initialization relative to the
297 transport, it should set the max_npiv_vports attribute to indicate the 297 transport, it should set the max_npiv_vports attribute to indicate the
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index df322c10346..5f17d29c59b 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -1343,7 +1343,7 @@ Members of interest:
1343 underruns (overruns should be rare). If possible an LLD 1343 underruns (overruns should be rare). If possible an LLD
1344 should set 'resid' prior to invoking 'done'. The most 1344 should set 'resid' prior to invoking 'done'. The most
1345 interesting case is data transfers from a SCSI target 1345 interesting case is data transfers from a SCSI target
1346 device device (i.e. READs) that underrun. 1346 device (e.g. READs) that underrun.
1347 underflow - LLD should place (DID_ERROR << 16) in 'result' if 1347 underflow - LLD should place (DID_ERROR << 16) in 'result' if
1348 actual number of bytes transferred is less than this 1348 actual number of bytes transferred is less than this
1349 figure. Not many LLDs implement this check and some that 1349 figure. Not many LLDs implement this check and some that
@@ -1351,6 +1351,18 @@ Members of interest:
1351 report a DID_ERROR. Better for an LLD to implement 1351 report a DID_ERROR. Better for an LLD to implement
1352 'resid'. 1352 'resid'.
1353 1353
1354It is recommended that a LLD set 'resid' on data transfers from a SCSI
1355target device (e.g. READs). It is especially important that 'resid' is set
1356when such data transfers have sense keys of MEDIUM ERROR and HARDWARE ERROR
1357(and possibly RECOVERED ERROR). In these cases if a LLD is in doubt how much
1358data has been received then the safest approach is to indicate no bytes have
1359been received. For example: to indicate that no valid data has been received
1360a LLD might use these helpers:
1361 scsi_set_resid(SCpnt, scsi_bufflen(SCpnt));
1362where 'SCpnt' is a pointer to a scsi_cmnd object. To indicate only three 512
1363bytes blocks has been received 'resid' could be set like this:
1364 scsi_set_resid(SCpnt, scsi_bufflen(SCpnt) - (3 * 512));
1365
1354The scsi_cmnd structure is defined in include/scsi/scsi_cmnd.h 1366The scsi_cmnd structure is defined in include/scsi/scsi_cmnd.h
1355 1367
1356 1368
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt
index 6f63b798967..6af8f7a7770 100644
--- a/Documentation/scsi/sym53c8xx_2.txt
+++ b/Documentation/scsi/sym53c8xx_2.txt
@@ -285,7 +285,7 @@ from the driver.
285 285
2867. Profiling information 2867. Profiling information
287 287
288This driver does not provide profiling informations as did its predecessors. 288This driver does not provide profiling information as did its predecessors.
289This feature was not this useful and added complexity to the code. 289This feature was not this useful and added complexity to the code.
290As the driver code got more complex, I have decided to remove everything 290As the driver code got more complex, I have decided to remove everything
291that didn't seem actually useful. 291that didn't seem actually useful.
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX
new file mode 100644
index 00000000000..19bc49439ca
--- /dev/null
+++ b/Documentation/security/00-INDEX
@@ -0,0 +1,18 @@
100-INDEX
2 - this file.
3SELinux.txt
4 - how to get started with the SELinux security enhancement.
5Smack.txt
6 - documentation on the Smack Linux Security Module.
7apparmor.txt
8 - documentation on the AppArmor security extension.
9credentials.txt
10 - documentation about credentials in Linux.
11keys-request-key.txt
12 - description of the kernel key request service.
13keys-trusted-encrypted.txt
14 - info on the Trusted and Encrypted keys in the kernel key ring service.
15keys.txt
16 - description of the kernel key retention service.
17tomoyo.txt
18 - documentation on the TOMOYO Linux Security Module.
diff --git a/Documentation/SELinux.txt b/Documentation/security/SELinux.txt
index 07eae00f331..07eae00f331 100644
--- a/Documentation/SELinux.txt
+++ b/Documentation/security/SELinux.txt
diff --git a/Documentation/Smack.txt b/Documentation/security/Smack.txt
index e9dab41c0fe..e9dab41c0fe 100644
--- a/Documentation/Smack.txt
+++ b/Documentation/security/Smack.txt
diff --git a/Documentation/apparmor.txt b/Documentation/security/apparmor.txt
index 93c1fd7d063..93c1fd7d063 100644
--- a/Documentation/apparmor.txt
+++ b/Documentation/security/apparmor.txt
diff --git a/Documentation/credentials.txt b/Documentation/security/credentials.txt
index 995baf379c0..fc0366cbd7c 100644
--- a/Documentation/credentials.txt
+++ b/Documentation/security/credentials.txt
@@ -216,7 +216,7 @@ The Linux kernel supports the following types of credentials:
216 When a process accesses a key, if not already present, it will normally be 216 When a process accesses a key, if not already present, it will normally be
217 cached on one of these keyrings for future accesses to find. 217 cached on one of these keyrings for future accesses to find.
218 218
219 For more information on using keys, see Documentation/keys.txt. 219 For more information on using keys, see Documentation/security/keys.txt.
220 220
221 (5) LSM 221 (5) LSM
222 222
diff --git a/Documentation/keys-request-key.txt b/Documentation/security/keys-request-key.txt
index 09b55e46174..51987bfecfe 100644
--- a/Documentation/keys-request-key.txt
+++ b/Documentation/security/keys-request-key.txt
@@ -3,8 +3,8 @@
3 =================== 3 ===================
4 4
5The key request service is part of the key retention service (refer to 5The key request service is part of the key retention service (refer to
6Documentation/keys.txt). This document explains more fully how the requesting 6Documentation/security/keys.txt). This document explains more fully how
7algorithm works. 7the requesting algorithm works.
8 8
9The process starts by either the kernel requesting a service by calling 9The process starts by either the kernel requesting a service by calling
10request_key*(): 10request_key*():
@@ -127,14 +127,15 @@ This is because process A's keyrings can't simply be attached to
127of them, and (b) it requires the same UID/GID/Groups all the way through. 127of them, and (b) it requires the same UID/GID/Groups all the way through.
128 128
129 129
130====================== 130====================================
131NEGATIVE INSTANTIATION 131NEGATIVE INSTANTIATION AND REJECTION
132====================== 132====================================
133 133
134Rather than instantiating a key, it is possible for the possessor of an 134Rather than instantiating a key, it is possible for the possessor of an
135authorisation key to negatively instantiate a key that's under construction. 135authorisation key to negatively instantiate a key that's under construction.
136This is a short duration placeholder that causes any attempt at re-requesting 136This is a short duration placeholder that causes any attempt at re-requesting
137the key whilst it exists to fail with error ENOKEY. 137the key whilst it exists to fail with error ENOKEY if negated or the specified
138error if rejected.
138 139
139This is provided to prevent excessive repeated spawning of /sbin/request-key 140This is provided to prevent excessive repeated spawning of /sbin/request-key
140processes for a key that will never be obtainable. 141processes for a key that will never be obtainable.
diff --git a/Documentation/keys-trusted-encrypted.txt b/Documentation/security/keys-trusted-encrypted.txt
index 8fb79bc1ac4..8fb79bc1ac4 100644
--- a/Documentation/keys-trusted-encrypted.txt
+++ b/Documentation/security/keys-trusted-encrypted.txt
diff --git a/Documentation/keys.txt b/Documentation/security/keys.txt
index e4dbbdb1bd9..4d75931d2d7 100644
--- a/Documentation/keys.txt
+++ b/Documentation/security/keys.txt
@@ -434,7 +434,7 @@ The main syscalls are:
434 /sbin/request-key will be invoked in an attempt to obtain a key. The 434 /sbin/request-key will be invoked in an attempt to obtain a key. The
435 callout_info string will be passed as an argument to the program. 435 callout_info string will be passed as an argument to the program.
436 436
437 See also Documentation/keys-request-key.txt. 437 See also Documentation/security/keys-request-key.txt.
438 438
439 439
440The keyctl syscall functions are: 440The keyctl syscall functions are:
@@ -637,6 +637,9 @@ The keyctl syscall functions are:
637 long keyctl(KEYCTL_INSTANTIATE, key_serial_t key, 637 long keyctl(KEYCTL_INSTANTIATE, key_serial_t key,
638 const void *payload, size_t plen, 638 const void *payload, size_t plen,
639 key_serial_t keyring); 639 key_serial_t keyring);
640 long keyctl(KEYCTL_INSTANTIATE_IOV, key_serial_t key,
641 const struct iovec *payload_iov, unsigned ioc,
642 key_serial_t keyring);
640 643
641 If the kernel calls back to userspace to complete the instantiation of a 644 If the kernel calls back to userspace to complete the instantiation of a
642 key, userspace should use this call to supply data for the key before the 645 key, userspace should use this call to supply data for the key before the
@@ -652,11 +655,16 @@ The keyctl syscall functions are:
652 655
653 The payload and plen arguments describe the payload data as for add_key(). 656 The payload and plen arguments describe the payload data as for add_key().
654 657
658 The payload_iov and ioc arguments describe the payload data in an iovec
659 array instead of a single buffer.
660
655 661
656 (*) Negatively instantiate a partially constructed key. 662 (*) Negatively instantiate a partially constructed key.
657 663
658 long keyctl(KEYCTL_NEGATE, key_serial_t key, 664 long keyctl(KEYCTL_NEGATE, key_serial_t key,
659 unsigned timeout, key_serial_t keyring); 665 unsigned timeout, key_serial_t keyring);
666 long keyctl(KEYCTL_REJECT, key_serial_t key,
667 unsigned timeout, unsigned error, key_serial_t keyring);
660 668
661 If the kernel calls back to userspace to complete the instantiation of a 669 If the kernel calls back to userspace to complete the instantiation of a
662 key, userspace should use this call mark the key as negative before the 670 key, userspace should use this call mark the key as negative before the
@@ -669,6 +677,10 @@ The keyctl syscall functions are:
669 that keyring, however all the constraints applying in KEYCTL_LINK apply in 677 that keyring, however all the constraints applying in KEYCTL_LINK apply in
670 this case too. 678 this case too.
671 679
680 If the key is rejected, future searches for it will return the specified
681 error code until the rejected key expires. Negating the key is the same
682 as rejecting the key with ENOKEY as the error code.
683
672 684
673 (*) Set the default request-key destination keyring. 685 (*) Set the default request-key destination keyring.
674 686
@@ -852,7 +864,7 @@ payload contents" for more information.
852 If successful, the key will have been attached to the default keyring for 864 If successful, the key will have been attached to the default keyring for
853 implicitly obtained request-key keys, as set by KEYCTL_SET_REQKEY_KEYRING. 865 implicitly obtained request-key keys, as set by KEYCTL_SET_REQKEY_KEYRING.
854 866
855 See also Documentation/keys-request-key.txt. 867 See also Documentation/security/keys-request-key.txt.
856 868
857 869
858(*) To search for a key, passing auxiliary data to the upcaller, call: 870(*) To search for a key, passing auxiliary data to the upcaller, call:
@@ -1062,6 +1074,13 @@ The structure has a number of fields, some of which are mandatory:
1062 viable. 1074 viable.
1063 1075
1064 1076
1077 (*) int (*vet_description)(const char *description);
1078
1079 This optional method is called to vet a key description. If the key type
1080 doesn't approve of the key description, it may return an error, otherwise
1081 it should return 0.
1082
1083
1065 (*) int (*instantiate)(struct key *key, const void *data, size_t datalen); 1084 (*) int (*instantiate)(struct key *key, const void *data, size_t datalen);
1066 1085
1067 This method is called to attach a payload to a key during construction. 1086 This method is called to attach a payload to a key during construction.
@@ -1231,10 +1250,11 @@ hand the request off to (perhaps a path held in placed in another key by, for
1231example, the KDE desktop manager). 1250example, the KDE desktop manager).
1232 1251
1233The program (or whatever it calls) should finish construction of the key by 1252The program (or whatever it calls) should finish construction of the key by
1234calling KEYCTL_INSTANTIATE, which also permits it to cache the key in one of 1253calling KEYCTL_INSTANTIATE or KEYCTL_INSTANTIATE_IOV, which also permits it to
1235the keyrings (probably the session ring) before returning. Alternatively, the 1254cache the key in one of the keyrings (probably the session ring) before
1236key can be marked as negative with KEYCTL_NEGATE; this also permits the key to 1255returning. Alternatively, the key can be marked as negative with KEYCTL_NEGATE
1237be cached in one of the keyrings. 1256or KEYCTL_REJECT; this also permits the key to be cached in one of the
1257keyrings.
1238 1258
1239If it returns with the key remaining in the unconstructed state, the key will 1259If it returns with the key remaining in the unconstructed state, the key will
1240be marked as being negative, it will be added to the session keyring, and an 1260be marked as being negative, it will be added to the session keyring, and an
diff --git a/Documentation/tomoyo.txt b/Documentation/security/tomoyo.txt
index 200a2d37cbc..200a2d37cbc 100644
--- a/Documentation/tomoyo.txt
+++ b/Documentation/security/tomoyo.txt
diff --git a/Documentation/serial/moxa-smartio b/Documentation/serial/moxa-smartio
index d1044391868..5d2a33be0bd 100644
--- a/Documentation/serial/moxa-smartio
+++ b/Documentation/serial/moxa-smartio
@@ -473,7 +473,7 @@ Content
473 spd_normal Use 38.4kb when the application requests 38.4kb. 473 spd_normal Use 38.4kb when the application requests 38.4kb.
474 spd_cust Use the custom divisor to set the speed when the 474 spd_cust Use the custom divisor to set the speed when the
475 application requests 38.4kb. 475 application requests 38.4kb.
476 divisor This option set the custom divison. 476 divisor This option set the custom division.
477 baud_base This option set the base baud rate. 477 baud_base This option set the base baud rate.
478 478
479----------------------------------------------------------------------------- 479-----------------------------------------------------------------------------
diff --git a/Documentation/serial/n_gsm.txt b/Documentation/serial/n_gsm.txt
new file mode 100644
index 00000000000..a5d91126a8f
--- /dev/null
+++ b/Documentation/serial/n_gsm.txt
@@ -0,0 +1,89 @@
1n_gsm.c GSM 0710 tty multiplexor HOWTO
2===================================================
3
4This line discipline implements the GSM 07.10 multiplexing protocol
5detailed in the following 3GPP document :
6http://www.3gpp.org/ftp/Specs/archive/07_series/07.10/0710-720.zip
7
8This document give some hints on how to use this driver with GPRS and 3G
9modems connected to a physical serial port.
10
11How to use it
12-------------
131- initialize the modem in 0710 mux mode (usually AT+CMUX= command) through
14its serial port. Depending on the modem used, you can pass more or less
15parameters to this command,
162- switch the serial line to using the n_gsm line discipline by using
17TIOCSETD ioctl,
183- configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl,
19
20Major parts of the initialization program :
21(a good starting point is util-linux-ng/sys-utils/ldattach.c)
22#include <linux/gsmmux.h>
23#define N_GSM0710 21 /* GSM 0710 Mux */
24#define DEFAULT_SPEED B115200
25#define SERIAL_PORT /dev/ttyS0
26
27 int ldisc = N_GSM0710;
28 struct gsm_config c;
29 struct termios configuration;
30
31 /* open the serial port connected to the modem */
32 fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
33
34 /* configure the serial port : speed, flow control ... */
35
36 /* send the AT commands to switch the modem to CMUX mode
37 and check that it's successful (should return OK) */
38 write(fd, "AT+CMUX=0\r", 10);
39
40 /* experience showed that some modems need some time before
41 being able to answer to the first MUX packet so a delay
42 may be needed here in some case */
43 sleep(3);
44
45 /* use n_gsm line discipline */
46 ioctl(fd, TIOCSETD, &ldisc);
47
48 /* get n_gsm configuration */
49 ioctl(fd, GSMIOC_GETCONF, &c);
50 /* we are initiator and need encoding 0 (basic) */
51 c.initiator = 1;
52 c.encapsulation = 0;
53 /* our modem defaults to a maximum size of 127 bytes */
54 c.mru = 127;
55 c.mtu = 127;
56 /* set the new configuration */
57 ioctl(fd, GSMIOC_SETCONF, &c);
58
59 /* and wait for ever to keep the line discipline enabled */
60 daemon(0,0);
61 pause();
62
634- create the devices corresponding to the "virtual" serial ports (take care,
64each modem has its configuration and some DLC have dedicated functions,
65for example GPS), starting with minor 1 (DLC0 is reserved for the management
66of the mux)
67
68MAJOR=`cat /proc/devices |grep gsmtty | awk '{print $1}`
69for i in `seq 1 4`; do
70 mknod /dev/ttygsm$i c $MAJOR $i
71done
72
735- use these devices as plain serial ports.
74for example, it's possible :
75- and to use gnokii to send / receive SMS on ttygsm1
76- to use ppp to establish a datalink on ttygsm2
77
786- first close all virtual ports before closing the physical port.
79
80Additional Documentation
81------------------------
82More practical details on the protocol and how it's supported by industrial
83modems can be found in the following documents :
84http://www.telit.com/module/infopool/download.php?id=616
85http://www.u-blox.com/images/downloads/Product_Docs/LEON-G100-G200-MuxImplementation_ApplicationNote_%28GSM%20G1-CS-10002%29.pdf
86http://www.sierrawireless.com/Support/Downloads/AirPrime/WMP_Series/~/media/Support_Downloads/AirPrime/Application_notes/CMUX_Feature_Application_Note-Rev004.ashx
87http://wm.sim.com/sim/News/photo/2010721161442.pdf
88
8911-03-08 - Eric Bénard - <eric@eukrea.com>
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 3c1eddd9fcc..89757012c7f 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -322,7 +322,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
322 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) 322 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
323 or the value stored in the card's EEPROM for cards that have an EEPROM and 323 or the value stored in the card's EEPROM for cards that have an EEPROM and
324 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can 324 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
325 be choosen freely from the options enumerated above. 325 be chosen freely from the options enumerated above.
326 326
327 If dma2 is specified and different from dma1, the card will operate in 327 If dma2 is specified and different from dma1, the card will operate in
328 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to 328 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -356,7 +356,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
356 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) 356 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
357 or the value stored in the card's EEPROM for cards that have an EEPROM and 357 or the value stored in the card's EEPROM for cards that have an EEPROM and
358 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can 358 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
359 be choosen freely from the options enumerated above. 359 be chosen freely from the options enumerated above.
360 360
361 If dma2 is specified and different from dma1, the card will operate in 361 If dma2 is specified and different from dma1, the card will operate in
362 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to 362 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -1230,6 +1230,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1230 This module supports multiple cards. 1230 This module supports multiple cards.
1231 The driver requires the firmware loader support on kernel. 1231 The driver requires the firmware loader support on kernel.
1232 1232
1233 Module snd-lola
1234 ---------------
1235
1236 Module for Digigram Lola PCI-e boards
1237
1238 This module supports multiple cards.
1239
1233 Module snd-lx6464es 1240 Module snd-lx6464es
1234 ------------------- 1241 -------------------
1235 1242
@@ -2229,7 +2236,7 @@ Proc interfaces (/proc/asound)
2229 2236
2230/proc/asound/card#/pcm#[cp]/oss 2237/proc/asound/card#/pcm#[cp]/oss
2231------------------------------- 2238-------------------------------
2232 String "erase" - erase all additional informations about OSS applications 2239 String "erase" - erase all additional information about OSS applications
2233 String "<app_name> <fragments> <fragment_size> [<options>]" 2240 String "<app_name> <fragments> <fragment_size> [<options>]"
2234 2241
2235 <app_name> - name of application with (higher priority) or without path 2242 <app_name> - name of application with (higher priority) or without path
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 0caf77e59be..d70c93bdcad 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -94,7 +94,7 @@ ALC662/663/272
94 3stack-dig 3-stack (2-channel) with SPDIF 94 3stack-dig 3-stack (2-channel) with SPDIF
95 3stack-6ch 3-stack (6-channel) 95 3stack-6ch 3-stack (6-channel)
96 3stack-6ch-dig 3-stack (6-channel) with SPDIF 96 3stack-6ch-dig 3-stack (6-channel) with SPDIF
97 6stack-dig 6-stack with SPDIF 97 5stack-dig 5-stack with SPDIF
98 lenovo-101e Lenovo laptop 98 lenovo-101e Lenovo laptop
99 eeepc-p701 ASUS Eeepc P701 99 eeepc-p701 ASUS Eeepc P701
100 eeepc-ep20 ASUS Eeepc EP20 100 eeepc-ep20 ASUS Eeepc EP20
diff --git a/Documentation/sound/alsa/SB-Live-mixer.txt b/Documentation/sound/alsa/SB-Live-mixer.txt
index f5639d40521..f4b5988f450 100644
--- a/Documentation/sound/alsa/SB-Live-mixer.txt
+++ b/Documentation/sound/alsa/SB-Live-mixer.txt
@@ -87,14 +87,14 @@ accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
87The result is forwarded to the ADC capture FIFO (thus to the standard capture 87The result is forwarded to the ADC capture FIFO (thus to the standard capture
88PCM device). 88PCM device).
89 89
90name='Music Playback Volume',index=0 90name='Synth Playback Volume',index=0
91 91
92This control is used to attenuate samples for left and right MIDI FX-bus 92This control is used to attenuate samples for left and right MIDI FX-bus
93accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples. 93accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
94The result samples are forwarded to the front DAC PCM slots of the AC97 codec. 94The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
95 95
96name='Music Capture Volume',index=0 96name='Synth Capture Volume',index=0
97name='Music Capture Switch',index=0 97name='Synth Capture Switch',index=0
98 98
99These controls are used to attenuate samples for left and right MIDI FX-bus 99These controls are used to attenuate samples for left and right MIDI FX-bus
100accumulator. ALSA uses accumulators 4 and 5 for left and right PCM. 100accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16
index c0f08922993..e0dc0641b48 100644
--- a/Documentation/sound/oss/AudioExcelDSP16
+++ b/Documentation/sound/oss/AudioExcelDSP16
@@ -1,10 +1,10 @@
1Driver 1Driver
2------ 2------
3 3
4Informations about Audio Excel DSP 16 driver can be found in the source 4Information about Audio Excel DSP 16 driver can be found in the source
5file aedsp16.c 5file aedsp16.c
6Please, read the head of the source before using it. It contain useful 6Please, read the head of the source before using it. It contain useful
7informations. 7information.
8 8
9Configuration 9Configuration
10------------- 10-------------
@@ -68,7 +68,7 @@ Sound cards supported
68This driver supports the SC-6000 and SC-6600 based Gallant's sound card. 68This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
69It don't support the Audio Excel DSP 16 III (try the SC-6600 code). 69It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
70I'm working on the III version of the card: if someone have useful 70I'm working on the III version of the card: if someone have useful
71informations about it, please let me know. 71information about it, please let me know.
72For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) 72For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
73activating the audio card with the MS-DOS device driver, then you have to 73activating the audio card with the MS-DOS device driver, then you have to
74<ctrl>-<alt>-<del> and boot Linux. 74<ctrl>-<alt>-<del> and boot Linux.
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS
index c615debbf08..4be259428a1 100644
--- a/Documentation/sound/oss/README.OSS
+++ b/Documentation/sound/oss/README.OSS
@@ -1352,7 +1352,7 @@ OSS-mixer.
1352The PCM20 contains a radio tuner, which is also controlled by 1352The PCM20 contains a radio tuner, which is also controlled by
1353ACI. This radio tuner is supported by the ACI driver together with the 1353ACI. This radio tuner is supported by the ACI driver together with the
1354miropcm20.o module. Also the 7-band equalizer is integrated 1354miropcm20.o module. Also the 7-band equalizer is integrated
1355(limited by the OSS-design). Developement has started and maybe 1355(limited by the OSS-design). Development has started and maybe
1356finished for the RDS decoder on this card, too. You will be able to 1356finished for the RDS decoder on this card, too. You will be able to
1357read RadioText, the Programme Service name, Programme TYpe and 1357read RadioText, the Programme Service name, Programme TYpe and
1358others. Even the v4l radio module benefits from it with a refined 1358others. Even the v4l radio module benefits from it with a refined
diff --git a/Documentation/sound/oss/README.ymfsb b/Documentation/sound/oss/README.ymfsb
index af8a7d3a4e8..b6b77906b58 100644
--- a/Documentation/sound/oss/README.ymfsb
+++ b/Documentation/sound/oss/README.ymfsb
@@ -5,7 +5,7 @@ FIRST OF ALL
5============ 5============
6 6
7 This code references YAMAHA's sample codes and data sheets. 7 This code references YAMAHA's sample codes and data sheets.
8 I respect and thank for all people they made open the informations 8 I respect and thank for all people they made open the information
9 about YMF7xx cards. 9 about YMF7xx cards.
10 10
11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s 11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index 68a4fe3818a..493dada5737 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -143,7 +143,7 @@ configured to use SSPFRM instead.
143NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the 143NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the
144chipselect is dropped after each spi_transfer. Most devices need chip select 144chipselect is dropped after each spi_transfer. Most devices need chip select
145asserted around the complete message. Use SSPFRM as a GPIO (through cs_control) 145asserted around the complete message. Use SSPFRM as a GPIO (through cs_control)
146to accomodate these chips. 146to accommodate these chips.
147 147
148 148
149NSSP SLAVE SAMPLE 149NSSP SLAVE SAMPLE
diff --git a/Documentation/spi/spi-lm70llp b/Documentation/spi/spi-lm70llp
index 34a9cfd746b..463f6d01fa1 100644
--- a/Documentation/spi/spi-lm70llp
+++ b/Documentation/spi/spi-lm70llp
@@ -46,7 +46,7 @@ The hardware interfacing on the LM70 LLP eval board is as follows:
46 46
47Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin 47Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin
48is connected to both pin D7 (as Master Out) and Select (as Master In) 48is connected to both pin D7 (as Master Out) and Select (as Master In)
49using an arrangment that lets either the parport or the LM70 pull the 49using an arrangement that lets either the parport or the LM70 pull the
50pin low. This can't be shared with true SPI devices, but other 3-wire 50pin low. This can't be shared with true SPI devices, but other 3-wire
51devices might share the same SI/SO pin. 51devices might share the same SI/SO pin.
52 52
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 178c831b907..2e3c64b1a6a 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -86,7 +86,7 @@ to change the variables it has to get an exclusive write lock.
86 86
87The routines look the same as above: 87The routines look the same as above:
88 88
89 rwlock_t xxx_lock = RW_LOCK_UNLOCKED; 89 rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock);
90 90
91 unsigned long flags; 91 unsigned long flags;
92 92
@@ -196,25 +196,3 @@ appropriate:
196 196
197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or 197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or
198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate. 198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate.
199
200SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere
201with lockdep state tracking.
202
203Most of the time, you can simply turn:
204 static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
205into:
206 static DEFINE_SPINLOCK(xxx_lock);
207
208Static structure member variables go from:
209
210 struct foo bar {
211 .lock = SPIN_LOCK_UNLOCKED;
212 };
213
214to:
215
216 struct foo bar {
217 .lock = __SPIN_LOCK_UNLOCKED(bar.lock);
218 };
219
220Declaration of static rw_locks undergo a similar transformation.
diff --git a/Documentation/stable_api_nonsense.txt b/Documentation/stable_api_nonsense.txt
index 847b342b7b2..db3be892afb 100644
--- a/Documentation/stable_api_nonsense.txt
+++ b/Documentation/stable_api_nonsense.txt
@@ -122,7 +122,7 @@ operating system to suffer.
122 122
123In both of these instances, all developers agreed that these were 123In both of these instances, all developers agreed that these were
124important changes that needed to be made, and they were made, with 124important changes that needed to be made, and they were made, with
125relatively little pain. If Linux had to ensure that it preserve a 125relatively little pain. If Linux had to ensure that it will preserve a
126stable source interface, a new interface would have been created, and 126stable source interface, a new interface would have been created, and
127the older, broken one would have had to be maintained over time, leading 127the older, broken one would have had to be maintained over time, leading
128to extra work for the USB developers. Since all Linux USB developers do 128to extra work for the USB developers. Since all Linux USB developers do
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
index 62682500878..88fd7f5c8dc 100644
--- a/Documentation/sysctl/fs.txt
+++ b/Documentation/sysctl/fs.txt
@@ -88,20 +88,19 @@ you might want to raise the limit.
88 88
89file-max & file-nr: 89file-max & file-nr:
90 90
91The kernel allocates file handles dynamically, but as yet it
92doesn't free them again.
93
94The value in file-max denotes the maximum number of file- 91The value in file-max denotes the maximum number of file-
95handles that the Linux kernel will allocate. When you get lots 92handles that the Linux kernel will allocate. When you get lots
96of error messages about running out of file handles, you might 93of error messages about running out of file handles, you might
97want to increase this limit. 94want to increase this limit.
98 95
99Historically, the three values in file-nr denoted the number of 96Historically,the kernel was able to allocate file handles
100allocated file handles, the number of allocated but unused file 97dynamically, but not to free them again. The three values in
101handles, and the maximum number of file handles. Linux 2.6 always 98file-nr denote the number of allocated file handles, the number
102reports 0 as the number of free file handles -- this is not an 99of allocated but unused file handles, and the maximum number of
103error, it just means that the number of allocated file handles 100file handles. Linux 2.6 always reports 0 as the number of free
104exactly matches the number of used file handles. 101file handles -- this is not an error, it just means that the
102number of allocated file handles exactly matches the number of
103used file handles.
105 104
106Attempts to allocate more file descriptors than file-max are 105Attempts to allocate more file descriptors than file-max are
107reported with printk, look for "VFS: file-max limit <number> 106reported with printk, look for "VFS: file-max limit <number>
@@ -232,13 +231,6 @@ its creation).
232 231
233This directory contains configuration options for the epoll(7) interface. 232This directory contains configuration options for the epoll(7) interface.
234 233
235max_user_instances
236------------------
237
238This is the maximum number of epoll file descriptors that a single user can
239have open at a given time. The default value is 128, and should be enough
240for normal users.
241
242max_user_watches 234max_user_watches
243---------------- 235----------------
244 236
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 11d5ceda5bb..5e7cb39ad19 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -161,7 +161,8 @@ core_pattern is used to specify a core dumpfile pattern name.
161 %s signal number 161 %s signal number
162 %t UNIX time of dump 162 %t UNIX time of dump
163 %h hostname 163 %h hostname
164 %e executable filename 164 %e executable filename (may be shortened)
165 %E executable path
165 %<OTHER> both are dropped 166 %<OTHER> both are dropped
166. If the first character of the pattern is a '|', the kernel will treat 167. If the first character of the pattern is a '|', the kernel will treat
167 the rest of the pattern as a command to run. The core dump will be 168 the rest of the pattern as a command to run. The core dump will be
@@ -367,7 +368,7 @@ the different loglevels.
367 368
368- console_loglevel: messages with a higher priority than 369- console_loglevel: messages with a higher priority than
369 this will be printed to the console 370 this will be printed to the console
370- default_message_level: messages without an explicit priority 371- default_message_loglevel: messages without an explicit priority
371 will be printed with this priority 372 will be printed with this priority
372- minimum_console_loglevel: minimum (highest) value to which 373- minimum_console_loglevel: minimum (highest) value to which
373 console_loglevel can be set 374 console_loglevel can be set
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index cbd05ffc606..3201a7097e4 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -32,6 +32,17 @@ Table : Subdirectories in /proc/sys/net
321. /proc/sys/net/core - Network core options 321. /proc/sys/net/core - Network core options
33------------------------------------------------------- 33-------------------------------------------------------
34 34
35bpf_jit_enable
36--------------
37
38This enables Berkeley Packet Filter Just in Time compiler.
39Currently supported on x86_64 architecture, bpf_jit provides a framework
40to speed packet filtering, the one used by tcpdump/libpcap for example.
41Values :
42 0 - disable the JIT (default value)
43 1 - enable the JIT
44 2 - enable the JIT and ask the compiler to emit traces on kernel log.
45
35rmem_default 46rmem_default
36------------ 47------------
37 48
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 30289fab86e..96f0ee825be 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -481,10 +481,10 @@ the DMA zone.
481Type(A) is called as "Node" order. Type (B) is "Zone" order. 481Type(A) is called as "Node" order. Type (B) is "Zone" order.
482 482
483"Node order" orders the zonelists by node, then by zone within each node. 483"Node order" orders the zonelists by node, then by zone within each node.
484Specify "[Nn]ode" for zone order 484Specify "[Nn]ode" for node order
485 485
486"Zone Order" orders the zonelists by zone type, then by node within each 486"Zone Order" orders the zonelists by zone type, then by node within each
487zone. Specify "[Zz]one"for zode order. 487zone. Specify "[Zz]one" for zone order.
488 488
489Specify "[Dd]efault" to request automatic configuration. Autoconfiguration 489Specify "[Dd]efault" to request automatic configuration. Autoconfiguration
490will select "node" order in following case. 490will select "node" order in following case.
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index dbeb8a0d717..7ef9b843d52 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -239,8 +239,8 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
239 buf += "#include <target/target_core_configfs.h>\n" 239 buf += "#include <target/target_core_configfs.h>\n"
240 buf += "#include <target/target_core_base.h>\n" 240 buf += "#include <target/target_core_base.h>\n"
241 buf += "#include <target/configfs_macros.h>\n\n" 241 buf += "#include <target/configfs_macros.h>\n\n"
242 buf += "#include <" + fabric_mod_name + "_base.h>\n" 242 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
243 buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" 243 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
244 244
245 buf += "/* Local pointer to allocated TCM configfs fabric module */\n" 245 buf += "/* Local pointer to allocated TCM configfs fabric module */\n"
246 buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" 246 buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n"
@@ -289,6 +289,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
289 buf += "{\n" 289 buf += "{\n"
290 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" 290 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
291 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" 291 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
292 buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n"
292 buf += " kfree(nacl);\n" 293 buf += " kfree(nacl);\n"
293 buf += "}\n\n" 294 buf += "}\n\n"
294 295
@@ -583,9 +584,9 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
583 buf += "#include <target/target_core_fabric_lib.h>\n" 584 buf += "#include <target/target_core_fabric_lib.h>\n"
584 buf += "#include <target/target_core_device.h>\n" 585 buf += "#include <target/target_core_device.h>\n"
585 buf += "#include <target/target_core_tpg.h>\n" 586 buf += "#include <target/target_core_tpg.h>\n"
586 buf += "#include <target/target_core_configfs.h>\n" 587 buf += "#include <target/target_core_configfs.h>\n\n"
587 buf += "#include <" + fabric_mod_name + "_base.h>\n" 588 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
588 buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" 589 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
589 590
590 buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" 591 buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
591 buf += "{\n" 592 buf += "{\n"
@@ -973,14 +974,13 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
973def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): 974def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
974 975
975 buf = "" 976 buf = ""
976 f = fabric_mod_dir_var + "/Kbuild" 977 f = fabric_mod_dir_var + "/Makefile"
977 print "Writing file: " + f 978 print "Writing file: " + f
978 979
979 p = open(f, 'w') 980 p = open(f, 'w')
980 if not p: 981 if not p:
981 tcm_mod_err("Unable to open file: " + f) 982 tcm_mod_err("Unable to open file: " + f)
982 983
983 buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
984 buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n" 984 buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n"
985 buf += " " + fabric_mod_name + "_configfs.o\n" 985 buf += " " + fabric_mod_name + "_configfs.o\n"
986 buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n" 986 buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n"
@@ -1018,7 +1018,7 @@ def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name):
1018 1018
1019def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name): 1019def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name):
1020 buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n" 1020 buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n"
1021 kbuild = tcm_dir + "/drivers/target/Kbuild" 1021 kbuild = tcm_dir + "/drivers/target/Makefile"
1022 1022
1023 f = open(kbuild, 'a') 1023 f = open(kbuild, 'a')
1024 f.write(buf) 1024 f.write(buf)
@@ -1064,7 +1064,7 @@ def main(modname, proto_ident):
1064 tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name) 1064 tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name)
1065 tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name) 1065 tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name)
1066 1066
1067 input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ") 1067 input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: ")
1068 if input == "yes" or input == "y": 1068 if input == "yes" or input == "y":
1069 tcm_mod_add_kbuild(tcm_dir, fabric_mod_name) 1069 tcm_mod_add_kbuild(tcm_dir, fabric_mod_name)
1070 1070
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt
index 4fb314d5170..db94fb6c567 100644
--- a/Documentation/telephony/ixj.txt
+++ b/Documentation/telephony/ixj.txt
@@ -51,7 +51,7 @@ be removed to protect the rights of others.
51Specifically, very old Internet PhoneJACK cards have non-standard 51Specifically, very old Internet PhoneJACK cards have non-standard
52G.723.1 codecs (due to the early nature of the DSPs in those days). 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 53The auto-conversion code to bring those cards into compliance with
54todays standards is available as a binary only module to those people 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 - 55needing it. If you bought your card after 1997 or so, you are OK -
56it's only the very old cards that are affected. 56it's only the very old cards that are affected.
57 57
diff --git a/Documentation/timers/timers-howto.txt b/Documentation/timers/timers-howto.txt
index c9ef29d2ede..038f8c77a07 100644
--- a/Documentation/timers/timers-howto.txt
+++ b/Documentation/timers/timers-howto.txt
@@ -24,7 +24,7 @@ ATOMIC CONTEXT:
24 24
25 ndelay(unsigned long nsecs) 25 ndelay(unsigned long nsecs)
26 udelay(unsigned long usecs) 26 udelay(unsigned long usecs)
27 mdelay(unsgined long msecs) 27 mdelay(unsigned long msecs)
28 28
29 udelay is the generally preferred API; ndelay-level 29 udelay is the generally preferred API; ndelay-level
30 precision may not actually exist on many non-PC devices. 30 precision may not actually exist on many non-PC devices.
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index dc52bd442c9..79fcafc7fd6 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -247,6 +247,13 @@ You need very few things to get the syscalls tracing in an arch.
247- Support the TIF_SYSCALL_TRACEPOINT thread flags. 247- Support the TIF_SYSCALL_TRACEPOINT thread flags.
248- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace 248- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
249 in the ptrace syscalls tracing path. 249 in the ptrace syscalls tracing path.
250- If the system call table on this arch is more complicated than a simple array
251 of addresses of the system calls, implement an arch_syscall_addr to return
252 the address of a given system call.
253- If the symbol names of the system calls do not match the function names on
254 this arch, define ARCH_HAS_SYSCALL_MATCH_SYM_NAME in asm/ftrace.h and
255 implement arch_syscall_match_sym_name with the appropriate logic to return
256 true if the function name corresponds with the symbol name.
250- Tag this arch as HAVE_SYSCALL_TRACEPOINTS. 257- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.
251 258
252 259
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 557c1edecca..1ebc24cf9a5 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -80,11 +80,11 @@ of ftrace. Here is a list of some of the key files:
80 tracers listed here can be configured by 80 tracers listed here can be configured by
81 echoing their name into current_tracer. 81 echoing their name into current_tracer.
82 82
83 tracing_enabled: 83 tracing_on:
84 84
85 This sets or displays whether the current_tracer 85 This sets or displays whether writing to the trace
86 is activated and tracing or not. Echo 0 into this 86 ring buffer is enabled. Echo 0 into this file to disable
87 file to disable the tracer or 1 to enable it. 87 the tracer or 1 to enable it.
88 88
89 trace: 89 trace:
90 90
@@ -202,10 +202,6 @@ Here is the list of current tracers that may be configured.
202 to draw a graph of function calls similar to C code 202 to draw a graph of function calls similar to C code
203 source. 203 source.
204 204
205 "sched_switch"
206
207 Traces the context switches and wakeups between tasks.
208
209 "irqsoff" 205 "irqsoff"
210 206
211 Traces the areas that disable interrupts and saves 207 Traces the areas that disable interrupts and saves
@@ -273,39 +269,6 @@ format, the function name that was traced "path_put" and the
273parent function that called this function "path_walk". The 269parent function that called this function "path_walk". The
274timestamp is the time at which the function was entered. 270timestamp is the time at which the function was entered.
275 271
276The sched_switch tracer also includes tracing of task wakeups
277and context switches.
278
279 ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 2916:115:S
280 ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 10:115:S
281 ksoftirqd/1-7 [01] 1453.070013: 7:115:R ==> 10:115:R
282 events/1-10 [01] 1453.070013: 10:115:S ==> 2916:115:R
283 kondemand/1-2916 [01] 1453.070013: 2916:115:S ==> 7:115:R
284 ksoftirqd/1-7 [01] 1453.070013: 7:115:S ==> 0:140:R
285
286Wake ups are represented by a "+" and the context switches are
287shown as "==>". The format is:
288
289 Context switches:
290
291 Previous task Next Task
292
293 <pid>:<prio>:<state> ==> <pid>:<prio>:<state>
294
295 Wake ups:
296
297 Current task Task waking up
298
299 <pid>:<prio>:<state> + <pid>:<prio>:<state>
300
301The prio is the internal kernel priority, which is the inverse
302of the priority that is usually displayed by user-space tools.
303Zero represents the highest priority (99). Prio 100 starts the
304"nice" priorities with 100 being equal to nice -20 and 139 being
305nice 19. The prio "140" is reserved for the idle task which is
306the lowest priority thread (pid 0).
307
308
309Latency trace format 272Latency trace format
310-------------------- 273--------------------
311 274
@@ -491,78 +454,10 @@ x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
491 latencies, as described in "Latency 454 latencies, as described in "Latency
492 trace format". 455 trace format".
493 456
494sched_switch 457 overwrite - This controls what happens when the trace buffer is
495------------ 458 full. If "1" (default), the oldest events are
496 459 discarded and overwritten. If "0", then the newest
497This tracer simply records schedule switches. Here is an example 460 events are discarded.
498of how to use it.
499
500 # echo sched_switch > current_tracer
501 # echo 1 > tracing_enabled
502 # sleep 1
503 # echo 0 > tracing_enabled
504 # cat trace
505
506# tracer: sched_switch
507#
508# TASK-PID CPU# TIMESTAMP FUNCTION
509# | | | | |
510 bash-3997 [01] 240.132281: 3997:120:R + 4055:120:R
511 bash-3997 [01] 240.132284: 3997:120:R ==> 4055:120:R
512 sleep-4055 [01] 240.132371: 4055:120:S ==> 3997:120:R
513 bash-3997 [01] 240.132454: 3997:120:R + 4055:120:S
514 bash-3997 [01] 240.132457: 3997:120:R ==> 4055:120:R
515 sleep-4055 [01] 240.132460: 4055:120:D ==> 3997:120:R
516 bash-3997 [01] 240.132463: 3997:120:R + 4055:120:D
517 bash-3997 [01] 240.132465: 3997:120:R ==> 4055:120:R
518 <idle>-0 [00] 240.132589: 0:140:R + 4:115:S
519 <idle>-0 [00] 240.132591: 0:140:R ==> 4:115:R
520 ksoftirqd/0-4 [00] 240.132595: 4:115:S ==> 0:140:R
521 <idle>-0 [00] 240.132598: 0:140:R + 4:115:S
522 <idle>-0 [00] 240.132599: 0:140:R ==> 4:115:R
523 ksoftirqd/0-4 [00] 240.132603: 4:115:S ==> 0:140:R
524 sleep-4055 [01] 240.133058: 4055:120:S ==> 3997:120:R
525 [...]
526
527
528As we have discussed previously about this format, the header
529shows the name of the trace and points to the options. The
530"FUNCTION" is a misnomer since here it represents the wake ups
531and context switches.
532
533The sched_switch file only lists the wake ups (represented with
534'+') and context switches ('==>') with the previous task or
535current task first followed by the next task or task waking up.
536The format for both of these is PID:KERNEL-PRIO:TASK-STATE.
537Remember that the KERNEL-PRIO is the inverse of the actual
538priority with zero (0) being the highest priority and the nice
539values starting at 100 (nice -20). Below is a quick chart to map
540the kernel priority to user land priorities.
541
542 Kernel Space User Space
543 ===============================================================
544 0(high) to 98(low) user RT priority 99(high) to 1(low)
545 with SCHED_RR or SCHED_FIFO
546 ---------------------------------------------------------------
547 99 sched_priority is not used in scheduling
548 decisions(it must be specified as 0)
549 ---------------------------------------------------------------
550 100(high) to 139(low) user nice -20(high) to 19(low)
551 ---------------------------------------------------------------
552 140 idle task priority
553 ---------------------------------------------------------------
554
555The task states are:
556
557 R - running : wants to run, may not actually be running
558 S - sleep : process is waiting to be woken up (handles signals)
559 D - disk sleep (uninterruptible sleep) : process must be woken up
560 (ignores signals)
561 T - stopped : process suspended
562 t - traced : process is being traced (with something like gdb)
563 Z - zombie : process waiting to be cleaned up
564 X - unknown
565
566 461
567ftrace_enabled 462ftrace_enabled
568-------------- 463--------------
@@ -607,10 +502,10 @@ an example:
607 # echo irqsoff > current_tracer 502 # echo irqsoff > current_tracer
608 # echo latency-format > trace_options 503 # echo latency-format > trace_options
609 # echo 0 > tracing_max_latency 504 # echo 0 > tracing_max_latency
610 # echo 1 > tracing_enabled 505 # echo 1 > tracing_on
611 # ls -ltr 506 # ls -ltr
612 [...] 507 [...]
613 # echo 0 > tracing_enabled 508 # echo 0 > tracing_on
614 # cat trace 509 # cat trace
615# tracer: irqsoff 510# tracer: irqsoff
616# 511#
@@ -715,10 +610,10 @@ is much like the irqsoff tracer.
715 # echo preemptoff > current_tracer 610 # echo preemptoff > current_tracer
716 # echo latency-format > trace_options 611 # echo latency-format > trace_options
717 # echo 0 > tracing_max_latency 612 # echo 0 > tracing_max_latency
718 # echo 1 > tracing_enabled 613 # echo 1 > tracing_on
719 # ls -ltr 614 # ls -ltr
720 [...] 615 [...]
721 # echo 0 > tracing_enabled 616 # echo 0 > tracing_on
722 # cat trace 617 # cat trace
723# tracer: preemptoff 618# tracer: preemptoff
724# 619#
@@ -863,10 +758,10 @@ tracers.
863 # echo preemptirqsoff > current_tracer 758 # echo preemptirqsoff > current_tracer
864 # echo latency-format > trace_options 759 # echo latency-format > trace_options
865 # echo 0 > tracing_max_latency 760 # echo 0 > tracing_max_latency
866 # echo 1 > tracing_enabled 761 # echo 1 > tracing_on
867 # ls -ltr 762 # ls -ltr
868 [...] 763 [...]
869 # echo 0 > tracing_enabled 764 # echo 0 > tracing_on
870 # cat trace 765 # cat trace
871# tracer: preemptirqsoff 766# tracer: preemptirqsoff
872# 767#
@@ -1026,9 +921,9 @@ Instead of performing an 'ls', we will run 'sleep 1' under
1026 # echo wakeup > current_tracer 921 # echo wakeup > current_tracer
1027 # echo latency-format > trace_options 922 # echo latency-format > trace_options
1028 # echo 0 > tracing_max_latency 923 # echo 0 > tracing_max_latency
1029 # echo 1 > tracing_enabled 924 # echo 1 > tracing_on
1030 # chrt -f 5 sleep 1 925 # chrt -f 5 sleep 1
1031 # echo 0 > tracing_enabled 926 # echo 0 > tracing_on
1032 # cat trace 927 # cat trace
1033# tracer: wakeup 928# tracer: wakeup
1034# 929#
@@ -1140,9 +1035,9 @@ ftrace_enabled is set; otherwise this tracer is a nop.
1140 1035
1141 # sysctl kernel.ftrace_enabled=1 1036 # sysctl kernel.ftrace_enabled=1
1142 # echo function > current_tracer 1037 # echo function > current_tracer
1143 # echo 1 > tracing_enabled 1038 # echo 1 > tracing_on
1144 # usleep 1 1039 # usleep 1
1145 # echo 0 > tracing_enabled 1040 # echo 0 > tracing_on
1146 # cat trace 1041 # cat trace
1147# tracer: function 1042# tracer: function
1148# 1043#
@@ -1180,7 +1075,7 @@ int trace_fd;
1180[...] 1075[...]
1181int main(int argc, char *argv[]) { 1076int main(int argc, char *argv[]) {
1182 [...] 1077 [...]
1183 trace_fd = open(tracing_file("tracing_enabled"), O_WRONLY); 1078 trace_fd = open(tracing_file("tracing_on"), O_WRONLY);
1184 [...] 1079 [...]
1185 if (condition_hit()) { 1080 if (condition_hit()) {
1186 write(trace_fd, "0", 1); 1081 write(trace_fd, "0", 1);
@@ -1631,9 +1526,9 @@ If I am only interested in sys_nanosleep and hrtimer_interrupt:
1631 # echo sys_nanosleep hrtimer_interrupt \ 1526 # echo sys_nanosleep hrtimer_interrupt \
1632 > set_ftrace_filter 1527 > set_ftrace_filter
1633 # echo function > current_tracer 1528 # echo function > current_tracer
1634 # echo 1 > tracing_enabled 1529 # echo 1 > tracing_on
1635 # usleep 1 1530 # usleep 1
1636 # echo 0 > tracing_enabled 1531 # echo 0 > tracing_on
1637 # cat trace 1532 # cat trace
1638# tracer: ftrace 1533# tracer: ftrace
1639# 1534#
@@ -1879,9 +1774,9 @@ different. The trace is live.
1879 # echo function > current_tracer 1774 # echo function > current_tracer
1880 # cat trace_pipe > /tmp/trace.out & 1775 # cat trace_pipe > /tmp/trace.out &
1881[1] 4153 1776[1] 4153
1882 # echo 1 > tracing_enabled 1777 # echo 1 > tracing_on
1883 # usleep 1 1778 # usleep 1
1884 # echo 0 > tracing_enabled 1779 # echo 0 > tracing_on
1885 # cat trace 1780 # cat trace
1886# tracer: function 1781# tracer: function
1887# 1782#
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index 5f77d94598d..c83bd6b4e6e 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -42,11 +42,25 @@ Synopsis of kprobe_events
42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) 42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG. 43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types 44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
45 (u8/u16/u32/u64/s8/s16/s32/s64) and string are supported. 45 (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield
46 are supported.
46 47
47 (*) only for return probe. 48 (*) only for return probe.
48 (**) this is useful for fetching a field of data structures. 49 (**) this is useful for fetching a field of data structures.
49 50
51Types
52-----
53Several types are supported for fetch-args. Kprobe tracer will access memory
54by given type. Prefix 's' and 'u' means those types are signed and unsigned
55respectively. Traced arguments are shown in decimal (signed) or hex (unsigned).
56String type is a special type, which fetches a "null-terminated" string from
57kernel space. This means it will fail and store NULL if the string container
58has been paged out.
59Bitfield is another special type, which takes 3 parameters, bit-width, bit-
60offset, and container-size (usually 32). The syntax is;
61
62 b<bit-width>@<bit-offset>/<container-size>
63
50 64
51Per-Probe Event Filtering 65Per-Probe Event Filtering
52------------------------- 66-------------------------
@@ -106,7 +120,6 @@ format:
106 field:unsigned char common_flags; offset:2; size:1; signed:0; 120 field:unsigned char common_flags; offset:2; size:1; signed:0;
107 field:unsigned char common_preempt_count; offset:3; size:1;signed:0; 121 field:unsigned char common_preempt_count; offset:3; size:1;signed:0;
108 field:int common_pid; offset:4; size:4; signed:1; 122 field:int common_pid; offset:4; size:4; signed:1;
109 field:int common_lock_depth; offset:8; size:4; signed:1;
110 123
111 field:unsigned long __probe_ip; offset:12; size:4; signed:0; 124 field:unsigned long __probe_ip; offset:12; size:4; signed:0;
112 field:int __probe_nargs; offset:16; size:4; signed:1; 125 field:int __probe_nargs; offset:16; size:4; signed:1;
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt
index d299ff31df5..7d350b49658 100644
--- a/Documentation/trace/ring-buffer-design.txt
+++ b/Documentation/trace/ring-buffer-design.txt
@@ -237,7 +237,7 @@ with the previous write.
237 |written | 237 |written |
238 +---------+ 238 +---------+
239 |written | 239 |written |
240 +---------+ <--- next positon for write (current commit) 240 +---------+ <--- next position for write (current commit)
241 | empty | 241 | empty |
242 +---------+ 242 +---------+
243 243
diff --git a/Documentation/usb/callbacks.txt b/Documentation/usb/callbacks.txt
index bfb36b34b79..9e85846bdb9 100644
--- a/Documentation/usb/callbacks.txt
+++ b/Documentation/usb/callbacks.txt
@@ -95,9 +95,11 @@ pre_reset
95 95
96int (*pre_reset)(struct usb_interface *intf); 96int (*pre_reset)(struct usb_interface *intf);
97 97
98Another driver or user space is triggering a reset on the device which 98A driver or user space is triggering a reset on the device which
99contains the interface passed as an argument. Cease IO and save any 99contains the interface passed as an argument. Cease IO, wait for all
100device state you need to restore. 100outstanding URBs to complete, and save any device state you need to
101restore. No more URBs may be submitted until the post_reset method
102is called.
101 103
102If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you 104If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you
103are in atomic context. 105are in atomic context.
diff --git a/Documentation/usb/linux-cdc-acm.inf b/Documentation/usb/linux-cdc-acm.inf
index 612e7220fb2..37a02ce5484 100644
--- a/Documentation/usb/linux-cdc-acm.inf
+++ b/Documentation/usb/linux-cdc-acm.inf
@@ -90,10 +90,10 @@ ServiceBinary=%12%\USBSER.sys
90[SourceDisksFiles] 90[SourceDisksFiles]
91[SourceDisksNames] 91[SourceDisksNames]
92[DeviceList] 92[DeviceList]
93%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02 93%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_1D6B&PID_0104&MI_02
94 94
95[DeviceList.NTamd64] 95[DeviceList.NTamd64]
96%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02 96%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_1D6B&PID_0104&MI_02
97 97
98 98
99;------------------------------------------------------------------------------ 99;------------------------------------------------------------------------------
diff --git a/Documentation/usb/linux.inf b/Documentation/usb/linux.inf
index 4dee9585122..4ffa715b0ae 100644
--- a/Documentation/usb/linux.inf
+++ b/Documentation/usb/linux.inf
@@ -18,15 +18,15 @@ DriverVer = 06/21/2006,6.0.6000.16384
18 18
19; Decoration for x86 architecture 19; Decoration for x86 architecture
20[LinuxDevices.NTx86] 20[LinuxDevices.NTx86]
21%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 21%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_1d6b&PID_0104&MI_00
22 22
23; Decoration for x64 architecture 23; Decoration for x64 architecture
24[LinuxDevices.NTamd64] 24[LinuxDevices.NTamd64]
25%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 25%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_1d6b&PID_0104&MI_00
26 26
27; Decoration for ia64 architecture 27; Decoration for ia64 architecture
28[LinuxDevices.NTia64] 28[LinuxDevices.NTia64]
29%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 29%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_1d6b&PID_0104&MI_00
30 30
31;@@@ This is the common setting for setup 31;@@@ This is the common setting for setup
32[ControlFlags] 32[ControlFlags]
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
index 66f92d1194c..a4efa0462f0 100644
--- a/Documentation/usb/usbmon.txt
+++ b/Documentation/usb/usbmon.txt
@@ -12,6 +12,10 @@ Controller Drivers (HCD). So, if HCD is buggy, the traces reported by
12usbmon may not correspond to bus transactions precisely. This is the same 12usbmon may not correspond to bus transactions precisely. This is the same
13situation as with tcpdump. 13situation as with tcpdump.
14 14
15Two APIs are currently implemented: "text" and "binary". The binary API
16is available through a character device in /dev namespace and is an ABI.
17The text API is deprecated since 2.6.35, but available for convenience.
18
15* How to use usbmon to collect raw text traces 19* How to use usbmon to collect raw text traces
16 20
17Unlike the packet socket, usbmon has an interface which provides traces 21Unlike the packet socket, usbmon has an interface which provides traces
@@ -162,39 +166,11 @@ Here is the list of words, from left to right:
162 not machine words, but really just a byte stream split into words to make 166 not machine words, but really just a byte stream split into words to make
163 it easier to read. Thus, the last word may contain from one to four bytes. 167 it easier to read. Thus, the last word may contain from one to four bytes.
164 The length of collected data is limited and can be less than the data length 168 The length of collected data is limited and can be less than the data length
165 report in Data Length word. 169 reported in the Data Length word. In the case of an Isochronous input (Zi)
166 170 completion where the received data is sparse in the buffer, the length of
167Here is an example of code to read the data stream in a well known programming 171 the collected data can be greater than the Data Length value (because Data
168language: 172 Length counts only the bytes that were received whereas the Data words
169 173 contain the entire transfer buffer).
170class ParsedLine {
171 int data_len; /* Available length of data */
172 byte data[];
173
174 void parseData(StringTokenizer st) {
175 int availwords = st.countTokens();
176 data = new byte[availwords * 4];
177 data_len = 0;
178 while (st.hasMoreTokens()) {
179 String data_str = st.nextToken();
180 int len = data_str.length() / 2;
181 int i;
182 int b; // byte is signed, apparently?! XXX
183 for (i = 0; i < len; i++) {
184 // data[data_len] = Byte.parseByte(
185 // data_str.substring(i*2, i*2 + 2),
186 // 16);
187 b = Integer.parseInt(
188 data_str.substring(i*2, i*2 + 2),
189 16);
190 if (b >= 128)
191 b *= -1;
192 data[data_len] = (byte) b;
193 data_len++;
194 }
195 }
196 }
197}
198 174
199Examples: 175Examples:
200 176
diff --git a/Documentation/vgaarbiter.txt b/Documentation/vgaarbiter.txt
index 43a9b0694fd..b7d401e0eae 100644
--- a/Documentation/vgaarbiter.txt
+++ b/Documentation/vgaarbiter.txt
@@ -14,11 +14,10 @@ the legacy VGA arbitration task (besides other bus management tasks) when more
14than one legacy device co-exists on the same machine. But the problem happens 14than one legacy device co-exists on the same machine. But the problem happens
15when these devices are trying to be accessed by different userspace clients 15when these devices are trying to be accessed by different userspace clients
16(e.g. two server in parallel). Their address assignments conflict. Moreover, 16(e.g. two server in parallel). Their address assignments conflict. Moreover,
17ideally, being an userspace application, it is not the role of the the X 17ideally, being a userspace application, it is not the role of the X server to
18server to control bus resources. Therefore an arbitration scheme outside of 18control bus resources. Therefore an arbitration scheme outside of the X server
19the X server is needed to control the sharing of these resources. This 19is needed to control the sharing of these resources. This document introduces
20document introduces the operation of the VGA arbiter implemented for Linux 20the operation of the VGA arbiter implemented for the Linux kernel.
21kernel.
22 21
23---------------------------------------------------------------------------- 22----------------------------------------------------------------------------
24 23
@@ -39,7 +38,7 @@ I.1 vgaarb
39The vgaarb is a module of the Linux Kernel. When it is initially loaded, it 38The vgaarb is a module of the Linux Kernel. When it is initially loaded, it
40scans all PCI devices and adds the VGA ones inside the arbitration. The 39scans all PCI devices and adds the VGA ones inside the arbitration. The
41arbiter then enables/disables the decoding on different devices of the VGA 40arbiter then enables/disables the decoding on different devices of the VGA
42legacy instructions. Device which do not want/need to use the arbiter may 41legacy instructions. Devices which do not want/need to use the arbiter may
43explicitly tell it by calling vga_set_legacy_decoding(). 42explicitly tell it by calling vga_set_legacy_decoding().
44 43
45The kernel exports a char device interface (/dev/vga_arbiter) to the clients, 44The kernel exports a char device interface (/dev/vga_arbiter) to the clients,
@@ -95,8 +94,8 @@ In the case of devices hot-{un,}plugged, there is a hook - pci_notify() - to
95notify them being added/removed in the system and automatically added/removed 94notify them being added/removed in the system and automatically added/removed
96in the arbiter. 95in the arbiter.
97 96
98There's also a in-kernel API of the arbiter in the case of DRM, vgacon and 97There is also an in-kernel API of the arbiter in case DRM, vgacon, or other
99others which may use the arbiter. 98drivers want to use it.
100 99
101 100
102I.2 libpciaccess 101I.2 libpciaccess
@@ -117,9 +116,8 @@ Besides it, in pci_system were added:
117 struct pci_device *vga_default_dev; 116 struct pci_device *vga_default_dev;
118 117
119 118
120The vga_count is usually need to keep informed how many cards are being 119The vga_count is used to track how many cards are being arbitrated, so for
121arbitrated, so for instance if there's only one then it can totally escape the 120instance, if there is only one card, then it can completely escape arbitration.
122scheme.
123 121
124 122
125These functions below acquire VGA resources for the given card and mark those 123These functions below acquire VGA resources for the given card and mark those
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 31b485723bc..9aae449440d 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -54,7 +54,7 @@
54 53 -> Pinnacle Hybrid Pro (em2881) 54 53 -> Pinnacle Hybrid Pro (em2881)
55 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] 55 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323]
56 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042] 56 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042]
57 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] 57 56 -> Pinnacle Hybrid Pro (330e) (em2882) [2304:0226]
58 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] 58 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316]
59 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] 59 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041]
60 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] 60 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f]
diff --git a/Documentation/video4linux/README.ivtv b/Documentation/video4linux/README.ivtv
index 42b06686eb7..2579b5b709e 100644
--- a/Documentation/video4linux/README.ivtv
+++ b/Documentation/video4linux/README.ivtv
@@ -36,8 +36,7 @@ Additional features for the PVR-350 (CX23415 based):
36 * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the 36 * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the
37 video signal) 37 video signal)
38 * Provides a framebuffer (allowing X applications to appear on the video 38 * Provides a framebuffer (allowing X applications to appear on the video
39 device) (this framebuffer is not yet part of the kernel. In the meantime it 39 device)
40 is available from www.ivtvdriver.org).
41 * Supports raw YUV output. 40 * Supports raw YUV output.
42 41
43IMPORTANT: In case of problems first read this page: 42IMPORTANT: In case of problems first read this page:
diff --git a/Documentation/video4linux/README.pvrusb2 b/Documentation/video4linux/README.pvrusb2
index a747200fe67..2137b589276 100644
--- a/Documentation/video4linux/README.pvrusb2
+++ b/Documentation/video4linux/README.pvrusb2
@@ -172,7 +172,7 @@ Source file list / functional overview:
172 to provide a streaming API usable by a read() system call style of 172 to provide a streaming API usable by a read() system call style of
173 I/O. Right now this is the only layer on top of pvrusb2-io.[ch], 173 I/O. Right now this is the only layer on top of pvrusb2-io.[ch],
174 however the underlying architecture here was intended to allow for 174 however the underlying architecture here was intended to allow for
175 other styles of I/O to be implemented with additonal modules, like 175 other styles of I/O to be implemented with additional modules, like
176 mmap()'ed buffers or something even more exotic. 176 mmap()'ed buffers or something even more exotic.
177 177
178 pvrusb2-main.c - This is the top level of the driver. Module level 178 pvrusb2-main.c - This is the top level of the driver. Module level
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran
index 699b60e070d..9ed629d4874 100644
--- a/Documentation/video4linux/Zoran
+++ b/Documentation/video4linux/Zoran
@@ -130,7 +130,6 @@ Card number: 4
130 130
131Note: No module for the mse3000 is available yet 131Note: No module for the mse3000 is available yet
132Note: No module for the vpx3224 is available yet 132Note: No module for the vpx3224 is available yet
133Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h)
134 133
135=========================== 134===========================
136 135
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options
index bbe3ed667d9..14c065fa23e 100644
--- a/Documentation/video4linux/bttv/Insmod-options
+++ b/Documentation/video4linux/bttv/Insmod-options
@@ -1,5 +1,5 @@
1 1
2Note: "modinfo <module>" prints various informations about a kernel 2Note: "modinfo <module>" prints various information about a kernel
3module, among them a complete and up-to-date list of insmod options. 3module, among them a complete and up-to-date list of insmod options.
4This list tends to be outdated because it is updated manually ... 4This list tends to be outdated because it is updated manually ...
5 5
diff --git a/Documentation/video4linux/bttv/README b/Documentation/video4linux/bttv/README
index 3a367cdb664..7cbf4fb6cf3 100644
--- a/Documentation/video4linux/bttv/README
+++ b/Documentation/video4linux/bttv/README
@@ -70,7 +70,7 @@ If you have trouble with some specific TV card, try to ask there
70instead of mailing me directly. The chance that someone with the 70instead of mailing me directly. The chance that someone with the
71same card listens there is much higher... 71same card listens there is much higher...
72 72
73For problems with sound: There are alot of different systems used 73For problems with sound: There are a lot of different systems used
74for TV sound all over the world. And there are also different chips 74for TV sound all over the world. And there are also different chips
75which decode the audio signal. Reports about sound problems ("stereo 75which decode the audio signal. Reports about sound problems ("stereo
76does'nt work") are pretty useless unless you include some details 76does'nt work") are pretty useless unless you include some details
diff --git a/Documentation/video4linux/bttv/README.freeze b/Documentation/video4linux/bttv/README.freeze
index 4259dccc828..5eddfa076cf 100644
--- a/Documentation/video4linux/bttv/README.freeze
+++ b/Documentation/video4linux/bttv/README.freeze
@@ -33,7 +33,7 @@ state is stuck.
33 33
34I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid 34I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid
35for some people. Thus probably a small buglet left somewhere in bttv 35for some people. Thus probably a small buglet left somewhere in bttv
360.7.x. I have no idea where exactly, it works stable for me and alot of 360.7.x. I have no idea where exactly, it works stable for me and a lot of
37other people. But in case you have problems with the 0.7.x versions you 37other people. But in case you have problems with the 0.7.x versions you
38can give 0.8.x a try ... 38can give 0.8.x a try ...
39 39
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ
index 1e6328f9108..395f6c6fdd9 100644
--- a/Documentation/video4linux/bttv/Sound-FAQ
+++ b/Documentation/video4linux/bttv/Sound-FAQ
@@ -2,13 +2,13 @@
2bttv and sound mini howto 2bttv and sound mini howto
3========================= 3=========================
4 4
5There are alot of different bt848/849/878/879 based boards available. 5There are a lot of different bt848/849/878/879 based boards available.
6Making video work often is not a big deal, because this is handled 6Making video work often is not a big deal, because this is handled
7completely by the bt8xx chip, which is common on all boards. But 7completely by the bt8xx chip, which is common on all boards. But
8sound is handled in slightly different ways on each board. 8sound is handled in slightly different ways on each board.
9 9
10To handle the grabber boards correctly, there is a array tvcards[] in 10To handle the grabber boards correctly, there is a array tvcards[] in
11bttv-cards.c, which holds the informations required for each board. 11bttv-cards.c, which holds the information required for each board.
12Sound will work only, if the correct entry is used (for video it often 12Sound will work only, if the correct entry is used (for video it often
13makes no difference). The bttv driver prints a line to the kernel 13makes no difference). The bttv driver prints a line to the kernel
14log, telling which card type is used. Like this one: 14log, telling which card type is used. Like this one:
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt
index 1247566c4de..e0cdae49185 100644
--- a/Documentation/video4linux/et61x251.txt
+++ b/Documentation/video4linux/et61x251.txt
@@ -191,10 +191,10 @@ Syntax: <n>
191Description: Debugging information level, from 0 to 3: 191Description: Debugging information level, from 0 to 3:
192 0 = none (use carefully) 192 0 = none (use carefully)
193 1 = critical errors 193 1 = critical errors
194 2 = significant informations 194 2 = significant information
195 3 = more verbose messages 195 3 = more verbose messages
196 Level 3 is useful for testing only, when only one device 196 Level 3 is useful for testing only, when only one device
197 is used at the same time. It also shows some more informations 197 is used at the same time. It also shows some more information
198 about the hardware being detected. This module parameter can be 198 about the hardware being detected. This module parameter can be
199 changed at runtime thanks to the /sys filesystem interface. 199 changed at runtime thanks to the /sys filesystem interface.
200Default: 2 200Default: 2
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 261776e0c5e..5bfa9a777d2 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -103,6 +103,7 @@ spca561 046d:092d Logitech QC Elch2
103spca561 046d:092e Logitech QC Elch2 103spca561 046d:092e Logitech QC Elch2
104spca561 046d:092f Logitech QuickCam Express Plus 104spca561 046d:092f Logitech QuickCam Express Plus
105sunplus 046d:0960 Logitech ClickSmart 420 105sunplus 046d:0960 Logitech ClickSmart 420
106nw80x 046d:d001 Logitech QuickCam Pro (dark focus ring)
106sunplus 0471:0322 Philips DMVC1300K 107sunplus 0471:0322 Philips DMVC1300K
107zc3xx 0471:0325 Philips SPC 200 NC 108zc3xx 0471:0325 Philips SPC 200 NC
108zc3xx 0471:0326 Philips SPC 300 NC 109zc3xx 0471:0326 Philips SPC 300 NC
@@ -150,10 +151,12 @@ sunplus 04fc:5330 Digitrex 2110
150sunplus 04fc:5360 Sunplus Generic 151sunplus 04fc:5360 Sunplus Generic
151spca500 04fc:7333 PalmPixDC85 152spca500 04fc:7333 PalmPixDC85
152sunplus 04fc:ffff Pure DigitalDakota 153sunplus 04fc:ffff Pure DigitalDakota
154nw80x 0502:d001 DVC V6
153spca501 0506:00df 3Com HomeConnect Lite 155spca501 0506:00df 3Com HomeConnect Lite
154sunplus 052b:1507 Megapixel 5 Pretec DC-1007 156sunplus 052b:1507 Megapixel 5 Pretec DC-1007
155sunplus 052b:1513 Megapix V4 157sunplus 052b:1513 Megapix V4
156sunplus 052b:1803 MegaImage VI 158sunplus 052b:1803 MegaImage VI
159nw80x 052b:d001 EZCam Pro p35u
157tv8532 0545:808b Veo Stingray 160tv8532 0545:808b Veo Stingray
158tv8532 0545:8333 Veo Stingray 161tv8532 0545:8333 Veo Stingray
159sunplus 0546:3155 Polaroid PDC3070 162sunplus 0546:3155 Polaroid PDC3070
@@ -177,6 +180,7 @@ sunplus 055f:c530 Mustek Gsmart LCD 3
177sunplus 055f:c540 Gsmart D30 180sunplus 055f:c540 Gsmart D30
178sunplus 055f:c630 Mustek MDC4000 181sunplus 055f:c630 Mustek MDC4000
179sunplus 055f:c650 Mustek MDC5500Z 182sunplus 055f:c650 Mustek MDC5500Z
183nw80x 055f:d001 Mustek Wcam 300 mini
180zc3xx 055f:d003 Mustek WCam300A 184zc3xx 055f:d003 Mustek WCam300A
181zc3xx 055f:d004 Mustek WCam300 AN 185zc3xx 055f:d004 Mustek WCam300 AN
182conex 0572:0041 Creative Notebook cx11646 186conex 0572:0041 Creative Notebook cx11646
@@ -195,14 +199,20 @@ gl860 05e3:0503 Genesys Logic PC Camera
195gl860 05e3:f191 Genesys Logic PC Camera 199gl860 05e3:f191 Genesys Logic PC Camera
196spca561 060b:a001 Maxell Compact Pc PM3 200spca561 060b:a001 Maxell Compact Pc PM3
197zc3xx 0698:2003 CTX M730V built in 201zc3xx 0698:2003 CTX M730V built in
202nw80x 06a5:0000 Typhoon Webcam 100 USB
203nw80x 06a5:d001 Divio based webcams
204nw80x 06a5:d800 Divio Chicony TwinkleCam, Trust SpaceCam
198spca500 06bd:0404 Agfa CL20 205spca500 06bd:0404 Agfa CL20
199spca500 06be:0800 Optimedia 206spca500 06be:0800 Optimedia
207nw80x 06be:d001 EZCam Pro p35u
200sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom 208sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
201spca506 06e1:a190 ADS Instant VCD 209spca506 06e1:a190 ADS Instant VCD
210ov534 06f8:3002 Hercules Blog Webcam
202ov534_9 06f8:3003 Hercules Dualpix HD Weblog 211ov534_9 06f8:3003 Hercules Dualpix HD Weblog
203sonixj 06f8:3004 Hercules Classic Silver 212sonixj 06f8:3004 Hercules Classic Silver
204sonixj 06f8:3008 Hercules Deluxe Optical Glass 213sonixj 06f8:3008 Hercules Deluxe Optical Glass
205pac7302 06f8:3009 Hercules Classic Link 214pac7302 06f8:3009 Hercules Classic Link
215nw80x 0728:d001 AVerMedia Camguard
206spca508 0733:0110 ViewQuest VQ110 216spca508 0733:0110 ViewQuest VQ110
207spca501 0733:0401 Intel Create and Share 217spca501 0733:0401 Intel Create and Share
208spca501 0733:0402 ViewQuest M318B 218spca501 0733:0402 ViewQuest M318B
@@ -265,6 +275,7 @@ pac7302 093a:2629 Genious iSlim 300
265pac7302 093a:262a Webcam 300k 275pac7302 093a:262a Webcam 300k
266pac7302 093a:262c Philips SPC 230 NC 276pac7302 093a:262c Philips SPC 230 NC
267jeilinj 0979:0280 Sakar 57379 277jeilinj 0979:0280 Sakar 57379
278jeilinj 0979:0280 Sportscam DV15
268zc3xx 0ac8:0302 Z-star Vimicro zc0302 279zc3xx 0ac8:0302 Z-star Vimicro zc0302
269vc032x 0ac8:0321 Vimicro generic vc0321 280vc032x 0ac8:0321 Vimicro generic vc0321
270vc032x 0ac8:0323 Vimicro Vc0323 281vc032x 0ac8:0323 Vimicro Vc0323
diff --git a/Documentation/video4linux/omap3isp.txt b/Documentation/video4linux/omap3isp.txt
new file mode 100644
index 00000000000..69be2c782b9
--- /dev/null
+++ b/Documentation/video4linux/omap3isp.txt
@@ -0,0 +1,278 @@
1OMAP 3 Image Signal Processor (ISP) driver
2
3Copyright (C) 2010 Nokia Corporation
4Copyright (C) 2009 Texas Instruments, Inc.
5
6Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 Sakari Ailus <sakari.ailus@iki.fi>
8 David Cohen <dacohen@gmail.com>
9
10
11Introduction
12============
13
14This file documents the Texas Instruments OMAP 3 Image Signal Processor (ISP)
15driver located under drivers/media/video/omap3isp. The original driver was
16written by Texas Instruments but since that it has been rewritten (twice) at
17Nokia.
18
19The driver has been successfully used on the following versions of OMAP 3:
20
21 3430
22 3530
23 3630
24
25The driver implements V4L2, Media controller and v4l2_subdev interfaces.
26Sensor, lens and flash drivers using the v4l2_subdev interface in the kernel
27are supported.
28
29
30Split to subdevs
31================
32
33The OMAP 3 ISP is split into V4L2 subdevs, each of the blocks inside the ISP
34having one subdev to represent it. Each of the subdevs provide a V4L2 subdev
35interface to userspace.
36
37 OMAP3 ISP CCP2
38 OMAP3 ISP CSI2a
39 OMAP3 ISP CCDC
40 OMAP3 ISP preview
41 OMAP3 ISP resizer
42 OMAP3 ISP AEWB
43 OMAP3 ISP AF
44 OMAP3 ISP histogram
45
46Each possible link in the ISP is modelled by a link in the Media controller
47interface. For an example program see [2].
48
49
50Controlling the OMAP 3 ISP
51==========================
52
53In general, the settings given to the OMAP 3 ISP take effect at the beginning
54of the following frame. This is done when the module becomes idle during the
55vertical blanking period on the sensor. In memory-to-memory operation the pipe
56is run one frame at a time. Applying the settings is done between the frames.
57
58All the blocks in the ISP, excluding the CSI-2 and possibly the CCP2 receiver,
59insist on receiving complete frames. Sensors must thus never send the ISP
60partial frames.
61
62Autoidle does have issues with some ISP blocks on the 3430, at least.
63Autoidle is only enabled on 3630 when the omap3isp module parameter autoidle
64is non-zero.
65
66
67Events
68======
69
70The OMAP 3 ISP driver does support the V4L2 event interface on CCDC and
71statistics (AEWB, AF and histogram) subdevs.
72
73The CCDC subdev produces V4L2_EVENT_OMAP3ISP_HS_VS type event on HS_VS
74interrupt which is used to signal frame start. The event is triggered exactly
75when the reception of the first line of the frame starts in the CCDC module.
76The event can be subscribed on the CCDC subdev.
77
78(When using parallel interface one must pay account to correct configuration
79of the VS signal polarity. This is automatically correct when using the serial
80receivers.)
81
82Each of the statistics subdevs is able to produce events. An event is
83generated whenever a statistics buffer can be dequeued by a user space
84application using the VIDIOC_OMAP3ISP_STAT_REQ IOCTL. The events available
85are:
86
87 V4L2_EVENT_OMAP3ISP_AEWB
88 V4L2_EVENT_OMAP3ISP_AF
89 V4L2_EVENT_OMAP3ISP_HIST
90
91The type of the event data is struct omap3isp_stat_event_status for these
92ioctls. If there is an error calculating the statistics, there will be an
93event as usual, but no related statistics buffer. In this case
94omap3isp_stat_event_status.buf_err is set to non-zero.
95
96
97Private IOCTLs
98==============
99
100The OMAP 3 ISP driver supports standard V4L2 IOCTLs and controls where
101possible and practical. Much of the functions provided by the ISP, however,
102does not fall under the standard IOCTLs --- gamma tables and configuration of
103statistics collection are examples of such.
104
105In general, there is a private ioctl for configuring each of the blocks
106containing hardware-dependent functions.
107
108The following private IOCTLs are supported:
109
110 VIDIOC_OMAP3ISP_CCDC_CFG
111 VIDIOC_OMAP3ISP_PRV_CFG
112 VIDIOC_OMAP3ISP_AEWB_CFG
113 VIDIOC_OMAP3ISP_HIST_CFG
114 VIDIOC_OMAP3ISP_AF_CFG
115 VIDIOC_OMAP3ISP_STAT_REQ
116 VIDIOC_OMAP3ISP_STAT_EN
117
118The parameter structures used by these ioctls are described in
119include/linux/omap3isp.h. The detailed functions of the ISP itself related to
120a given ISP block is described in the Technical Reference Manuals (TRMs) ---
121see the end of the document for those.
122
123While it is possible to use the ISP driver without any use of these private
124IOCTLs it is not possible to obtain optimal image quality this way. The AEWB,
125AF and histogram modules cannot be used without configuring them using the
126appropriate private IOCTLs.
127
128
129CCDC and preview block IOCTLs
130=============================
131
132The VIDIOC_OMAP3ISP_CCDC_CFG and VIDIOC_OMAP3ISP_PRV_CFG IOCTLs are used to
133configure, enable and disable functions in the CCDC and preview blocks,
134respectively. Both IOCTLs control several functions in the blocks they
135control. VIDIOC_OMAP3ISP_CCDC_CFG IOCTL accepts a pointer to struct
136omap3isp_ccdc_update_config as its argument. Similarly VIDIOC_OMAP3ISP_PRV_CFG
137accepts a pointer to struct omap3isp_prev_update_config. The definition of
138both structures is available in [1].
139
140The update field in the structures tells whether to update the configuration
141for the specific function and the flag tells whether to enable or disable the
142function.
143
144The update and flag bit masks accept the following values. Each separate
145functions in the CCDC and preview blocks is associated with a flag (either
146disable or enable; part of the flag field in the structure) and a pointer to
147configuration data for the function.
148
149Valid values for the update and flag fields are listed here for
150VIDIOC_OMAP3ISP_CCDC_CFG. Values may be or'ed to configure more than one
151function in the same IOCTL call.
152
153 OMAP3ISP_CCDC_ALAW
154 OMAP3ISP_CCDC_LPF
155 OMAP3ISP_CCDC_BLCLAMP
156 OMAP3ISP_CCDC_BCOMP
157 OMAP3ISP_CCDC_FPC
158 OMAP3ISP_CCDC_CULL
159 OMAP3ISP_CCDC_CONFIG_LSC
160 OMAP3ISP_CCDC_TBL_LSC
161
162The corresponding values for the VIDIOC_OMAP3ISP_PRV_CFG are here:
163
164 OMAP3ISP_PREV_LUMAENH
165 OMAP3ISP_PREV_INVALAW
166 OMAP3ISP_PREV_HRZ_MED
167 OMAP3ISP_PREV_CFA
168 OMAP3ISP_PREV_CHROMA_SUPP
169 OMAP3ISP_PREV_WB
170 OMAP3ISP_PREV_BLKADJ
171 OMAP3ISP_PREV_RGB2RGB
172 OMAP3ISP_PREV_COLOR_CONV
173 OMAP3ISP_PREV_YC_LIMIT
174 OMAP3ISP_PREV_DEFECT_COR
175 OMAP3ISP_PREV_GAMMABYPASS
176 OMAP3ISP_PREV_DRK_FRM_CAPTURE
177 OMAP3ISP_PREV_DRK_FRM_SUBTRACT
178 OMAP3ISP_PREV_LENS_SHADING
179 OMAP3ISP_PREV_NF
180 OMAP3ISP_PREV_GAMMA
181
182The associated configuration pointer for the function may not be NULL when
183enabling the function. When disabling a function the configuration pointer is
184ignored.
185
186
187Statistic blocks IOCTLs
188=======================
189
190The statistics subdevs do offer more dynamic configuration options than the
191other subdevs. They can be enabled, disable and reconfigured when the pipeline
192is in streaming state.
193
194The statistics blocks always get the input image data from the CCDC (as the
195histogram memory read isn't implemented). The statistics are dequeueable by
196the user from the statistics subdev nodes using private IOCTLs.
197
198The private IOCTLs offered by the AEWB, AF and histogram subdevs are heavily
199reflected by the register level interface offered by the ISP hardware. There
200are aspects that are purely related to the driver implementation and these are
201discussed next.
202
203VIDIOC_OMAP3ISP_STAT_EN
204-----------------------
205
206This private IOCTL enables/disables a statistic module. If this request is
207done before streaming, it will take effect as soon as the pipeline starts to
208stream. If the pipeline is already streaming, it will take effect as soon as
209the CCDC becomes idle.
210
211VIDIOC_OMAP3ISP_AEWB_CFG, VIDIOC_OMAP3ISP_HIST_CFG and VIDIOC_OMAP3ISP_AF_CFG
212-----------------------------------------------------------------------------
213
214Those IOCTLs are used to configure the modules. They require user applications
215to have an in-depth knowledge of the hardware. Most of the fields explanation
216can be found on OMAP's TRMs. The two following fields common to all the above
217configure private IOCTLs require explanation for better understanding as they
218are not part of the TRM.
219
220omap3isp_[h3a_af/h3a_aewb/hist]_config.buf_size:
221
222The modules handle their buffers internally. The necessary buffer size for the
223module's data output depends on the requested configuration. Although the
224driver supports reconfiguration while streaming, it does not support a
225reconfiguration which requires bigger buffer size than what is already
226internally allocated if the module is enabled. It will return -EBUSY on this
227case. In order to avoid such condition, either disable/reconfigure/enable the
228module or request the necessary buffer size during the first configuration
229while the module is disabled.
230
231The internal buffer size allocation considers the requested configuration's
232minimum buffer size and the value set on buf_size field. If buf_size field is
233out of [minimum, maximum] buffer size range, it's clamped to fit in there.
234The driver then selects the biggest value. The corrected buf_size value is
235written back to user application.
236
237omap3isp_[h3a_af/h3a_aewb/hist]_config.config_counter:
238
239As the configuration doesn't take effect synchronously to the request, the
240driver must provide a way to track this information to provide more accurate
241data. After a configuration is requested, the config_counter returned to user
242space application will be an unique value associated to that request. When
243user application receives an event for buffer availability or when a new
244buffer is requested, this config_counter is used to match a buffer data and a
245configuration.
246
247VIDIOC_OMAP3ISP_STAT_REQ
248------------------------
249
250Send to user space the oldest data available in the internal buffer queue and
251discards such buffer afterwards. The field omap3isp_stat_data.frame_number
252matches with the video buffer's field_count.
253
254
255Technical reference manuals (TRMs) and other documentation
256==========================================================
257
258OMAP 3430 TRM:
259<URL:http://focus.ti.com/pdfs/wtbu/OMAP34xx_ES3.1.x_PUBLIC_TRM_vZM.zip>
260Referenced 2011-03-05.
261
262OMAP 35xx TRM:
263<URL:http://www.ti.com/litv/pdf/spruf98o> Referenced 2011-03-05.
264
265OMAP 3630 TRM:
266<URL:http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vQ.zip>
267Referenced 2011-03-05.
268
269DM 3730 TRM:
270<URL:http://www.ti.com/litv/pdf/sprugn4h> Referenced 2011-03-06.
271
272
273References
274==========
275
276[1] include/linux/omap3isp.h
277
278[2] http://git.ideasonboard.org/?p=media-ctl.git;a=summary
diff --git a/Documentation/video4linux/pxa_camera.txt b/Documentation/video4linux/pxa_camera.txt
index 4f6d0ca0195..51ed1578b0e 100644
--- a/Documentation/video4linux/pxa_camera.txt
+++ b/Documentation/video4linux/pxa_camera.txt
@@ -84,12 +84,12 @@ DMA usage
84 transfer is not started. On "End Of Frame" interrupt, the irq handler 84 transfer is not started. On "End Of Frame" interrupt, the irq handler
85 starts the DMA chain. 85 starts the DMA chain.
86 - capture of one videobuffer 86 - capture of one videobuffer
87 The DMA chain starts transfering data into videobuffer RAM pages. 87 The DMA chain starts transferring data into videobuffer RAM pages.
88 When all pages are transfered, the DMA irq is raised on "ENDINTR" status 88 When all pages are transferred, the DMA irq is raised on "ENDINTR" status
89 - finishing one videobuffer 89 - finishing one videobuffer
90 The DMA irq handler marks the videobuffer as "done", and removes it from 90 The DMA irq handler marks the videobuffer as "done", and removes it from
91 the active running queue 91 the active running queue
92 Meanwhile, the next videobuffer (if there is one), is transfered by DMA 92 Meanwhile, the next videobuffer (if there is one), is transferred by DMA
93 - finishing the last videobuffer 93 - finishing the last videobuffer
94 On the DMA irq of the last videobuffer, the QCI is stopped. 94 On the DMA irq of the last videobuffer, the QCI is stopped.
95 95
@@ -101,7 +101,7 @@ DMA usage
101 101
102 This structure is pointed by dma->sg_cpu. 102 This structure is pointed by dma->sg_cpu.
103 The descriptors are used as follows : 103 The descriptors are used as follows :
104 - desc-sg[i]: i-th descriptor, transfering the i-th sg 104 - desc-sg[i]: i-th descriptor, transferring the i-th sg
105 element to the video buffer scatter gather 105 element to the video buffer scatter gather
106 - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN 106 - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
107 - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 107 - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt
index cb47e723af7..1e96ce6e2d2 100644
--- a/Documentation/video4linux/sh_mobile_ceu_camera.txt
+++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt
@@ -37,7 +37,7 @@ Generic scaling / cropping scheme
37-1'- 37-1'-
38 38
39In the above chart minuses and slashes represent "real" data amounts, points and 39In the above chart minuses and slashes represent "real" data amounts, points and
40accents represent "useful" data, basically, CEU scaled amd cropped output, 40accents represent "useful" data, basically, CEU scaled and cropped output,
41mapped back onto the client's source plane. 41mapped back onto the client's source plane.
42 42
43Such a configuration can be produced by user requests: 43Such a configuration can be produced by user requests:
@@ -65,7 +65,7 @@ Do not touch input rectangle - it is already optimal.
65 65
661. Calculate current sensor scales: 661. Calculate current sensor scales:
67 67
68 scale_s = ((3') - (3)) / ((2') - (2)) 68 scale_s = ((2') - (2)) / ((3') - (3))
69 69
702. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at 702. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
71current sensor scales onto input window - this is user S_CROP: 71current sensor scales onto input window - this is user S_CROP:
@@ -80,7 +80,7 @@ window:
804. Calculate sensor output window by applying combined scales to real input 804. Calculate sensor output window by applying combined scales to real input
81window: 81window:
82 82
83 width_s_out = ((2') - (2)) / scale_comb 83 width_s_out = ((7') - (7)) = ((2') - (2)) / scale_comb
84 84
855. Apply iterative sensor S_FMT for sensor output window. 855. Apply iterative sensor S_FMT for sensor output window.
86 86
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt
index 73de4050d63..b4f67040403 100644
--- a/Documentation/video4linux/sn9c102.txt
+++ b/Documentation/video4linux/sn9c102.txt
@@ -214,10 +214,10 @@ Syntax: <n>
214Description: Debugging information level, from 0 to 3: 214Description: Debugging information level, from 0 to 3:
215 0 = none (use carefully) 215 0 = none (use carefully)
216 1 = critical errors 216 1 = critical errors
217 2 = significant informations 217 2 = significant information
218 3 = more verbose messages 218 3 = more verbose messages
219 Level 3 is useful for testing only. It also shows some more 219 Level 3 is useful for testing only. It also shows some more
220 informations about the hardware being detected. 220 information about the hardware being detected.
221 This parameter can be changed at runtime thanks to the /sys 221 This parameter can be changed at runtime thanks to the /sys
222 filesystem interface. 222 filesystem interface.
223Default: 2 223Default: 2
diff --git a/Documentation/video4linux/uvcvideo.txt b/Documentation/video4linux/uvcvideo.txt
new file mode 100644
index 00000000000..848d620dcc5
--- /dev/null
+++ b/Documentation/video4linux/uvcvideo.txt
@@ -0,0 +1,239 @@
1Linux USB Video Class (UVC) driver
2==================================
3
4This file documents some driver-specific aspects of the UVC driver, such as
5driver-specific ioctls and implementation notes.
6
7Questions and remarks can be sent to the Linux UVC development mailing list at
8linux-uvc-devel@lists.berlios.de.
9
10
11Extension Unit (XU) support
12---------------------------
13
141. Introduction
15
16The UVC specification allows for vendor-specific extensions through extension
17units (XUs). The Linux UVC driver supports extension unit controls (XU controls)
18through two separate mechanisms:
19
20 - through mappings of XU controls to V4L2 controls
21 - through a driver-specific ioctl interface
22
23The first one allows generic V4L2 applications to use XU controls by mapping
24certain XU controls onto V4L2 controls, which then show up during ordinary
25control enumeration.
26
27The second mechanism requires uvcvideo-specific knowledge for the application to
28access XU controls but exposes the entire UVC XU concept to user space for
29maximum flexibility.
30
31Both mechanisms complement each other and are described in more detail below.
32
33
342. Control mappings
35
36The UVC driver provides an API for user space applications to define so-called
37control mappings at runtime. These allow for individual XU controls or byte
38ranges thereof to be mapped to new V4L2 controls. Such controls appear and
39function exactly like normal V4L2 controls (i.e. the stock controls, such as
40brightness, contrast, etc.). However, reading or writing of such a V4L2 controls
41triggers a read or write of the associated XU control.
42
43The ioctl used to create these control mappings is called UVCIOC_CTRL_MAP.
44Previous driver versions (before 0.2.0) required another ioctl to be used
45beforehand (UVCIOC_CTRL_ADD) to pass XU control information to the UVC driver.
46This is no longer necessary as newer uvcvideo versions query the information
47directly from the device.
48
49For details on the UVCIOC_CTRL_MAP ioctl please refer to the section titled
50"IOCTL reference" below.
51
52
533. Driver specific XU control interface
54
55For applications that need to access XU controls directly, e.g. for testing
56purposes, firmware upload, or accessing binary controls, a second mechanism to
57access XU controls is provided in the form of a driver-specific ioctl, namely
58UVCIOC_CTRL_QUERY.
59
60A call to this ioctl allows applications to send queries to the UVC driver that
61directly map to the low-level UVC control requests.
62
63In order to make such a request the UVC unit ID of the control's extension unit
64and the control selector need to be known. This information either needs to be
65hardcoded in the application or queried using other ways such as by parsing the
66UVC descriptor or, if available, using the media controller API to enumerate a
67device's entities.
68
69Unless the control size is already known it is necessary to first make a
70UVC_GET_LEN requests in order to be able to allocate a sufficiently large buffer
71and set the buffer size to the correct value. Similarly, to find out whether
72UVC_GET_CUR or UVC_SET_CUR are valid requests for a given control, a
73UVC_GET_INFO request should be made. The bits 0 (GET supported) and 1 (SET
74supported) of the resulting byte indicate which requests are valid.
75
76With the addition of the UVCIOC_CTRL_QUERY ioctl the UVCIOC_CTRL_GET and
77UVCIOC_CTRL_SET ioctls have become obsolete since their functionality is a
78subset of the former ioctl. For the time being they are still supported but
79application developers are encouraged to use UVCIOC_CTRL_QUERY instead.
80
81For details on the UVCIOC_CTRL_QUERY ioctl please refer to the section titled
82"IOCTL reference" below.
83
84
854. Security
86
87The API doesn't currently provide a fine-grained access control facility. The
88UVCIOC_CTRL_ADD and UVCIOC_CTRL_MAP ioctls require super user permissions.
89
90Suggestions on how to improve this are welcome.
91
92
935. Debugging
94
95In order to debug problems related to XU controls or controls in general it is
96recommended to enable the UVC_TRACE_CONTROL bit in the module parameter 'trace'.
97This causes extra output to be written into the system log.
98
99
1006. IOCTL reference
101
102---- UVCIOC_CTRL_MAP - Map a UVC control to a V4L2 control ----
103
104Argument: struct uvc_xu_control_mapping
105
106Description:
107 This ioctl creates a mapping between a UVC control or part of a UVC
108 control and a V4L2 control. Once mappings are defined, userspace
109 applications can access vendor-defined UVC control through the V4L2
110 control API.
111
112 To create a mapping, applications fill the uvc_xu_control_mapping
113 structure with information about an existing UVC control defined with
114 UVCIOC_CTRL_ADD and a new V4L2 control.
115
116 A UVC control can be mapped to several V4L2 controls. For instance,
117 a UVC pan/tilt control could be mapped to separate pan and tilt V4L2
118 controls. The UVC control is divided into non overlapping fields using
119 the 'size' and 'offset' fields and are then independantly mapped to
120 V4L2 control.
121
122 For signed integer V4L2 controls the data_type field should be set to
123 UVC_CTRL_DATA_TYPE_SIGNED. Other values are currently ignored.
124
125Return value:
126 On success 0 is returned. On error -1 is returned and errno is set
127 appropriately.
128
129 ENOMEM
130 Not enough memory to perform the operation.
131 EPERM
132 Insufficient privileges (super user privileges are required).
133 EINVAL
134 No such UVC control.
135 EOVERFLOW
136 The requested offset and size would overflow the UVC control.
137 EEXIST
138 Mapping already exists.
139
140Data types:
141 * struct uvc_xu_control_mapping
142
143 __u32 id V4L2 control identifier
144 __u8 name[32] V4L2 control name
145 __u8 entity[16] UVC extension unit GUID
146 __u8 selector UVC control selector
147 __u8 size V4L2 control size (in bits)
148 __u8 offset V4L2 control offset (in bits)
149 enum v4l2_ctrl_type
150 v4l2_type V4L2 control type
151 enum uvc_control_data_type
152 data_type UVC control data type
153 struct uvc_menu_info
154 *menu_info Array of menu entries (for menu controls only)
155 __u32 menu_count Number of menu entries (for menu controls only)
156
157 * struct uvc_menu_info
158
159 __u32 value Menu entry value used by the device
160 __u8 name[32] Menu entry name
161
162
163 * enum uvc_control_data_type
164
165 UVC_CTRL_DATA_TYPE_RAW Raw control (byte array)
166 UVC_CTRL_DATA_TYPE_SIGNED Signed integer
167 UVC_CTRL_DATA_TYPE_UNSIGNED Unsigned integer
168 UVC_CTRL_DATA_TYPE_BOOLEAN Boolean
169 UVC_CTRL_DATA_TYPE_ENUM Enumeration
170 UVC_CTRL_DATA_TYPE_BITMASK Bitmask
171
172
173---- UVCIOC_CTRL_QUERY - Query a UVC XU control ----
174
175Argument: struct uvc_xu_control_query
176
177Description:
178 This ioctl queries a UVC XU control identified by its extension unit ID
179 and control selector.
180
181 There are a number of different queries available that closely
182 correspond to the low-level control requests described in the UVC
183 specification. These requests are:
184
185 UVC_GET_CUR
186 Obtain the current value of the control.
187 UVC_GET_MIN
188 Obtain the minimum value of the control.
189 UVC_GET_MAX
190 Obtain the maximum value of the control.
191 UVC_GET_DEF
192 Obtain the default value of the control.
193 UVC_GET_RES
194 Query the resolution of the control, i.e. the step size of the
195 allowed control values.
196 UVC_GET_LEN
197 Query the size of the control in bytes.
198 UVC_GET_INFO
199 Query the control information bitmap, which indicates whether
200 get/set requests are supported.
201 UVC_SET_CUR
202 Update the value of the control.
203
204 Applications must set the 'size' field to the correct length for the
205 control. Exceptions are the UVC_GET_LEN and UVC_GET_INFO queries, for
206 which the size must be set to 2 and 1, respectively. The 'data' field
207 must point to a valid writable buffer big enough to hold the indicated
208 number of data bytes.
209
210 Data is copied directly from the device without any driver-side
211 processing. Applications are responsible for data buffer formatting,
212 including little-endian/big-endian conversion. This is particularly
213 important for the result of the UVC_GET_LEN requests, which is always
214 returned as a little-endian 16-bit integer by the device.
215
216Return value:
217 On success 0 is returned. On error -1 is returned and errno is set
218 appropriately.
219
220 ENOENT
221 The device does not support the given control or the specified
222 extension unit could not be found.
223 ENOBUFS
224 The specified buffer size is incorrect (too big or too small).
225 EINVAL
226 An invalid request code was passed.
227 EBADRQC
228 The given request is not supported by the given control.
229 EFAULT
230 The data pointer references an inaccessible memory area.
231
232Data types:
233 * struct uvc_xu_control_query
234
235 __u8 unit Extension unit ID
236 __u8 selector Control selector
237 __u8 query Request code to send to the device
238 __u16 size Control data size (in bytes)
239 __u8 *data Control value
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index f22f35c271f..cf21f7aae97 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -71,6 +71,10 @@ sub-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 in the future a v4l2_fh struct will keep track of filehandle instances
72(this is not yet implemented). 72(this is not yet implemented).
73 73
74The V4L2 framework also optionally integrates with the media framework. If a
75driver sets the struct v4l2_device mdev field, sub-devices and video nodes
76will automatically appear in the media framework as entities.
77
74 78
75struct v4l2_device 79struct v4l2_device
76------------------ 80------------------
@@ -83,11 +87,20 @@ You must register the device instance:
83 87
84 v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); 88 v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
85 89
86Registration will initialize the v4l2_device struct and link dev->driver_data 90Registration will initialize the v4l2_device struct. If the dev->driver_data
87to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived 91field is NULL, it will be linked to v4l2_dev.
88from dev (driver name followed by the bus_id, to be precise). If you set it 92
89up before calling v4l2_device_register then it will be untouched. If dev is 93Drivers that want integration with the media device framework need to set
90NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. 94dev->driver_data manually to point to the driver-specific device structure
95that embed the struct v4l2_device instance. This is achieved by a
96dev_set_drvdata() call before registering the V4L2 device instance. They must
97also set the struct v4l2_device mdev field to point to a properly initialized
98and registered media_device instance.
99
100If v4l2_dev->name is empty then it will be set to a value derived from dev
101(driver name followed by the bus_id, to be precise). If you set it up before
102calling v4l2_device_register then it will be untouched. If dev is NULL, then
103you *must* setup v4l2_dev->name before calling v4l2_device_register.
91 104
92You can use v4l2_device_set_name() to set the name based on a driver name and 105You can use v4l2_device_set_name() to set the name based on a driver name and
93a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1, 106a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1,
@@ -108,6 +121,7 @@ You unregister with:
108 121
109 v4l2_device_unregister(struct v4l2_device *v4l2_dev); 122 v4l2_device_unregister(struct v4l2_device *v4l2_dev);
110 123
124If the dev->driver_data field points to v4l2_dev, it will be reset to NULL.
111Unregistering will also automatically unregister all subdevs from the device. 125Unregistering will also automatically unregister all subdevs from the device.
112 126
113If you have a hotpluggable device (e.g. a USB device), then when a disconnect 127If you have a hotpluggable device (e.g. a USB device), then when a disconnect
@@ -167,6 +181,21 @@ static int __devinit drv_probe(struct pci_dev *pdev,
167 state->instance = atomic_inc_return(&drv_instance) - 1; 181 state->instance = atomic_inc_return(&drv_instance) - 1;
168} 182}
169 183
184If you have multiple device nodes then it can be difficult to know when it is
185safe to unregister v4l2_device. For this purpose v4l2_device has refcounting
186support. The refcount is increased whenever video_register_device is called and
187it is decreased whenever that device node is released. When the refcount reaches
188zero, then the v4l2_device release() callback is called. You can do your final
189cleanup there.
190
191If other device nodes (e.g. ALSA) are created, then you can increase and
192decrease the refcount manually as well by calling:
193
194void v4l2_device_get(struct v4l2_device *v4l2_dev);
195
196or:
197
198int v4l2_device_put(struct v4l2_device *v4l2_dev);
170 199
171struct v4l2_subdev 200struct v4l2_subdev
172------------------ 201------------------
@@ -254,6 +283,26 @@ A sub-device driver initializes the v4l2_subdev struct using:
254Afterwards you need to initialize subdev->name with a unique name and set the 283Afterwards you need to initialize subdev->name with a unique name and set the
255module owner. This is done for you if you use the i2c helper functions. 284module owner. This is done for you if you use the i2c helper functions.
256 285
286If integration with the media framework is needed, you must initialize the
287media_entity struct embedded in the v4l2_subdev struct (entity field) by
288calling media_entity_init():
289
290 struct media_pad *pads = &my_sd->pads;
291 int err;
292
293 err = media_entity_init(&sd->entity, npads, pads, 0);
294
295The pads array must have been previously initialized. There is no need to
296manually set the struct media_entity type and name fields, but the revision
297field must be initialized if needed.
298
299A reference to the entity will be automatically acquired/released when the
300subdev device node (if any) is opened/closed.
301
302Don't forget to cleanup the media entity before the sub-device is destroyed:
303
304 media_entity_cleanup(&sd->entity);
305
257A device (bridge) driver needs to register the v4l2_subdev with the 306A device (bridge) driver needs to register the v4l2_subdev with the
258v4l2_device: 307v4l2_device:
259 308
@@ -263,6 +312,9 @@ This can fail if the subdev module disappeared before it could be registered.
263After this function was called successfully the subdev->dev field points to 312After this function was called successfully the subdev->dev field points to
264the v4l2_device. 313the v4l2_device.
265 314
315If the v4l2_device parent device has a non-NULL mdev field, the sub-device
316entity will be automatically registered with the media device.
317
266You can unregister a sub-device using: 318You can unregister a sub-device using:
267 319
268 v4l2_device_unregister_subdev(sd); 320 v4l2_device_unregister_subdev(sd);
@@ -291,7 +343,7 @@ ignored. If you want to check for errors use this:
291 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); 343 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip);
292 344
293Any error except -ENOIOCTLCMD will exit the loop with that error. If no 345Any error except -ENOIOCTLCMD will exit the loop with that error. If no
294errors (except -ENOIOCTLCMD) occured, then 0 is returned. 346errors (except -ENOIOCTLCMD) occurred, then 0 is returned.
295 347
296The second argument to both calls is a group ID. If 0, then all subdevs are 348The second argument to both calls is a group ID. If 0, then all subdevs are
297called. If non-zero, then only those whose group ID match that value will 349called. If non-zero, then only those whose group ID match that value will
@@ -319,6 +371,61 @@ controlled through GPIO pins. This distinction is only relevant when setting
319up the device, but once the subdev is registered it is completely transparent. 371up the device, but once the subdev is registered it is completely transparent.
320 372
321 373
374V4L2 sub-device userspace API
375-----------------------------
376
377Beside exposing a kernel API through the v4l2_subdev_ops structure, V4L2
378sub-devices can also be controlled directly by userspace applications.
379
380Device nodes named v4l-subdevX can be created in /dev to access sub-devices
381directly. If a sub-device supports direct userspace configuration it must set
382the V4L2_SUBDEV_FL_HAS_DEVNODE flag before being registered.
383
384After registering sub-devices, the v4l2_device driver can create device nodes
385for all registered sub-devices marked with V4L2_SUBDEV_FL_HAS_DEVNODE by calling
386v4l2_device_register_subdev_nodes(). Those device nodes will be automatically
387removed when sub-devices are unregistered.
388
389The device node handles a subset of the V4L2 API.
390
391VIDIOC_QUERYCTRL
392VIDIOC_QUERYMENU
393VIDIOC_G_CTRL
394VIDIOC_S_CTRL
395VIDIOC_G_EXT_CTRLS
396VIDIOC_S_EXT_CTRLS
397VIDIOC_TRY_EXT_CTRLS
398
399 The controls ioctls are identical to the ones defined in V4L2. They
400 behave identically, with the only exception that they deal only with
401 controls implemented in the sub-device. Depending on the driver, those
402 controls can be also be accessed through one (or several) V4L2 device
403 nodes.
404
405VIDIOC_DQEVENT
406VIDIOC_SUBSCRIBE_EVENT
407VIDIOC_UNSUBSCRIBE_EVENT
408
409 The events ioctls are identical to the ones defined in V4L2. They
410 behave identically, with the only exception that they deal only with
411 events generated by the sub-device. Depending on the driver, those
412 events can also be reported by one (or several) V4L2 device nodes.
413
414 Sub-device drivers that want to use events need to set the
415 V4L2_SUBDEV_USES_EVENTS v4l2_subdev::flags and initialize
416 v4l2_subdev::nevents to events queue depth before registering the
417 sub-device. After registration events can be queued as usual on the
418 v4l2_subdev::devnode device node.
419
420 To properly support events, the poll() file operation is also
421 implemented.
422
423Private ioctls
424
425 All ioctls not in the above list are passed directly to the sub-device
426 driver through the core::ioctl operation.
427
428
322I2C sub-device drivers 429I2C sub-device drivers
323---------------------- 430----------------------
324 431
@@ -457,6 +564,10 @@ You should also set these fields:
457 Otherwise you give it a pointer to a struct mutex_lock and before any 564 Otherwise you give it a pointer to a struct mutex_lock and before any
458 of the v4l2_file_operations is called this lock will be taken by the 565 of the v4l2_file_operations is called this lock will be taken by the
459 core and released afterwards. 566 core and released afterwards.
567- prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY.
568 If left to NULL, then it will use the struct v4l2_prio_state in v4l2_device.
569 If you want to have a separate priority state per (group of) device node(s),
570 then you can point it to your own struct v4l2_prio_state.
460- parent: you only set this if v4l2_device was registered with NULL as 571- parent: you only set this if v4l2_device was registered with NULL as
461 the parent device struct. This only happens in cases where one hardware 572 the parent device struct. This only happens in cases where one hardware
462 device has multiple PCI devices that all share the same v4l2_device core. 573 device has multiple PCI devices that all share the same v4l2_device core.
@@ -466,13 +577,34 @@ You should also set these fields:
466 (cx8802). Since the v4l2_device cannot be associated with a particular 577 (cx8802). Since the v4l2_device cannot be associated with a particular
467 PCI device it is setup without a parent device. But when the struct 578 PCI device it is setup without a parent device. But when the struct
468 video_device is setup you do know which parent PCI device to use. 579 video_device is setup you do know which parent PCI device to use.
580- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework
581 handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct
582 v4l2_fh. Eventually this flag will disappear once all drivers use the core
583 priority handling. But for now it has to be set explicitly.
469 584
470If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or 585If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to video_ioctl2
471.ioctl to video_ioctl2 in your v4l2_file_operations struct. 586in your v4l2_file_operations struct.
587
588Do not use .ioctl! This is deprecated and will go away in the future.
472 589
473The v4l2_file_operations struct is a subset of file_operations. The main 590The v4l2_file_operations struct is a subset of file_operations. The main
474difference is that the inode argument is omitted since it is never used. 591difference is that the inode argument is omitted since it is never used.
475 592
593If integration with the media framework is needed, you must initialize the
594media_entity struct embedded in the video_device struct (entity field) by
595calling media_entity_init():
596
597 struct media_pad *pad = &my_vdev->pad;
598 int err;
599
600 err = media_entity_init(&vdev->entity, 1, pad, 0);
601
602The pads array must have been previously initialized. There is no need to
603manually set the struct media_entity type and name fields.
604
605A reference to the entity will be automatically acquired/released when the
606video device is opened/closed.
607
476v4l2_file_operations and locking 608v4l2_file_operations and locking
477-------------------------------- 609--------------------------------
478 610
@@ -502,6 +634,9 @@ for you.
502 return err; 634 return err;
503 } 635 }
504 636
637If the v4l2_device parent device has a non-NULL mdev field, the video device
638entity will be automatically registered with the media device.
639
505Which device is registered depends on the type argument. The following 640Which device is registered depends on the type argument. The following
506types exist: 641types exist:
507 642
@@ -577,6 +712,13 @@ release, of course) will return an error as well.
577When the last user of the video device node exits, then the vdev->release() 712When the last user of the video device node exits, then the vdev->release()
578callback is called and you can do the final cleanup there. 713callback is called and you can do the final cleanup there.
579 714
715Don't forget to cleanup the media entity associated with the video device if
716it has been initialized:
717
718 media_entity_cleanup(&vdev->entity);
719
720This can be done from the release callback.
721
580 722
581video_device helper functions 723video_device helper functions
582----------------------------- 724-----------------------------
@@ -636,39 +778,25 @@ struct v4l2_fh
636-------------- 778--------------
637 779
638struct v4l2_fh provides a way to easily keep file handle specific data 780struct v4l2_fh provides a way to easily keep file handle specific data
639that is used by the V4L2 framework. Using v4l2_fh is optional for 781that is used by the V4L2 framework. New drivers must use struct v4l2_fh
640drivers. 782since it is also used to implement priority handling (VIDIOC_G/S_PRIORITY)
783if the video_device flag V4L2_FL_USE_FH_PRIO is also set.
641 784
642The users of v4l2_fh (in the V4L2 framework, not the driver) know 785The users of v4l2_fh (in the V4L2 framework, not the driver) know
643whether a driver uses v4l2_fh as its file->private_data pointer by 786whether a driver uses v4l2_fh as its file->private_data pointer by
644testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. 787testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. This bit is
645 788set whenever v4l2_fh_init() is called.
646Useful functions:
647
648- v4l2_fh_init()
649
650 Initialise the file handle. This *MUST* be performed in the driver's
651 v4l2_file_operations->open() handler.
652
653- v4l2_fh_add()
654 789
655 Add a v4l2_fh to video_device file handle list. May be called after 790struct v4l2_fh is allocated as a part of the driver's own file handle
656 initialising the file handle. 791structure and file->private_data is set to it in the driver's open
657 792function by the driver.
658- v4l2_fh_del()
659
660 Unassociate the file handle from video_device(). The file handle
661 exit function may now be called.
662 793
663- v4l2_fh_exit() 794In many cases the struct v4l2_fh will be embedded in a larger structure.
795In that case you should call v4l2_fh_init+v4l2_fh_add in open() and
796v4l2_fh_del+v4l2_fh_exit in release().
664 797
665 Uninitialise the file handle. After uninitialisation the v4l2_fh 798Drivers can extract their own file handle structure by using the container_of
666 memory can be freed. 799macro. Example:
667
668struct v4l2_fh is allocated as a part of the driver's own file handle
669structure and is set to file->private_data in the driver's open
670function by the driver. Drivers can extract their own file handle
671structure by using the container_of macro. Example:
672 800
673struct my_fh { 801struct my_fh {
674 int blah; 802 int blah;
@@ -685,15 +813,21 @@ int my_open(struct file *file)
685 813
686 ... 814 ...
687 815
816 my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL);
817
818 ...
819
688 ret = v4l2_fh_init(&my_fh->fh, vfd); 820 ret = v4l2_fh_init(&my_fh->fh, vfd);
689 if (ret) 821 if (ret) {
822 kfree(my_fh);
690 return ret; 823 return ret;
824 }
691 825
692 v4l2_fh_add(&my_fh->fh); 826 ...
693 827
694 file->private_data = &my_fh->fh; 828 file->private_data = &my_fh->fh;
695 829 v4l2_fh_add(&my_fh->fh);
696 ... 830 return 0;
697} 831}
698 832
699int my_release(struct file *file) 833int my_release(struct file *file)
@@ -702,8 +836,65 @@ int my_release(struct file *file)
702 struct my_fh *my_fh = container_of(fh, struct my_fh, fh); 836 struct my_fh *my_fh = container_of(fh, struct my_fh, fh);
703 837
704 ... 838 ...
839 v4l2_fh_del(&my_fh->fh);
840 v4l2_fh_exit(&my_fh->fh);
841 kfree(my_fh);
842 return 0;
705} 843}
706 844
845Below is a short description of the v4l2_fh functions used:
846
847int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
848
849 Initialise the file handle. This *MUST* be performed in the driver's
850 v4l2_file_operations->open() handler.
851
852void v4l2_fh_add(struct v4l2_fh *fh)
853
854 Add a v4l2_fh to video_device file handle list. Must be called once the
855 file handle is completely initialized.
856
857void v4l2_fh_del(struct v4l2_fh *fh)
858
859 Unassociate the file handle from video_device(). The file handle
860 exit function may now be called.
861
862void v4l2_fh_exit(struct v4l2_fh *fh)
863
864 Uninitialise the file handle. After uninitialisation the v4l2_fh
865 memory can be freed.
866
867
868If struct v4l2_fh is not embedded, then you can use these helper functions:
869
870int v4l2_fh_open(struct file *filp)
871
872 This allocates a struct v4l2_fh, initializes it and adds it to the struct
873 video_device associated with the file struct.
874
875int v4l2_fh_release(struct file *filp)
876
877 This deletes it from the struct video_device associated with the file
878 struct, uninitialised the v4l2_fh and frees it.
879
880These two functions can be plugged into the v4l2_file_operation's open() and
881release() ops.
882
883
884Several drivers need to do something when the first file handle is opened and
885when the last file handle closes. Two helper functions were added to check
886whether the v4l2_fh struct is the only open filehandle of the associated
887device node:
888
889int v4l2_fh_is_singular(struct v4l2_fh *fh)
890
891 Returns 1 if the file handle is the only open file handle, else 0.
892
893int v4l2_fh_is_singular_file(struct file *filp)
894
895 Same, but it calls v4l2_fh_is_singular with filp->private_data.
896
897
707V4L2 events 898V4L2 events
708----------- 899-----------
709 900
diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt
index 05138e8aea0..9649450f3b9 100644
--- a/Documentation/video4linux/w9968cf.txt
+++ b/Documentation/video4linux/w9968cf.txt
@@ -413,7 +413,7 @@ Syntax: <n>
413Description: Debugging information level, from 0 to 6: 413Description: Debugging information level, from 0 to 6:
414 0 = none (use carefully) 414 0 = none (use carefully)
415 1 = critical errors 415 1 = critical errors
416 2 = significant informations 416 2 = significant information
417 3 = configuration or general messages 417 3 = configuration or general messages
418 4 = warnings 418 4 = warnings
419 5 = called functions 419 5 = called functions
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt
index befdfdacdc5..b41c83cf09f 100644
--- a/Documentation/video4linux/zc0301.txt
+++ b/Documentation/video4linux/zc0301.txt
@@ -181,10 +181,10 @@ Syntax: <n>
181Description: Debugging information level, from 0 to 3: 181Description: Debugging information level, from 0 to 3:
182 0 = none (use carefully) 182 0 = none (use carefully)
183 1 = critical errors 183 1 = critical errors
184 2 = significant informations 184 2 = significant information
185 3 = more verbose messages 185 3 = more verbose messages
186 Level 3 is useful for testing only, when only one device 186 Level 3 is useful for testing only, when only one device
187 is used at the same time. It also shows some more informations 187 is used at the same time. It also shows some information
188 about the hardware being detected. This module parameter can be 188 about the hardware being detected. This module parameter can be
189 changed at runtime thanks to the /sys filesystem interface. 189 changed at runtime thanks to the /sys filesystem interface.
190Default: 2 190Default: 2
@@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
261 261
26211. Credits 26211. Credits
263=========== 263===========
264- Informations about the chip internals needed to enable the I2C protocol have 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 265 been taken from the documentation of the ZC030x Video4Linux1 driver written
266 by Andrew Birkett <andy@nobugs.org>; 266 by Andrew Birkett <andy@nobugs.org>;
267- The initialization values of the ZC0301 controller connected to the PAS202BCB 267- The initialization values of the ZC0301 controller connected to the PAS202BCB
diff --git a/Documentation/virtual/00-INDEX b/Documentation/virtual/00-INDEX
new file mode 100644
index 00000000000..fe0251c4cfb
--- /dev/null
+++ b/Documentation/virtual/00-INDEX
@@ -0,0 +1,10 @@
1Virtualization support in the Linux kernel.
2
300-INDEX
4 - this file.
5kvm/
6 - Kernel Virtual Machine. See also http://linux-kvm.org
7lguest/
8 - Extremely simple hypervisor for experimental/educational use.
9uml/
10 - User Mode Linux, builds/runs Linux kernel as a userspace program.
diff --git a/Documentation/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index ad85797c1cf..42542eb802c 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -166,7 +166,7 @@ Returns: 0 on success, -1 on error
166 166
167This ioctl is obsolete and has been removed. 167This ioctl is obsolete and has been removed.
168 168
1694.6 KVM_CREATE_VCPU 1694.7 KVM_CREATE_VCPU
170 170
171Capability: basic 171Capability: basic
172Architectures: all 172Architectures: all
@@ -175,9 +175,12 @@ Parameters: vcpu id (apic id on x86)
175Returns: vcpu fd on success, -1 on error 175Returns: vcpu fd on success, -1 on error
176 176
177This API adds a vcpu to a virtual machine. The vcpu id is a small integer 177This API adds a vcpu to a virtual machine. The vcpu id is a small integer
178in the range [0, max_vcpus). 178in the range [0, max_vcpus). You can use KVM_CAP_NR_VCPUS of the
179KVM_CHECK_EXTENSION ioctl() to determine the value for max_vcpus at run-time.
180If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4
181cpus max.
179 182
1804.7 KVM_GET_DIRTY_LOG (vm ioctl) 1834.8 KVM_GET_DIRTY_LOG (vm ioctl)
181 184
182Capability: basic 185Capability: basic
183Architectures: x86 186Architectures: x86
@@ -200,7 +203,7 @@ since the last call to this ioctl. Bit 0 is the first page in the
200memory slot. Ensure the entire structure is cleared to avoid padding 203memory slot. Ensure the entire structure is cleared to avoid padding
201issues. 204issues.
202 205
2034.8 KVM_SET_MEMORY_ALIAS 2064.9 KVM_SET_MEMORY_ALIAS
204 207
205Capability: basic 208Capability: basic
206Architectures: x86 209Architectures: x86
@@ -210,7 +213,7 @@ Returns: 0 (success), -1 (error)
210 213
211This ioctl is obsolete and has been removed. 214This ioctl is obsolete and has been removed.
212 215
2134.9 KVM_RUN 2164.10 KVM_RUN
214 217
215Capability: basic 218Capability: basic
216Architectures: all 219Architectures: all
@@ -226,7 +229,7 @@ obtained by mmap()ing the vcpu fd at offset 0, with the size given by
226KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct 229KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct
227kvm_run' (see below). 230kvm_run' (see below).
228 231
2294.10 KVM_GET_REGS 2324.11 KVM_GET_REGS
230 233
231Capability: basic 234Capability: basic
232Architectures: all 235Architectures: all
@@ -246,7 +249,7 @@ struct kvm_regs {
246 __u64 rip, rflags; 249 __u64 rip, rflags;
247}; 250};
248 251
2494.11 KVM_SET_REGS 2524.12 KVM_SET_REGS
250 253
251Capability: basic 254Capability: basic
252Architectures: all 255Architectures: all
@@ -258,10 +261,10 @@ Writes the general purpose registers into the vcpu.
258 261
259See KVM_GET_REGS for the data structure. 262See KVM_GET_REGS for the data structure.
260 263
2614.12 KVM_GET_SREGS 2644.13 KVM_GET_SREGS
262 265
263Capability: basic 266Capability: basic
264Architectures: x86 267Architectures: x86, ppc
265Type: vcpu ioctl 268Type: vcpu ioctl
266Parameters: struct kvm_sregs (out) 269Parameters: struct kvm_sregs (out)
267Returns: 0 on success, -1 on error 270Returns: 0 on success, -1 on error
@@ -279,14 +282,16 @@ struct kvm_sregs {
279 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; 282 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64];
280}; 283};
281 284
285/* ppc -- see arch/powerpc/include/asm/kvm.h */
286
282interrupt_bitmap is a bitmap of pending external interrupts. At most 287interrupt_bitmap is a bitmap of pending external interrupts. At most
283one bit may be set. This interrupt has been acknowledged by the APIC 288one bit may be set. This interrupt has been acknowledged by the APIC
284but not yet injected into the cpu core. 289but not yet injected into the cpu core.
285 290
2864.13 KVM_SET_SREGS 2914.14 KVM_SET_SREGS
287 292
288Capability: basic 293Capability: basic
289Architectures: x86 294Architectures: x86, ppc
290Type: vcpu ioctl 295Type: vcpu ioctl
291Parameters: struct kvm_sregs (in) 296Parameters: struct kvm_sregs (in)
292Returns: 0 on success, -1 on error 297Returns: 0 on success, -1 on error
@@ -294,7 +299,7 @@ Returns: 0 on success, -1 on error
294Writes special registers into the vcpu. See KVM_GET_SREGS for the 299Writes special registers into the vcpu. See KVM_GET_SREGS for the
295data structures. 300data structures.
296 301
2974.14 KVM_TRANSLATE 3024.15 KVM_TRANSLATE
298 303
299Capability: basic 304Capability: basic
300Architectures: x86 305Architectures: x86
@@ -317,7 +322,7 @@ struct kvm_translation {
317 __u8 pad[5]; 322 __u8 pad[5];
318}; 323};
319 324
3204.15 KVM_INTERRUPT 3254.16 KVM_INTERRUPT
321 326
322Capability: basic 327Capability: basic
323Architectures: x86, ppc 328Architectures: x86, ppc
@@ -365,7 +370,7 @@ c) KVM_INTERRUPT_SET_LEVEL
365Note that any value for 'irq' other than the ones stated above is invalid 370Note that any value for 'irq' other than the ones stated above is invalid
366and incurs unexpected behavior. 371and incurs unexpected behavior.
367 372
3684.16 KVM_DEBUG_GUEST 3734.17 KVM_DEBUG_GUEST
369 374
370Capability: basic 375Capability: basic
371Architectures: none 376Architectures: none
@@ -375,7 +380,7 @@ Returns: -1 on error
375 380
376Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead. 381Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead.
377 382
3784.17 KVM_GET_MSRS 3834.18 KVM_GET_MSRS
379 384
380Capability: basic 385Capability: basic
381Architectures: x86 386Architectures: x86
@@ -403,7 +408,7 @@ Application code should set the 'nmsrs' member (which indicates the
403size of the entries array) and the 'index' member of each array entry. 408size of the entries array) and the 'index' member of each array entry.
404kvm will fill in the 'data' member. 409kvm will fill in the 'data' member.
405 410
4064.18 KVM_SET_MSRS 4114.19 KVM_SET_MSRS
407 412
408Capability: basic 413Capability: basic
409Architectures: x86 414Architectures: x86
@@ -418,7 +423,7 @@ Application code should set the 'nmsrs' member (which indicates the
418size of the entries array), and the 'index' and 'data' members of each 423size of the entries array), and the 'index' and 'data' members of each
419array entry. 424array entry.
420 425
4214.19 KVM_SET_CPUID 4264.20 KVM_SET_CPUID
422 427
423Capability: basic 428Capability: basic
424Architectures: x86 429Architectures: x86
@@ -446,7 +451,7 @@ struct kvm_cpuid {
446 struct kvm_cpuid_entry entries[0]; 451 struct kvm_cpuid_entry entries[0];
447}; 452};
448 453
4494.20 KVM_SET_SIGNAL_MASK 4544.21 KVM_SET_SIGNAL_MASK
450 455
451Capability: basic 456Capability: basic
452Architectures: x86 457Architectures: x86
@@ -468,7 +473,7 @@ struct kvm_signal_mask {
468 __u8 sigset[0]; 473 __u8 sigset[0];
469}; 474};
470 475
4714.21 KVM_GET_FPU 4764.22 KVM_GET_FPU
472 477
473Capability: basic 478Capability: basic
474Architectures: x86 479Architectures: x86
@@ -493,7 +498,7 @@ struct kvm_fpu {
493 __u32 pad2; 498 __u32 pad2;
494}; 499};
495 500
4964.22 KVM_SET_FPU 5014.23 KVM_SET_FPU
497 502
498Capability: basic 503Capability: basic
499Architectures: x86 504Architectures: x86
@@ -518,7 +523,7 @@ struct kvm_fpu {
518 __u32 pad2; 523 __u32 pad2;
519}; 524};
520 525
5214.23 KVM_CREATE_IRQCHIP 5264.24 KVM_CREATE_IRQCHIP
522 527
523Capability: KVM_CAP_IRQCHIP 528Capability: KVM_CAP_IRQCHIP
524Architectures: x86, ia64 529Architectures: x86, ia64
@@ -531,7 +536,7 @@ ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
531local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 536local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
532only go to the IOAPIC. On ia64, a IOSAPIC is created. 537only go to the IOAPIC. On ia64, a IOSAPIC is created.
533 538
5344.24 KVM_IRQ_LINE 5394.25 KVM_IRQ_LINE
535 540
536Capability: KVM_CAP_IRQCHIP 541Capability: KVM_CAP_IRQCHIP
537Architectures: x86, ia64 542Architectures: x86, ia64
@@ -552,7 +557,7 @@ struct kvm_irq_level {
552 __u32 level; /* 0 or 1 */ 557 __u32 level; /* 0 or 1 */
553}; 558};
554 559
5554.25 KVM_GET_IRQCHIP 5604.26 KVM_GET_IRQCHIP
556 561
557Capability: KVM_CAP_IRQCHIP 562Capability: KVM_CAP_IRQCHIP
558Architectures: x86, ia64 563Architectures: x86, ia64
@@ -573,7 +578,7 @@ struct kvm_irqchip {
573 } chip; 578 } chip;
574}; 579};
575 580
5764.26 KVM_SET_IRQCHIP 5814.27 KVM_SET_IRQCHIP
577 582
578Capability: KVM_CAP_IRQCHIP 583Capability: KVM_CAP_IRQCHIP
579Architectures: x86, ia64 584Architectures: x86, ia64
@@ -594,7 +599,7 @@ struct kvm_irqchip {
594 } chip; 599 } chip;
595}; 600};
596 601
5974.27 KVM_XEN_HVM_CONFIG 6024.28 KVM_XEN_HVM_CONFIG
598 603
599Capability: KVM_CAP_XEN_HVM 604Capability: KVM_CAP_XEN_HVM
600Architectures: x86 605Architectures: x86
@@ -618,7 +623,7 @@ struct kvm_xen_hvm_config {
618 __u8 pad2[30]; 623 __u8 pad2[30];
619}; 624};
620 625
6214.27 KVM_GET_CLOCK 6264.29 KVM_GET_CLOCK
622 627
623Capability: KVM_CAP_ADJUST_CLOCK 628Capability: KVM_CAP_ADJUST_CLOCK
624Architectures: x86 629Architectures: x86
@@ -636,7 +641,7 @@ struct kvm_clock_data {
636 __u32 pad[9]; 641 __u32 pad[9];
637}; 642};
638 643
6394.28 KVM_SET_CLOCK 6444.30 KVM_SET_CLOCK
640 645
641Capability: KVM_CAP_ADJUST_CLOCK 646Capability: KVM_CAP_ADJUST_CLOCK
642Architectures: x86 647Architectures: x86
@@ -654,7 +659,7 @@ struct kvm_clock_data {
654 __u32 pad[9]; 659 __u32 pad[9];
655}; 660};
656 661
6574.29 KVM_GET_VCPU_EVENTS 6624.31 KVM_GET_VCPU_EVENTS
658 663
659Capability: KVM_CAP_VCPU_EVENTS 664Capability: KVM_CAP_VCPU_EVENTS
660Extended by: KVM_CAP_INTR_SHADOW 665Extended by: KVM_CAP_INTR_SHADOW
@@ -693,7 +698,7 @@ struct kvm_vcpu_events {
693KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that 698KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that
694interrupt.shadow contains a valid state. Otherwise, this field is undefined. 699interrupt.shadow contains a valid state. Otherwise, this field is undefined.
695 700
6964.30 KVM_SET_VCPU_EVENTS 7014.32 KVM_SET_VCPU_EVENTS
697 702
698Capability: KVM_CAP_VCPU_EVENTS 703Capability: KVM_CAP_VCPU_EVENTS
699Extended by: KVM_CAP_INTR_SHADOW 704Extended by: KVM_CAP_INTR_SHADOW
@@ -719,7 +724,7 @@ If KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in
719the flags field to signal that interrupt.shadow contains a valid state and 724the flags field to signal that interrupt.shadow contains a valid state and
720shall be written into the VCPU. 725shall be written into the VCPU.
721 726
7224.32 KVM_GET_DEBUGREGS 7274.33 KVM_GET_DEBUGREGS
723 728
724Capability: KVM_CAP_DEBUGREGS 729Capability: KVM_CAP_DEBUGREGS
725Architectures: x86 730Architectures: x86
@@ -737,7 +742,7 @@ struct kvm_debugregs {
737 __u64 reserved[9]; 742 __u64 reserved[9];
738}; 743};
739 744
7404.33 KVM_SET_DEBUGREGS 7454.34 KVM_SET_DEBUGREGS
741 746
742Capability: KVM_CAP_DEBUGREGS 747Capability: KVM_CAP_DEBUGREGS
743Architectures: x86 748Architectures: x86
@@ -750,7 +755,7 @@ Writes debug registers into the vcpu.
750See KVM_GET_DEBUGREGS for the data structure. The flags field is unused 755See KVM_GET_DEBUGREGS for the data structure. The flags field is unused
751yet and must be cleared on entry. 756yet and must be cleared on entry.
752 757
7534.34 KVM_SET_USER_MEMORY_REGION 7584.35 KVM_SET_USER_MEMORY_REGION
754 759
755Capability: KVM_CAP_USER_MEM 760Capability: KVM_CAP_USER_MEM
756Architectures: all 761Architectures: all
@@ -796,7 +801,7 @@ It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl.
796The KVM_SET_MEMORY_REGION does not allow fine grained control over memory 801The KVM_SET_MEMORY_REGION does not allow fine grained control over memory
797allocation and is deprecated. 802allocation and is deprecated.
798 803
7994.35 KVM_SET_TSS_ADDR 8044.36 KVM_SET_TSS_ADDR
800 805
801Capability: KVM_CAP_SET_TSS_ADDR 806Capability: KVM_CAP_SET_TSS_ADDR
802Architectures: x86 807Architectures: x86
@@ -814,7 +819,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware
814because of a quirk in the virtualization implementation (see the internals 819because of a quirk in the virtualization implementation (see the internals
815documentation when it pops into existence). 820documentation when it pops into existence).
816 821
8174.36 KVM_ENABLE_CAP 8224.37 KVM_ENABLE_CAP
818 823
819Capability: KVM_CAP_ENABLE_CAP 824Capability: KVM_CAP_ENABLE_CAP
820Architectures: ppc 825Architectures: ppc
@@ -849,7 +854,7 @@ function properly, this is the place to put them.
849 __u8 pad[64]; 854 __u8 pad[64];
850}; 855};
851 856
8524.37 KVM_GET_MP_STATE 8574.38 KVM_GET_MP_STATE
853 858
854Capability: KVM_CAP_MP_STATE 859Capability: KVM_CAP_MP_STATE
855Architectures: x86, ia64 860Architectures: x86, ia64
@@ -879,7 +884,7 @@ Possible values are:
879This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 884This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
880irqchip, the multiprocessing state must be maintained by userspace. 885irqchip, the multiprocessing state must be maintained by userspace.
881 886
8824.38 KVM_SET_MP_STATE 8874.39 KVM_SET_MP_STATE
883 888
884Capability: KVM_CAP_MP_STATE 889Capability: KVM_CAP_MP_STATE
885Architectures: x86, ia64 890Architectures: x86, ia64
@@ -893,7 +898,7 @@ arguments.
893This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 898This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
894irqchip, the multiprocessing state must be maintained by userspace. 899irqchip, the multiprocessing state must be maintained by userspace.
895 900
8964.39 KVM_SET_IDENTITY_MAP_ADDR 9014.40 KVM_SET_IDENTITY_MAP_ADDR
897 902
898Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR 903Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR
899Architectures: x86 904Architectures: x86
@@ -911,7 +916,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware
911because of a quirk in the virtualization implementation (see the internals 916because of a quirk in the virtualization implementation (see the internals
912documentation when it pops into existence). 917documentation when it pops into existence).
913 918
9144.40 KVM_SET_BOOT_CPU_ID 9194.41 KVM_SET_BOOT_CPU_ID
915 920
916Capability: KVM_CAP_SET_BOOT_CPU_ID 921Capability: KVM_CAP_SET_BOOT_CPU_ID
917Architectures: x86, ia64 922Architectures: x86, ia64
@@ -923,7 +928,7 @@ Define which vcpu is the Bootstrap Processor (BSP). Values are the same
923as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default 928as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default
924is vcpu 0. 929is vcpu 0.
925 930
9264.41 KVM_GET_XSAVE 9314.42 KVM_GET_XSAVE
927 932
928Capability: KVM_CAP_XSAVE 933Capability: KVM_CAP_XSAVE
929Architectures: x86 934Architectures: x86
@@ -937,7 +942,7 @@ struct kvm_xsave {
937 942
938This ioctl would copy current vcpu's xsave struct to the userspace. 943This ioctl would copy current vcpu's xsave struct to the userspace.
939 944
9404.42 KVM_SET_XSAVE 9454.43 KVM_SET_XSAVE
941 946
942Capability: KVM_CAP_XSAVE 947Capability: KVM_CAP_XSAVE
943Architectures: x86 948Architectures: x86
@@ -951,7 +956,7 @@ struct kvm_xsave {
951 956
952This ioctl would copy userspace's xsave struct to the kernel. 957This ioctl would copy userspace's xsave struct to the kernel.
953 958
9544.43 KVM_GET_XCRS 9594.44 KVM_GET_XCRS
955 960
956Capability: KVM_CAP_XCRS 961Capability: KVM_CAP_XCRS
957Architectures: x86 962Architectures: x86
@@ -974,7 +979,7 @@ struct kvm_xcrs {
974 979
975This ioctl would copy current vcpu's xcrs to the userspace. 980This ioctl would copy current vcpu's xcrs to the userspace.
976 981
9774.44 KVM_SET_XCRS 9824.45 KVM_SET_XCRS
978 983
979Capability: KVM_CAP_XCRS 984Capability: KVM_CAP_XCRS
980Architectures: x86 985Architectures: x86
@@ -997,7 +1002,7 @@ struct kvm_xcrs {
997 1002
998This ioctl would set vcpu's xcr to the value userspace specified. 1003This ioctl would set vcpu's xcr to the value userspace specified.
999 1004
10004.45 KVM_GET_SUPPORTED_CPUID 10054.46 KVM_GET_SUPPORTED_CPUID
1001 1006
1002Capability: KVM_CAP_EXT_CPUID 1007Capability: KVM_CAP_EXT_CPUID
1003Architectures: x86 1008Architectures: x86
@@ -1062,7 +1067,7 @@ emulate them efficiently. The fields in each entry are defined as follows:
1062 eax, ebx, ecx, edx: the values returned by the cpuid instruction for 1067 eax, ebx, ecx, edx: the values returned by the cpuid instruction for
1063 this function/index combination 1068 this function/index combination
1064 1069
10654.46 KVM_PPC_GET_PVINFO 10704.47 KVM_PPC_GET_PVINFO
1066 1071
1067Capability: KVM_CAP_PPC_GET_PVINFO 1072Capability: KVM_CAP_PPC_GET_PVINFO
1068Architectures: ppc 1073Architectures: ppc
@@ -1085,7 +1090,7 @@ of 4 instructions that make up a hypercall.
1085If any additional field gets added to this structure later on, a bit for that 1090If any additional field gets added to this structure later on, a bit for that
1086additional piece of information will be set in the flags bitmap. 1091additional piece of information will be set in the flags bitmap.
1087 1092
10884.47 KVM_ASSIGN_PCI_DEVICE 10934.48 KVM_ASSIGN_PCI_DEVICE
1089 1094
1090Capability: KVM_CAP_DEVICE_ASSIGNMENT 1095Capability: KVM_CAP_DEVICE_ASSIGNMENT
1091Architectures: x86 ia64 1096Architectures: x86 ia64
@@ -1113,7 +1118,7 @@ following flags are specified:
1113/* Depends on KVM_CAP_IOMMU */ 1118/* Depends on KVM_CAP_IOMMU */
1114#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 1119#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1115 1120
11164.48 KVM_DEASSIGN_PCI_DEVICE 11214.49 KVM_DEASSIGN_PCI_DEVICE
1117 1122
1118Capability: KVM_CAP_DEVICE_DEASSIGNMENT 1123Capability: KVM_CAP_DEVICE_DEASSIGNMENT
1119Architectures: x86 ia64 1124Architectures: x86 ia64
@@ -1126,7 +1131,7 @@ Ends PCI device assignment, releasing all associated resources.
1126See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is 1131See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is
1127used in kvm_assigned_pci_dev to identify the device. 1132used in kvm_assigned_pci_dev to identify the device.
1128 1133
11294.49 KVM_ASSIGN_DEV_IRQ 11344.50 KVM_ASSIGN_DEV_IRQ
1130 1135
1131Capability: KVM_CAP_ASSIGN_DEV_IRQ 1136Capability: KVM_CAP_ASSIGN_DEV_IRQ
1132Architectures: x86 ia64 1137Architectures: x86 ia64
@@ -1164,7 +1169,7 @@ The following flags are defined:
1164It is not valid to specify multiple types per host or guest IRQ. However, the 1169It is not valid to specify multiple types per host or guest IRQ. However, the
1165IRQ type of host and guest can differ or can even be null. 1170IRQ type of host and guest can differ or can even be null.
1166 1171
11674.50 KVM_DEASSIGN_DEV_IRQ 11724.51 KVM_DEASSIGN_DEV_IRQ
1168 1173
1169Capability: KVM_CAP_ASSIGN_DEV_IRQ 1174Capability: KVM_CAP_ASSIGN_DEV_IRQ
1170Architectures: x86 ia64 1175Architectures: x86 ia64
@@ -1178,7 +1183,7 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified
1178by assigned_dev_id, flags must correspond to the IRQ type specified on 1183by assigned_dev_id, flags must correspond to the IRQ type specified on
1179KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. 1184KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed.
1180 1185
11814.51 KVM_SET_GSI_ROUTING 11864.52 KVM_SET_GSI_ROUTING
1182 1187
1183Capability: KVM_CAP_IRQ_ROUTING 1188Capability: KVM_CAP_IRQ_ROUTING
1184Architectures: x86 ia64 1189Architectures: x86 ia64
@@ -1226,7 +1231,7 @@ struct kvm_irq_routing_msi {
1226 __u32 pad; 1231 __u32 pad;
1227}; 1232};
1228 1233
12294.52 KVM_ASSIGN_SET_MSIX_NR 12344.53 KVM_ASSIGN_SET_MSIX_NR
1230 1235
1231Capability: KVM_CAP_DEVICE_MSIX 1236Capability: KVM_CAP_DEVICE_MSIX
1232Architectures: x86 ia64 1237Architectures: x86 ia64
@@ -1245,7 +1250,7 @@ struct kvm_assigned_msix_nr {
1245 1250
1246#define KVM_MAX_MSIX_PER_DEV 256 1251#define KVM_MAX_MSIX_PER_DEV 256
1247 1252
12484.53 KVM_ASSIGN_SET_MSIX_ENTRY 12534.54 KVM_ASSIGN_SET_MSIX_ENTRY
1249 1254
1250Capability: KVM_CAP_DEVICE_MSIX 1255Capability: KVM_CAP_DEVICE_MSIX
1251Architectures: x86 ia64 1256Architectures: x86 ia64
@@ -1263,6 +1268,29 @@ struct kvm_assigned_msix_entry {
1263 __u16 padding[3]; 1268 __u16 padding[3];
1264}; 1269};
1265 1270
12714.54 KVM_SET_TSC_KHZ
1272
1273Capability: KVM_CAP_TSC_CONTROL
1274Architectures: x86
1275Type: vcpu ioctl
1276Parameters: virtual tsc_khz
1277Returns: 0 on success, -1 on error
1278
1279Specifies the tsc frequency for the virtual machine. The unit of the
1280frequency is KHz.
1281
12824.55 KVM_GET_TSC_KHZ
1283
1284Capability: KVM_CAP_GET_TSC_KHZ
1285Architectures: x86
1286Type: vcpu ioctl
1287Parameters: none
1288Returns: virtual tsc-khz on success, negative value on error
1289
1290Returns the tsc frequency of the guest. The unit of the return value is
1291KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
1292error.
1293
12665. The kvm_run structure 12945. The kvm_run structure
1267 1295
1268Application code obtains a pointer to the kvm_run structure by 1296Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/kvm/cpuid.txt b/Documentation/virtual/kvm/cpuid.txt
index 882068538c9..882068538c9 100644
--- a/Documentation/kvm/cpuid.txt
+++ b/Documentation/virtual/kvm/cpuid.txt
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
new file mode 100644
index 00000000000..3b4cd3bf563
--- /dev/null
+++ b/Documentation/virtual/kvm/locking.txt
@@ -0,0 +1,25 @@
1KVM Lock Overview
2=================
3
41. Acquisition Orders
5---------------------
6
7(to be written)
8
92. Reference
10------------
11
12Name: kvm_lock
13Type: raw_spinlock
14Arch: any
15Protects: - vm_list
16 - hardware virtualization enable/disable
17Comment: 'raw' because hardware enabling/disabling must be atomic /wrt
18 migration.
19
20Name: kvm_arch::tsc_write_lock
21Type: raw_spinlock
22Arch: x86
23Protects: - kvm_arch::{last_tsc_write,last_tsc_nsec,last_tsc_offset}
24 - tsc offset in vmcb
25Comment: 'raw' because updating the tsc offsets must not be preempted.
diff --git a/Documentation/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index 142cc513665..f46aa58389c 100644
--- a/Documentation/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -23,7 +23,7 @@ The mmu code attempts to satisfy the following requirements:
23 and framebuffer-based displays 23 and framebuffer-based displays
24- footprint: keep the amount of pinned kernel memory low (most memory 24- footprint: keep the amount of pinned kernel memory low (most memory
25 should be shrinkable) 25 should be shrinkable)
26- reliablity: avoid multipage or GFP_ATOMIC allocations 26- reliability: avoid multipage or GFP_ATOMIC allocations
27 27
28Acronyms 28Acronyms
29======== 29========
diff --git a/Documentation/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt
index d079aed27e0..d079aed27e0 100644
--- a/Documentation/kvm/msr.txt
+++ b/Documentation/virtual/kvm/msr.txt
diff --git a/Documentation/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt
index a7f2244b3be..3ab969c5904 100644
--- a/Documentation/kvm/ppc-pv.txt
+++ b/Documentation/virtual/kvm/ppc-pv.txt
@@ -136,7 +136,7 @@ Patched instructions
136==================== 136====================
137 137
138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions 138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions
139respectively on 32 bit systems with an added offset of 4 to accomodate for big 139respectively on 32 bit systems with an added offset of 4 to accommodate for big
140endianness. 140endianness.
141 141
142The following is a list of mapping the Linux kernel performs when running as 142The following is a list of mapping the Linux kernel performs when running as
diff --git a/Documentation/kvm/review-checklist.txt b/Documentation/virtual/kvm/review-checklist.txt
index 730475ae1b8..a850986ed68 100644
--- a/Documentation/kvm/review-checklist.txt
+++ b/Documentation/virtual/kvm/review-checklist.txt
@@ -7,7 +7,7 @@ Review checklist for kvm patches
72. Patches should be against kvm.git master branch. 72. Patches should be against kvm.git master branch.
8 8
93. If the patch introduces or modifies a new userspace API: 93. If the patch introduces or modifies a new userspace API:
10 - the API must be documented in Documentation/kvm/api.txt 10 - the API must be documented in Documentation/virtual/kvm/api.txt
11 - the API must be discoverable using KVM_CHECK_EXTENSION 11 - the API must be discoverable using KVM_CHECK_EXTENSION
12 12
134. New state must include support for save/restore. 134. New state must include support for save/restore.
diff --git a/Documentation/kvm/timekeeping.txt b/Documentation/virtual/kvm/timekeeping.txt
index 0c5033a58c9..df8946377cb 100644
--- a/Documentation/kvm/timekeeping.txt
+++ b/Documentation/virtual/kvm/timekeeping.txt
@@ -81,7 +81,7 @@ Mode 0: Single Timeout. This is a one-shot software timeout that counts down
81 when the gate is high (always true for timers 0 and 1). When the count 81 when the gate is high (always true for timers 0 and 1). When the count
82 reaches zero, the output goes high. 82 reaches zero, the output goes high.
83 83
84Mode 1: Triggered One-shot. The output is intially set high. When the gate 84Mode 1: Triggered One-shot. The output is initially set high. When the gate
85 line is set high, a countdown is initiated (which does not stop if the gate is 85 line is set high, a countdown is initiated (which does not stop if the gate is
86 lowered), during which the output is set low. When the count reaches zero, 86 lowered), during which the output is set low. When the count reaches zero,
87 the output goes high. 87 the output goes high.
diff --git a/Documentation/lguest/.gitignore b/Documentation/virtual/lguest/.gitignore
index 115587fd5f6..115587fd5f6 100644
--- a/Documentation/lguest/.gitignore
+++ b/Documentation/virtual/lguest/.gitignore
diff --git a/Documentation/lguest/Makefile b/Documentation/virtual/lguest/Makefile
index bebac6b4f33..bebac6b4f33 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/virtual/lguest/Makefile
diff --git a/Documentation/lguest/extract b/Documentation/virtual/lguest/extract
index 7730bb6e4b9..7730bb6e4b9 100644
--- a/Documentation/lguest/extract
+++ b/Documentation/virtual/lguest/extract
diff --git a/Documentation/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c
index d9da7e14853..d9da7e14853 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/virtual/lguest/lguest.c
diff --git a/Documentation/lguest/lguest.txt b/Documentation/virtual/lguest/lguest.txt
index dad99978a6a..bff0c554485 100644
--- a/Documentation/lguest/lguest.txt
+++ b/Documentation/virtual/lguest/lguest.txt
@@ -74,7 +74,8 @@ Running Lguest:
74 74
75- Run an lguest as root: 75- Run an lguest as root:
76 76
77 Documentation/lguest/lguest 64 vmlinux --tunnet=192.168.19.1 --block=rootfile root=/dev/vda 77 Documentation/virtual/lguest/lguest 64 vmlinux --tunnet=192.168.19.1 \
78 --block=rootfile root=/dev/vda
78 79
79 Explanation: 80 Explanation:
80 64: the amount of memory to use, in MB. 81 64: the amount of memory to use, in MB.
diff --git a/Documentation/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
index 9b7e1904db1..5d0fc8bfcdb 100644
--- a/Documentation/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
@@ -1182,6 +1182,16 @@
1182 forge.net/> and explains these in detail, as well as 1182 forge.net/> and explains these in detail, as well as
1183 some other issues. 1183 some other issues.
1184 1184
1185 There is also a related point-to-point only "ucast" transport.
1186 This is useful when your network does not support multicast, and
1187 all network connections are simple point to point links.
1188
1189 The full set of command line options for this transport are
1190
1191
1192 ethn=ucast,ethernet address,remote address,listen port,remote port
1193
1194
1185 1195
1186 1196
1187 66..66.. TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr 1197 66..66.. TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr
diff --git a/Documentation/vm/active_mm.txt b/Documentation/vm/active_mm.txt
index 4ee1f643d89..dbf45817405 100644
--- a/Documentation/vm/active_mm.txt
+++ b/Documentation/vm/active_mm.txt
@@ -74,7 +74,7 @@ we have a user context", and is generally done by the page fault handler
74and things like that). 74and things like that).
75 75
76Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago, 76Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago,
77because it slightly changes the interfaces to accomodate the alpha (who 77because it slightly changes the interfaces to accommodate the alpha (who
78would have thought it, but the alpha actually ends up having one of the 78would have thought it, but the alpha actually ends up having one of the
79ugliest context switch codes - unlike the other architectures where the MM 79ugliest context switch codes - unlike the other architectures where the MM
80and register state is separate, the alpha PALcode joins the two, and you 80and register state is separate, the alpha PALcode joins the two, and you
diff --git a/Documentation/vm/cleancache.txt b/Documentation/vm/cleancache.txt
new file mode 100644
index 00000000000..36c367c7308
--- /dev/null
+++ b/Documentation/vm/cleancache.txt
@@ -0,0 +1,278 @@
1MOTIVATION
2
3Cleancache is a new optional feature provided by the VFS layer that
4potentially dramatically increases page cache effectiveness for
5many workloads in many environments at a negligible cost.
6
7Cleancache can be thought of as a page-granularity victim cache for clean
8pages that the kernel's pageframe replacement algorithm (PFRA) would like
9to keep around, but can't since there isn't enough memory. So when the
10PFRA "evicts" a page, it first attempts to use cleancache code to
11put the data contained in that page into "transcendent memory", memory
12that is not directly accessible or addressable by the kernel and is
13of unknown and possibly time-varying size.
14
15Later, when a cleancache-enabled filesystem wishes to access a page
16in a file on disk, it first checks cleancache to see if it already
17contains it; if it does, the page of data is copied into the kernel
18and a disk access is avoided.
19
20Transcendent memory "drivers" for cleancache are currently implemented
21in Xen (using hypervisor memory) and zcache (using in-kernel compressed
22memory) and other implementations are in development.
23
24FAQs are included below.
25
26IMPLEMENTATION OVERVIEW
27
28A cleancache "backend" that provides transcendent memory registers itself
29to the kernel's cleancache "frontend" by calling cleancache_register_ops,
30passing a pointer to a cleancache_ops structure with funcs set appropriately.
31Note that cleancache_register_ops returns the previous settings so that
32chaining can be performed if desired. The functions provided must conform to
33certain semantics as follows:
34
35Most important, cleancache is "ephemeral". Pages which are copied into
36cleancache have an indefinite lifetime which is completely unknowable
37by the kernel and so may or may not still be in cleancache at any later time.
38Thus, as its name implies, cleancache is not suitable for dirty pages.
39Cleancache has complete discretion over what pages to preserve and what
40pages to discard and when.
41
42Mounting a cleancache-enabled filesystem should call "init_fs" to obtain a
43pool id which, if positive, must be saved in the filesystem's superblock;
44a negative return value indicates failure. A "put_page" will copy a
45(presumably about-to-be-evicted) page into cleancache and associate it with
46the pool id, a file key, and a page index into the file. (The combination
47of a pool id, a file key, and an index is sometimes called a "handle".)
48A "get_page" will copy the page, if found, from cleancache into kernel memory.
49A "flush_page" will ensure the page no longer is present in cleancache;
50a "flush_inode" will flush all pages associated with the specified file;
51and, when a filesystem is unmounted, a "flush_fs" will flush all pages in
52all files specified by the given pool id and also surrender the pool id.
53
54An "init_shared_fs", like init_fs, obtains a pool id but tells cleancache
55to treat the pool as shared using a 128-bit UUID as a key. On systems
56that may run multiple kernels (such as hard partitioned or virtualized
57systems) that may share a clustered filesystem, and where cleancache
58may be shared among those kernels, calls to init_shared_fs that specify the
59same UUID will receive the same pool id, thus allowing the pages to
60be shared. Note that any security requirements must be imposed outside
61of the kernel (e.g. by "tools" that control cleancache). Or a
62cleancache implementation can simply disable shared_init by always
63returning a negative value.
64
65If a get_page is successful on a non-shared pool, the page is flushed (thus
66making cleancache an "exclusive" cache). On a shared pool, the page
67is NOT flushed on a successful get_page so that it remains accessible to
68other sharers. The kernel is responsible for ensuring coherency between
69cleancache (shared or not), the page cache, and the filesystem, using
70cleancache flush operations as required.
71
72Note that cleancache must enforce put-put-get coherency and get-get
73coherency. For the former, if two puts are made to the same handle but
74with different data, say AAA by the first put and BBB by the second, a
75subsequent get can never return the stale data (AAA). For get-get coherency,
76if a get for a given handle fails, subsequent gets for that handle will
77never succeed unless preceded by a successful put with that handle.
78
79Last, cleancache provides no SMP serialization guarantees; if two
80different Linux threads are simultaneously putting and flushing a page
81with the same handle, the results are indeterminate. Callers must
82lock the page to ensure serial behavior.
83
84CLEANCACHE PERFORMANCE METRICS
85
86Cleancache monitoring is done by sysfs files in the
87/sys/kernel/mm/cleancache directory. The effectiveness of cleancache
88can be measured (across all filesystems) with:
89
90succ_gets - number of gets that were successful
91failed_gets - number of gets that failed
92puts - number of puts attempted (all "succeed")
93flushes - number of flushes attempted
94
95A backend implementatation may provide additional metrics.
96
97FAQ
98
991) Where's the value? (Andrew Morton)
100
101Cleancache provides a significant performance benefit to many workloads
102in many environments with negligible overhead by improving the
103effectiveness of the pagecache. Clean pagecache pages are
104saved in transcendent memory (RAM that is otherwise not directly
105addressable to the kernel); fetching those pages later avoids "refaults"
106and thus disk reads.
107
108Cleancache (and its sister code "frontswap") provide interfaces for
109this transcendent memory (aka "tmem"), which conceptually lies between
110fast kernel-directly-addressable RAM and slower DMA/asynchronous devices.
111Disallowing direct kernel or userland reads/writes to tmem
112is ideal when data is transformed to a different form and size (such
113as with compression) or secretly moved (as might be useful for write-
114balancing for some RAM-like devices). Evicted page-cache pages (and
115swap pages) are a great use for this kind of slower-than-RAM-but-much-
116faster-than-disk transcendent memory, and the cleancache (and frontswap)
117"page-object-oriented" specification provides a nice way to read and
118write -- and indirectly "name" -- the pages.
119
120In the virtual case, the whole point of virtualization is to statistically
121multiplex physical resources across the varying demands of multiple
122virtual machines. This is really hard to do with RAM and efforts to
123do it well with no kernel change have essentially failed (except in some
124well-publicized special-case workloads). Cleancache -- and frontswap --
125with a fairly small impact on the kernel, provide a huge amount
126of flexibility for more dynamic, flexible RAM multiplexing.
127Specifically, the Xen Transcendent Memory backend allows otherwise
128"fallow" hypervisor-owned RAM to not only be "time-shared" between multiple
129virtual machines, but the pages can be compressed and deduplicated to
130optimize RAM utilization. And when guest OS's are induced to surrender
131underutilized RAM (e.g. with "self-ballooning"), page cache pages
132are the first to go, and cleancache allows those pages to be
133saved and reclaimed if overall host system memory conditions allow.
134
135And the identical interface used for cleancache can be used in
136physical systems as well. The zcache driver acts as a memory-hungry
137device that stores pages of data in a compressed state. And
138the proposed "RAMster" driver shares RAM across multiple physical
139systems.
140
1412) Why does cleancache have its sticky fingers so deep inside the
142 filesystems and VFS? (Andrew Morton and Christoph Hellwig)
143
144The core hooks for cleancache in VFS are in most cases a single line
145and the minimum set are placed precisely where needed to maintain
146coherency (via cleancache_flush operations) between cleancache,
147the page cache, and disk. All hooks compile into nothingness if
148cleancache is config'ed off and turn into a function-pointer-
149compare-to-NULL if config'ed on but no backend claims the ops
150functions, or to a compare-struct-element-to-negative if a
151backend claims the ops functions but a filesystem doesn't enable
152cleancache.
153
154Some filesystems are built entirely on top of VFS and the hooks
155in VFS are sufficient, so don't require an "init_fs" hook; the
156initial implementation of cleancache didn't provide this hook.
157But for some filesystems (such as btrfs), the VFS hooks are
158incomplete and one or more hooks in fs-specific code are required.
159And for some other filesystems, such as tmpfs, cleancache may
160be counterproductive. So it seemed prudent to require a filesystem
161to "opt in" to use cleancache, which requires adding a hook in
162each filesystem. Not all filesystems are supported by cleancache
163only because they haven't been tested. The existing set should
164be sufficient to validate the concept, the opt-in approach means
165that untested filesystems are not affected, and the hooks in the
166existing filesystems should make it very easy to add more
167filesystems in the future.
168
169The total impact of the hooks to existing fs and mm files is only
170about 40 lines added (not counting comments and blank lines).
171
1723) Why not make cleancache asynchronous and batched so it can
173 more easily interface with real devices with DMA instead
174 of copying each individual page? (Minchan Kim)
175
176The one-page-at-a-time copy semantics simplifies the implementation
177on both the frontend and backend and also allows the backend to
178do fancy things on-the-fly like page compression and
179page deduplication. And since the data is "gone" (copied into/out
180of the pageframe) before the cleancache get/put call returns,
181a great deal of race conditions and potential coherency issues
182are avoided. While the interface seems odd for a "real device"
183or for real kernel-addressable RAM, it makes perfect sense for
184transcendent memory.
185
1864) Why is non-shared cleancache "exclusive"? And where is the
187 page "flushed" after a "get"? (Minchan Kim)
188
189The main reason is to free up space in transcendent memory and
190to avoid unnecessary cleancache_flush calls. If you want inclusive,
191the page can be "put" immediately following the "get". If
192put-after-get for inclusive becomes common, the interface could
193be easily extended to add a "get_no_flush" call.
194
195The flush is done by the cleancache backend implementation.
196
1975) What's the performance impact?
198
199Performance analysis has been presented at OLS'09 and LCA'10.
200Briefly, performance gains can be significant on most workloads,
201especially when memory pressure is high (e.g. when RAM is
202overcommitted in a virtual workload); and because the hooks are
203invoked primarily in place of or in addition to a disk read/write,
204overhead is negligible even in worst case workloads. Basically
205cleancache replaces I/O with memory-copy-CPU-overhead; on older
206single-core systems with slow memory-copy speeds, cleancache
207has little value, but in newer multicore machines, especially
208consolidated/virtualized machines, it has great value.
209
2106) How do I add cleancache support for filesystem X? (Boaz Harrash)
211
212Filesystems that are well-behaved and conform to certain
213restrictions can utilize cleancache simply by making a call to
214cleancache_init_fs at mount time. Unusual, misbehaving, or
215poorly layered filesystems must either add additional hooks
216and/or undergo extensive additional testing... or should just
217not enable the optional cleancache.
218
219Some points for a filesystem to consider:
220
221- The FS should be block-device-based (e.g. a ram-based FS such
222 as tmpfs should not enable cleancache)
223- To ensure coherency/correctness, the FS must ensure that all
224 file removal or truncation operations either go through VFS or
225 add hooks to do the equivalent cleancache "flush" operations
226- To ensure coherency/correctness, either inode numbers must
227 be unique across the lifetime of the on-disk file OR the
228 FS must provide an "encode_fh" function.
229- The FS must call the VFS superblock alloc and deactivate routines
230 or add hooks to do the equivalent cleancache calls done there.
231- To maximize performance, all pages fetched from the FS should
232 go through the do_mpag_readpage routine or the FS should add
233 hooks to do the equivalent (cf. btrfs)
234- Currently, the FS blocksize must be the same as PAGESIZE. This
235 is not an architectural restriction, but no backends currently
236 support anything different.
237- A clustered FS should invoke the "shared_init_fs" cleancache
238 hook to get best performance for some backends.
239
2407) Why not use the KVA of the inode as the key? (Christoph Hellwig)
241
242If cleancache would use the inode virtual address instead of
243inode/filehandle, the pool id could be eliminated. But, this
244won't work because cleancache retains pagecache data pages
245persistently even when the inode has been pruned from the
246inode unused list, and only flushes the data page if the file
247gets removed/truncated. So if cleancache used the inode kva,
248there would be potential coherency issues if/when the inode
249kva is reused for a different file. Alternately, if cleancache
250flushed the pages when the inode kva was freed, much of the value
251of cleancache would be lost because the cache of pages in cleanache
252is potentially much larger than the kernel pagecache and is most
253useful if the pages survive inode cache removal.
254
2558) Why is a global variable required?
256
257The cleancache_enabled flag is checked in all of the frequently-used
258cleancache hooks. The alternative is a function call to check a static
259variable. Since cleancache is enabled dynamically at runtime, systems
260that don't enable cleancache would suffer thousands (possibly
261tens-of-thousands) of unnecessary function calls per second. So the
262global variable allows cleancache to be enabled by default at compile
263time, but have insignificant performance impact when cleancache remains
264disabled at runtime.
265
2669) Does cleanache work with KVM?
267
268The memory model of KVM is sufficiently different that a cleancache
269backend may have less value for KVM. This remains to be tested,
270especially in an overcommitted system.
271
27210) Does cleancache work in userspace? It sounds useful for
273 memory hungry caches like web browsers. (Jamie Lokier)
274
275No plans yet, though we agree it sounds useful, at least for
276apps that bypass the page cache (e.g. O_DIRECT).
277
278Last updated: Dan Magenheimer, April 13 2011
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index 457634c1e03..f8551b3879f 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -72,7 +72,7 @@ number of huge pages requested. This is the most reliable method of
72allocating huge pages as memory has not yet become fragmented. 72allocating huge pages as memory has not yet become fragmented.
73 73
74Some platforms support multiple huge page sizes. To allocate huge pages 74Some platforms support multiple huge page sizes. To allocate huge pages
75of a specific size, one must preceed the huge pages boot command parameters 75of a specific size, one must precede the huge pages boot command parameters
76with a huge page size selection parameter "hugepagesz=<size>". <size> must 76with a huge page size selection parameter "hugepagesz=<size>". <size> must
77be specified in bytes with optional scale suffix [kKmMgG]. The default huge 77be specified in bytes with optional scale suffix [kKmMgG]. The default huge
78page size may be selected with the "default_hugepagesz=<size>" boot parameter. 78page size may be selected with the "default_hugepagesz=<size>" boot parameter.
diff --git a/Documentation/vm/locking b/Documentation/vm/locking
index 25fadb44876..f61228bd639 100644
--- a/Documentation/vm/locking
+++ b/Documentation/vm/locking
@@ -66,7 +66,7 @@ in some cases it is not really needed. Eg, vm_start is modified by
66expand_stack(), it is hard to come up with a destructive scenario without 66expand_stack(), it is hard to come up with a destructive scenario without
67having the vmlist protection in this case. 67having the vmlist protection in this case.
68 68
69The page_table_lock nests with the inode i_mmap_lock and the kmem cache 69The page_table_lock nests with the inode i_mmap_mutex and the kmem cache
70c_spinlock spinlocks. This is okay, since the kmem code asks for pages after 70c_spinlock spinlocks. This is okay, since the kmem code asks for pages after
71dropping c_spinlock. The page_table_lock also nests with pagecache_lock and 71dropping c_spinlock. The page_table_lock also nests with pagecache_lock and
72pagemap_lru_lock spinlocks, and no code asks for memory with these locks 72pagemap_lru_lock spinlocks, and no code asks for memory with these locks
diff --git a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting
index 21c7b1f8f32..706d7ed9d8d 100644
--- a/Documentation/vm/overcommit-accounting
+++ b/Documentation/vm/overcommit-accounting
@@ -4,7 +4,7 @@ The Linux kernel supports the following overcommit handling modes
4 address space are refused. Used for a typical system. It 4 address space are refused. Used for a typical system. It
5 ensures a seriously wild allocation fails while allowing 5 ensures a seriously wild allocation fails while allowing
6 overcommit to reduce swap usage. root is allowed to 6 overcommit to reduce swap usage. root is allowed to
7 allocate slighly more memory in this mode. This is the 7 allocate slightly more memory in this mode. This is the
8 default. 8 default.
9 9
101 - Always overcommit. Appropriate for some scientific 101 - Always overcommit. Appropriate for some scientific
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index cc96ee2666f..7445caa26d0 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -32,8 +32,20 @@
32#include <sys/types.h> 32#include <sys/types.h>
33#include <sys/errno.h> 33#include <sys/errno.h>
34#include <sys/fcntl.h> 34#include <sys/fcntl.h>
35#include <sys/mount.h>
36#include <sys/statfs.h>
37#include "../../include/linux/magic.h"
35 38
36 39
40#ifndef MAX_PATH
41# define MAX_PATH 256
42#endif
43
44#ifndef STR
45# define _STR(x) #x
46# define STR(x) _STR(x)
47#endif
48
37/* 49/*
38 * pagemap kernel ABI bits 50 * pagemap kernel ABI bits
39 */ 51 */
@@ -152,6 +164,12 @@ static const char *page_flag_names[] = {
152}; 164};
153 165
154 166
167static const char *debugfs_known_mountpoints[] = {
168 "/sys/kernel/debug",
169 "/debug",
170 0,
171};
172
155/* 173/*
156 * data structures 174 * data structures
157 */ 175 */
@@ -184,7 +202,7 @@ static int kpageflags_fd;
184static int opt_hwpoison; 202static int opt_hwpoison;
185static int opt_unpoison; 203static int opt_unpoison;
186 204
187static const char hwpoison_debug_fs[] = "/debug/hwpoison"; 205static char hwpoison_debug_fs[MAX_PATH+1];
188static int hwpoison_inject_fd; 206static int hwpoison_inject_fd;
189static int hwpoison_forget_fd; 207static int hwpoison_forget_fd;
190 208
@@ -464,21 +482,100 @@ static uint64_t kpageflags_flags(uint64_t flags)
464 return flags; 482 return flags;
465} 483}
466 484
485/* verify that a mountpoint is actually a debugfs instance */
486static int debugfs_valid_mountpoint(const char *debugfs)
487{
488 struct statfs st_fs;
489
490 if (statfs(debugfs, &st_fs) < 0)
491 return -ENOENT;
492 else if (st_fs.f_type != (long) DEBUGFS_MAGIC)
493 return -ENOENT;
494
495 return 0;
496}
497
498/* find the path to the mounted debugfs */
499static const char *debugfs_find_mountpoint(void)
500{
501 const char **ptr;
502 char type[100];
503 FILE *fp;
504
505 ptr = debugfs_known_mountpoints;
506 while (*ptr) {
507 if (debugfs_valid_mountpoint(*ptr) == 0) {
508 strcpy(hwpoison_debug_fs, *ptr);
509 return hwpoison_debug_fs;
510 }
511 ptr++;
512 }
513
514 /* give up and parse /proc/mounts */
515 fp = fopen("/proc/mounts", "r");
516 if (fp == NULL)
517 perror("Can't open /proc/mounts for read");
518
519 while (fscanf(fp, "%*s %"
520 STR(MAX_PATH)
521 "s %99s %*s %*d %*d\n",
522 hwpoison_debug_fs, type) == 2) {
523 if (strcmp(type, "debugfs") == 0)
524 break;
525 }
526 fclose(fp);
527
528 if (strcmp(type, "debugfs") != 0)
529 return NULL;
530
531 return hwpoison_debug_fs;
532}
533
534/* mount the debugfs somewhere if it's not mounted */
535
536static void debugfs_mount(void)
537{
538 const char **ptr;
539
540 /* see if it's already mounted */
541 if (debugfs_find_mountpoint())
542 return;
543
544 ptr = debugfs_known_mountpoints;
545 while (*ptr) {
546 if (mount(NULL, *ptr, "debugfs", 0, NULL) == 0) {
547 /* save the mountpoint */
548 strcpy(hwpoison_debug_fs, *ptr);
549 break;
550 }
551 ptr++;
552 }
553
554 if (*ptr == NULL) {
555 perror("mount debugfs");
556 exit(EXIT_FAILURE);
557 }
558}
559
467/* 560/*
468 * page actions 561 * page actions
469 */ 562 */
470 563
471static void prepare_hwpoison_fd(void) 564static void prepare_hwpoison_fd(void)
472{ 565{
473 char buf[100]; 566 char buf[MAX_PATH + 1];
567
568 debugfs_mount();
474 569
475 if (opt_hwpoison && !hwpoison_inject_fd) { 570 if (opt_hwpoison && !hwpoison_inject_fd) {
476 sprintf(buf, "%s/corrupt-pfn", hwpoison_debug_fs); 571 snprintf(buf, MAX_PATH, "%s/hwpoison/corrupt-pfn",
572 hwpoison_debug_fs);
477 hwpoison_inject_fd = checked_open(buf, O_WRONLY); 573 hwpoison_inject_fd = checked_open(buf, O_WRONLY);
478 } 574 }
479 575
480 if (opt_unpoison && !hwpoison_forget_fd) { 576 if (opt_unpoison && !hwpoison_forget_fd) {
481 sprintf(buf, "%s/unpoison-pfn", hwpoison_debug_fs); 577 snprintf(buf, MAX_PATH, "%s/hwpoison/unpoison-pfn",
578 hwpoison_debug_fs);
482 hwpoison_forget_fd = checked_open(buf, O_WRONLY); 579 hwpoison_forget_fd = checked_open(buf, O_WRONLY);
483 } 580 }
484} 581}
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 2d70d0d9510..97bae3c576c 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -84,8 +84,7 @@ indicate that the page is being managed on the unevictable list.
84 84
85The PG_unevictable flag is analogous to, and mutually exclusive with, the 85The PG_unevictable flag is analogous to, and mutually exclusive with, the
86PG_active flag in that it indicates on which LRU list a page resides when 86PG_active flag in that it indicates on which LRU list a page resides when
87PG_lru is set. The unevictable list is compile-time configurable based on the 87PG_lru is set.
88UNEVICTABLE_LRU Kconfig option.
89 88
90The Unevictable LRU infrastructure maintains unevictable pages on an additional 89The Unevictable LRU infrastructure maintains unevictable pages on an additional
91LRU list for a few reasons: 90LRU list for a few reasons:
diff --git a/Documentation/w1/slaves/w1_ds2423 b/Documentation/w1/slaves/w1_ds2423
index 90a65d23cf5..3f98b505a0e 100644
--- a/Documentation/w1/slaves/w1_ds2423
+++ b/Documentation/w1/slaves/w1_ds2423
@@ -21,8 +21,8 @@ value and associated ram buffer is outpputed to own line.
21 21
22Each lines will contain the values of 42 bytes read from the counter and 22Each lines will contain the values of 42 bytes read from the counter and
23memory page along the crc=YES or NO for indicating whether the read operation 23memory page along the crc=YES or NO for indicating whether the read operation
24was successfull and CRC matched. 24was successful and CRC matched.
25If the operation was successfull, there is also in the end of each line 25If the operation was successful, there is also in the end of each line
26a counter value expressed as an integer after c= 26a counter value expressed as an integer after c=
27 27
28Meaning of 42 bytes represented is following: 28Meaning of 42 bytes represented is following:
@@ -34,7 +34,7 @@ Meaning of 42 bytes represented is following:
34 - crc=YES/NO indicating whether read was ok and crc matched 34 - crc=YES/NO indicating whether read was ok and crc matched
35 - c=<int> current counter value 35 - c=<int> current counter value
36 36
37example from the successfull read: 37example from the successful read:
3800 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 3800 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
3900 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 3900 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
4000 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761 4000 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index 804445f745e..f59a31965d5 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -81,7 +81,7 @@ which will contain list of all registered master ids in the following
81format: 81format:
82 82
83 cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct 83 cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct
84 w1_netlink_msg) plus number of masters multipled by 4) 84 w1_netlink_msg) plus number of masters multiplied by 4)
85 w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to 85 w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to
86 number of masters multiplied by 4 (u32 size)) 86 number of masters multiplied by 4 (u32 size))
87 id0 ... idN 87 id0 ... idN
diff --git a/Documentation/watchdog/hpwdt.txt b/Documentation/watchdog/hpwdt.txt
index 9c24d5ffbb0..9488078900e 100644
--- a/Documentation/watchdog/hpwdt.txt
+++ b/Documentation/watchdog/hpwdt.txt
@@ -8,7 +8,7 @@ Last reviewed: 06/02/2009
8 The HP iLO2 NMI Watchdog driver is a kernel module that provides basic 8 The HP iLO2 NMI Watchdog driver is a kernel module that provides basic
9 watchdog functionality and the added benefit of NMI sourcing. Both the 9 watchdog functionality and the added benefit of NMI sourcing. Both the
10 watchdog functionality and the NMI sourcing capability need to be enabled 10 watchdog functionality and the NMI sourcing capability need to be enabled
11 by the user. Remember that the two modes are not dependant on one another. 11 by the user. Remember that the two modes are not dependent on one another.
12 A user can have the NMI sourcing without the watchdog timer and vice-versa. 12 A user can have the NMI sourcing without the watchdog timer and vice-versa.
13 13
14 Watchdog functionality is enabled like any other common watchdog driver. That 14 Watchdog functionality is enabled like any other common watchdog driver. That
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
index 01c513fac40..a0b577de918 100644
--- a/Documentation/workqueue.txt
+++ b/Documentation/workqueue.txt
@@ -12,6 +12,7 @@ CONTENTS
124. Application Programming Interface (API) 124. Application Programming Interface (API)
135. Example Execution Scenarios 135. Example Execution Scenarios
146. Guidelines 146. Guidelines
157. Debugging
15 16
16 17
171. Introduction 181. Introduction
@@ -379,3 +380,42 @@ If q1 has WQ_CPU_INTENSIVE set,
379* Unless work items are expected to consume a huge amount of CPU 380* Unless work items are expected to consume a huge amount of CPU
380 cycles, using a bound wq is usually beneficial due to the increased 381 cycles, using a bound wq is usually beneficial due to the increased
381 level of locality in wq operations and work item execution. 382 level of locality in wq operations and work item execution.
383
384
3857. Debugging
386
387Because the work functions are executed by generic worker threads
388there are a few tricks needed to shed some light on misbehaving
389workqueue users.
390
391Worker threads show up in the process list as:
392
393root 5671 0.0 0.0 0 0 ? S 12:07 0:00 [kworker/0:1]
394root 5672 0.0 0.0 0 0 ? S 12:07 0:00 [kworker/1:2]
395root 5673 0.0 0.0 0 0 ? S 12:12 0:00 [kworker/0:0]
396root 5674 0.0 0.0 0 0 ? S 12:13 0:00 [kworker/1:0]
397
398If kworkers are going crazy (using too much cpu), there are two types
399of possible problems:
400
401 1. Something beeing scheduled in rapid succession
402 2. A single work item that consumes lots of cpu cycles
403
404The first one can be tracked using tracing:
405
406 $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
407 $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
408 (wait a few secs)
409 ^C
410
411If something is busy looping on work queueing, it would be dominating
412the output and the offender can be determined with the work item
413function.
414
415For the second type of problems it should be possible to just check
416the stack trace of the offending worker thread.
417
418 $ cat /proc/THE_OFFENDING_KWORKER/stack
419
420The work item's function should be trivially visible in the stack
421trace.
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index 7fbbaf85f5b..c54b4f503e2 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -189,13 +189,13 @@ ACPI
189 189
190PCI 190PCI
191 191
192 pci=off Don't use PCI 192 pci=off Don't use PCI
193 pci=conf1 Use conf1 access. 193 pci=conf1 Use conf1 access.
194 pci=conf2 Use conf2 access. 194 pci=conf2 Use conf2 access.
195 pci=rom Assign ROMs. 195 pci=rom Assign ROMs.
196 pci=assign-busses Assign busses 196 pci=assign-busses Assign busses
197 pci=irqmask=MASK Set PCI interrupt mask to MASK 197 pci=irqmask=MASK Set PCI interrupt mask to MASK
198 pci=lastbus=NUMBER Scan upto NUMBER busses, no matter what the mptable says. 198 pci=lastbus=NUMBER Scan up to NUMBER busses, no matter what the mptable says.
199 pci=noacpi Don't use ACPI to set up PCI interrupt routing. 199 pci=noacpi Don't use ACPI to set up PCI interrupt routing.
200 200
201IOMMU (input/output memory management unit) 201IOMMU (input/output memory management unit)
@@ -206,7 +206,7 @@ IOMMU (input/output memory management unit)
206 (e.g. because you have < 3 GB memory). 206 (e.g. because you have < 3 GB memory).
207 Kernel boot message: "PCI-DMA: Disabling IOMMU" 207 Kernel boot message: "PCI-DMA: Disabling IOMMU"
208 208
209 2. <arch/x86_64/kernel/pci-gart.c>: AMD GART based hardware IOMMU. 209 2. <arch/x86/kernel/amd_gart_64.c>: AMD GART based hardware IOMMU.
210 Kernel boot message: "PCI-DMA: using GART IOMMU" 210 Kernel boot message: "PCI-DMA: using GART IOMMU"
211 211
212 3. <arch/x86_64/kernel/pci-swiotlb.c> : Software IOMMU implementation. Used 212 3. <arch/x86_64/kernel/pci-swiotlb.c> : Software IOMMU implementation. Used
@@ -293,11 +293,6 @@ IOMMU (input/output memory management unit)
293 293
294Debugging 294Debugging
295 295
296 oops=panic Always panic on oopses. Default is to just kill the process,
297 but there is a small probability of deadlocking the machine.
298 This will also cause panics on machine check exceptions.
299 Useful together with panic=30 to trigger a reboot.
300
301 kstack=N Print N words from the kernel stack in oops dumps. 296 kstack=N Print N words from the kernel stack in oops dumps.
302 297
303 pagefaulttrace Dump all page faults. Only useful for extreme debugging 298 pagefaulttrace Dump all page faults. Only useful for extreme debugging
diff --git a/Documentation/zh_CN/SecurityBugs b/Documentation/zh_CN/SecurityBugs
new file mode 100644
index 00000000000..d21eb07fe94
--- /dev/null
+++ b/Documentation/zh_CN/SecurityBugs
@@ -0,0 +1,50 @@
1Chinese translated version of Documentation/SecurityBugs
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
9Chinese maintainer: Harry Wei <harryxiyou@gmail.com>
10---------------------------------------------------------------------
11Documentation/SecurityBugs 的中文翻译
12
13如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
14交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
15译存在问题,请联系中文版维护者。
16
17中文版维护者: 贾威威 Harry Wei <harryxiyou@gmail.com>
18中文版翻译者: 贾威威 Harry Wei <harryxiyou@gmail.com>
19中文版校译者: 贾威威 Harry Wei <harryxiyou@gmail.com>
20
21
22以下为正文
23---------------------------------------------------------------------
24Linux内核开发者认为安全非常重要。因此,我们想要知道当一个有关于
25安全的漏洞被发现的时候,并且它可能会被尽快的修复或者公开。请把这个安全
26漏洞报告给Linux内核安全团队。
27
281) 联系
29
30linux内核安全团队可以通过email<security@kernel.org>来联系。这是
31一组独立的安全工作人员,可以帮助改善漏洞报告并且公布和取消一个修复。安
32全团队有可能会从部分的维护者那里引进额外的帮助来了解并且修复安全漏洞。
33当遇到任何漏洞,所能提供的信息越多就越能诊断和修复。如果你不清楚什么
34是有帮助的信息,那就请重温一下REPORTING-BUGS文件中的概述过程。任
35何攻击性的代码都是非常有用的,未经报告者的同意不会被取消,除非它已经
36被公布于众。
37
382) 公开
39
40Linux内核安全团队的宗旨就是和漏洞提交者一起处理漏洞的解决方案直
41到公开。我们喜欢尽快地完全公开漏洞。当一个漏洞或者修复还没有被完全地理
42解,解决方案没有通过测试或者供应商协调,可以合理地延迟公开。然而,我们
43期望这些延迟尽可能的短些,是可数的几天,而不是几个星期或者几个月。公开
44日期是通过安全团队和漏洞提供者以及供应商洽谈后的结果。公开时间表是从很
45短(特殊的,它已经被公众所知道)到几个星期。作为一个基本的默认政策,我
46们所期望通知公众的日期是7天的安排。
47
483) 保密协议
49
50Linux内核安全团队不是一个正式的团体,因此不能加入任何的保密协议。
diff --git a/Documentation/zh_CN/SubmitChecklist b/Documentation/zh_CN/SubmitChecklist
new file mode 100644
index 00000000000..951415bbab0
--- /dev/null
+++ b/Documentation/zh_CN/SubmitChecklist
@@ -0,0 +1,109 @@
1Chinese translated version of Documentation/SubmitChecklist
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
9Chinese maintainer: Harry Wei <harryxiyou@gmail.com>
10---------------------------------------------------------------------
11Documentation/SubmitChecklist ķ
12
13ۻ±ĵݣֱϵԭĵάߡʹӢ
14ѵĻҲİά²ʱ߷
15⣬ϵİάߡ
16
17İάߣ Harry Wei <harryxiyou@gmail.com>
18İ淭ߣ Harry Wei <harryxiyou@gmail.com>
19İУߣ Harry Wei <harryxiyou@gmail.com>
20
21
22Ϊ
23---------------------------------------------------------------------
24Linuxںύ嵥
25~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
27һЩں˿ӦĻ飬뿴Լں˲ύ
28ܵĸ졣
29
30ЩdzDocumentation/SubmittingPatchesĵṩԼ
31ύLinuxں˲˵
32
331ʹһô#include/ǸܵǸļ
34 Ҫ붨/Ǹܵͷļ
35
362û߸CONFIGѡ =y=m=n
37 Ҫб뾯/ ҪӾ/
38
392bͨ allnoconfig, allmodconfig
40
412cʹ 0=builddir ɹع
42
433ͨʹñؽ빤߻һЩڶCPUϹ
44
454ppc64 һܺõļ齻ĿܣΪѡunsigned long
46 64λֵʹá
47
485Documentation/CodingStyleļϸ㲹
49 ʹòΥ(scripts/checkpatch.pl)Աύ
50 Ӧõ㲹еΥ档
51
526κθ»߸ĶCONFIGѡܴò˵
53
547еKconfigѡ¶Ҫ˵֡
55
568ѾܽصKconfigϡǺͨõ--½
57
589мԡ
59
6010ʹ'make checkstack''make namespacecheck'飬Ȼ޸ҵ⡣
61 ע⣺ջ鲻ȷس⣬κεһڶջʹö512ֽ
62 Ҫ׼޸ġ
63
6411kernel-docȫںAPIsļҪ̬ĺǰҲν
65 ʹ'make htmldocs''make mandocs'kernel-docȻ޸κ
66 ֵ⡣
67
6812ѾͨCONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT,
69 CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES,
70 CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEPԣͬʱ
71 ʹܡ
72
7313Ѿʹû߲ʹ CONFIG_SMP CONFIG_PREEMPTִʱ䡣
74
7514ӰIO/DiskȵȣѾͨʹû߲ʹ CONFIG_LBDAF ԡ
76
7715еcodepathsѾʹlockdepùܡ
78
7916е/proc¼¶ҪļDocumentation/Ŀ¼¡
80
8117еں¶¼Documentation/kernel-parameters.txtļС
82
8318еģ¶MODULE_PARM_DESC()¼
84
8519еûռӿڸ¶¼Documentation/ABI/鿴Documentation/ABI/README
86 ԻøϢıûռӿڵIJӦñʼ͸linux-api@vger.kernel.org
87
8820DzǶͨ`make headers_check'
89
9021Ѿͨslabpage-allocationʧܼ顣鿴Documentation/fault-injection/
91
9222¼ԴѾͨ`gcc -W'ʹ"make EXTRA_CFLAGS=-W"롣ܶෳգ
93 ǶѰ©洦:"warning: comparison between signed and unsigned"
94
9523ϲ-mmٲԣȷǷ񻹺ͲеһԼVMVFS
96 ϵͳи仯
97
9824еڴ{e.g., barrier(), rmb(), wmb()}ҪԴеһעǶǸʲô
99 Լԭ
100
10125κƵIJӣҲҪDocumentation/ioctl/ioctl-number.txt
102
10326ĸĴʹκεںAPIskconfigйϵĹܣҪ
104 ʹصkconfigŹرգ and/or =mѡṩ[ͬһʱ䲻õĶã
105 ]
106
107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI,
108 CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ,
109 CONFIG_NET, CONFIG_INET=n (һʹ CONFIG_NET=y)
diff --git a/Documentation/zh_CN/SubmittingPatches b/Documentation/zh_CN/SubmittingPatches
index 9a1a6e1ed09..0f4385a62a4 100644
--- a/Documentation/zh_CN/SubmittingPatches
+++ b/Documentation/zh_CN/SubmittingPatches
@@ -100,7 +100,7 @@ http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
100 100
101将改动拆分,逻辑类似的放到同一个补丁文件里。 101将改动拆分,逻辑类似的放到同一个补丁文件里。
102 102
103例如,如果你的改动里同时有bug修正和性能优化,那么把这些改动分到两个或 103例如,如果你的改动里同时有bug修正和性能优化,那么把这些改动分到两个或
104者更多的补丁文件中。如果你的改动包含对API的修改,并且修改了驱动程序来适 104者更多的补丁文件中。如果你的改动包含对API的修改,并且修改了驱动程序来适
105应这些新的API,那么把这些修改分成两个补丁。 105应这些新的API,那么把这些修改分成两个补丁。
106 106
@@ -230,7 +230,7 @@ pref("mailnews.display.disable_format_flowed_support", true);
230些原因,修正错误,重新提交更新后的改动,是你自己的工作。 230些原因,修正错误,重新提交更新后的改动,是你自己的工作。
231 231
232Linus不给出任何评论就“丢弃”你的补丁是常见的事情。在系统中这样的事情很 232Linus不给出任何评论就“丢弃”你的补丁是常见的事情。在系统中这样的事情很
233平常。如果他没有接受你的补丁,也许是由于以下原 233平常。如果他没有接受你的补丁,也许是由于以下原
234* 你的补丁不能在最新版本的内核上干净的打上。 234* 你的补丁不能在最新版本的内核上干净的打上。
235* 你的补丁在 linux-kernel 邮件列表中没有得到充分的讨论。 235* 你的补丁在 linux-kernel 邮件列表中没有得到充分的讨论。
236* 风格问题(参照第2小节) 236* 风格问题(参照第2小节)
diff --git a/Documentation/zh_CN/email-clients.txt b/Documentation/zh_CN/email-clients.txt
new file mode 100644
index 00000000000..5d65e323d06
--- /dev/null
+++ b/Documentation/zh_CN/email-clients.txt
@@ -0,0 +1,210 @@
1锘?Chinese translated version of Documentation/email-clients.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
9Chinese maintainer: Harry Wei <harryxiyou@gmail.com>
10---------------------------------------------------------------------
11Documentation/email-clients.txt ???涓????缈昏??
12
13濡??????宠??璁烘????存?版???????????瀹癸??璇风?存?ヨ??绯诲?????妗g??缁存?よ?????濡????浣?浣跨?ㄨ?辨??
14浜ゆ???????伴?剧??璇?锛?涔????浠ュ??涓???????缁存?よ??姹???┿??濡???????缈昏????存?颁???????舵?????缈?
15璇?瀛???ㄩ??棰?锛?璇疯??绯讳腑??????缁存?よ?????
16
17涓???????缁存?よ??锛? 璐惧??濞? Harry Wei <harryxiyou@gmail.com>
18涓???????缈昏?????锛? 璐惧??濞? Harry Wei <harryxiyou@gmail.com>
19涓?????????¤?????锛? Yinglin Luan <synmyth@gmail.com>
20 Xiaochen Wang <wangxiaochen0@gmail.com>
21 yaxinsn <yaxinsn@163.com>
22
23浠ヤ??涓烘?f??
24---------------------------------------------------------------------
25
26Linux???浠跺?㈡?风?????缃?淇℃??
27======================================================================
28
29?????????缃?
30----------------------------------------------------------------------
31Linux?????歌ˉ涓???????杩????浠惰?????浜ょ??锛????濂芥??琛ヤ??浣?涓洪??浠朵????????宓?????????????浜?缁存?よ??
32??ユ?堕??浠讹??浣???????浠剁?????瀹规?煎??搴?璇ユ??"text/plain"?????惰??锛????浠朵????????涓?璧???????锛?
33???涓鸿??浼?浣胯ˉ涓????寮???ㄩ?ㄥ????ㄨ??璁鸿??绋?涓???????寰???伴?俱??
34
35??ㄦ?ュ?????Linux?????歌ˉ涓???????浠跺?㈡?风????ㄥ?????琛ヤ????跺??璇ュ??浜?????????????濮???舵?????渚?濡?锛?
36浠?浠?涓???芥?瑰?????????????ゅ?惰〃绗???????绌烘?硷???????虫????ㄦ??涓?琛????寮?澶存?????缁?灏俱??
37
38涓?瑕????杩?"format=flowed"妯″????????琛ヤ?????杩???蜂??寮?璧蜂?????棰????浠ュ?????瀹崇?????琛????
39
40涓?瑕?璁╀????????浠跺?㈡?风??杩?琛??????ㄦ?㈣?????杩???蜂??浼???村??浣????琛ヤ?????
41
42???浠跺?㈡?风??涓???芥?瑰???????????瀛?绗????缂??????瑰?????瑕??????????琛ヤ???????芥??ASCII??????UTF-8缂??????瑰??锛?
43濡????浣?浣跨??UTF-8缂??????瑰???????????浠讹????d??浣?灏?浼???垮??涓?浜??????藉????????瀛?绗???????棰????
44
45???浠跺?㈡?风??搴?璇ュ舰???骞朵??淇???? References: ?????? In-Reply-To: ???棰?锛???d??
46???浠惰??棰?灏变??浼?涓???????
47
48澶???剁??甯?(?????????璐寸??甯?)???甯镐????界?ㄤ??琛ヤ??锛????涓哄?惰〃绗?浼?杞????涓虹┖??笺??浣跨??xclipboard, xclip
49??????xcutsel涔?璁稿??浠ワ??浣???????濂芥??璇?涓?涓?????????垮??浣跨?ㄥ????剁??甯????
50
51涓?瑕???ㄤ娇???PGP/GPG缃插????????浠朵腑??????琛ヤ?????杩???蜂??浣垮??寰?澶???????涓???借?诲??????????ㄤ??浣????琛ヤ?????
52锛?杩?涓????棰?搴?璇ユ?????浠ヤ慨澶????锛?
53
54??ㄧ???????搁??浠跺??琛ㄥ?????琛ヤ??涔????锛?缁????宸卞?????涓?涓?琛ヤ?????涓?涓???????涓绘??锛?淇?瀛???ユ?跺?扮??
55???浠讹??灏?琛ヤ?????'patch'??戒护???涓?锛?濡??????????浜?锛????缁??????搁??浠跺??琛ㄥ????????
56
57
58涓?浜????浠跺?㈡?风?????绀?
59----------------------------------------------------------------------
60杩????缁???轰??浜?璇?缁????MUA???缃????绀猴?????浠ョ?ㄤ??缁?Linux?????稿?????琛ヤ?????杩?浜?骞朵???????虫??
61?????????杞?浠跺?????缃???荤?????
62
63璇存??锛?
64TUI = 浠ユ?????涓哄?虹???????ㄦ?锋?ュ??
65GUI = ??惧舰?????㈢?ㄦ?锋?ュ??
66
67~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68Alpine (TUI)
69
70???缃????椤癸??
71???"Sending Preferences"??ㄥ??锛?
72
73- "Do Not Send Flowed Text"蹇?椤诲?????
74- "Strip Whitespace Before Sending"蹇?椤诲?抽??
75
76褰???????浠舵?讹????????搴?璇ユ?惧?ㄨˉ涓?浼???虹?扮????版?癸????跺?????涓?CTRL-R缁???????锛?浣挎??瀹????
77琛ヤ?????浠跺????ュ?伴??浠朵腑???
78
79~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80Evolution (GUI)
81
82涓?浜?寮????????????????浣跨?ㄥ????????琛ヤ??
83
84褰??????╅??浠堕??椤癸??Preformat
85 浠?Format->Heading->Preformatted (Ctrl-7)??????宸ュ?锋??
86
87??跺??浣跨??锛?
88 Insert->Text File... (Alt-n x)?????ヨˉ涓????浠躲??
89
90浣?杩????浠?"diff -Nru old.c new.c | xclip"锛???????Preformat锛???跺??浣跨?ㄤ腑??撮??杩?琛?绮?甯????
91
92~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93Kmail (GUI)
94
95涓?浜?寮????????????????浣跨?ㄥ????????琛ヤ?????
96
97榛?璁よ?剧疆涓?涓?HTML??煎??????????????锛?涓?瑕??????ㄥ?????
98
99褰?涔????涓?灏????浠剁????跺??锛???ㄩ??椤逛?????涓?瑕??????╄????ㄦ?㈣????????涓????缂虹?瑰氨???浣???ㄩ??浠朵腑杈???ョ??浠讳????????
100??戒??浼?琚??????ㄦ?㈣??锛????姝や??蹇?椤诲?ㄥ?????琛ヤ??涔?????????ㄦ?㈣????????绠?????????规??灏辨???????ㄨ????ㄦ?㈣????ヤ功??????浠讹??
101??跺?????瀹?淇?瀛?涓鸿??绋裤??涓????浣???ㄨ??绋夸腑???娆℃??寮?瀹?锛?瀹?宸茬????ㄩ?ㄨ????ㄦ?㈣??浜?锛???d??浣???????浠惰?界?舵病???
102?????╄????ㄦ?㈣??锛?浣????杩?涓?浼?澶卞?诲凡???????????ㄦ?㈣?????
103
104??ㄩ??浠剁??搴????锛??????ヨˉ涓?涔????锛???句??甯哥?ㄧ??琛ヤ??瀹????绗?锛?涓?涓?杩?瀛????(---)???
105
106??跺?????"Message"????????$??锛??????╂????ユ??浠讹????ョ????????浣????琛ヤ?????浠躲??杩????涓?涓?棰?澶???????椤癸??浣????浠?
107???杩?瀹????缃?浣???????浠跺缓绔?宸ュ?锋????????锛?杩????浠ュ甫涓?"insert file"??炬?????
108
109浣????浠ュ????ㄥ?伴??杩?GPG???璁伴??浠讹??浣???????宓?琛ヤ?????濂戒??瑕?浣跨??GPG???璁板??浠????浣?涓哄??宓??????????绛惧??琛ヤ??锛?
110褰?浠?GPG涓???????7浣?缂??????朵??浣夸??浠?????????村??澶???????
111
112濡????浣????瑕?浠ラ??浠剁??褰㈠????????琛ヤ??锛???d??灏卞?抽????瑰?婚??浠讹????跺?????涓?灞???э??绐????"Suggest automatic
113display"锛?杩???峰??宓????浠舵?村?规??璁╄?昏???????般??
114
115褰?浣?瑕?淇?瀛?灏?瑕?????????????宓???????琛ヤ??锛?浣????浠ヤ??娑???????琛ㄧ????奸????╁?????琛ヤ????????浠讹????跺????冲?婚?????
116"save as"???浣????浠ヤ娇??ㄤ??涓?娌℃????存?圭????????琛ヤ????????浠讹??濡????瀹????浠ユ?g‘???褰㈠??缁???????褰?浣?姝g????ㄥ??
117???宸辩??绐???d??涓?瀵????锛???f?舵病??????椤瑰??浠ヤ??瀛????浠?--宸茬?????涓?涓?杩???风??bug琚?姹???ュ?颁??kmail???bugzilla
118骞朵??甯????杩?灏?浼?琚?澶??????????浠舵??浠ュ?????瀵规??涓???ㄦ?峰??璇诲???????????琚?淇?瀛????锛????浠ュ?????浣???虫?????浠跺????跺?板?朵????版?癸??
119浣?涓?寰?涓????浠?浠????????????逛负缁?????????翠?????璇汇??
120
121~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122Lotus Notes (GUI)
123
124涓?瑕?浣跨?ㄥ?????
125
126~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127Mutt (TUI)
128
129寰?澶?Linux寮????浜哄??浣跨??mutt瀹㈡?风??锛????浠ヨ?????瀹????瀹?宸ヤ????????甯告??浜????
130
131Mutt涓????甯?缂?杈????锛????浠ヤ??绠′??浣跨?ㄤ??涔?缂?杈???ㄩ?戒??搴?璇ュ甫????????ㄦ??琛????澶у????扮??杈???ㄩ?藉甫???
132涓?涓?"insert file"???椤癸??瀹????浠ラ??杩?涓???瑰?????浠跺??瀹圭????瑰???????ユ??浠躲??
133
134'vim'浣?涓?mutt???缂?杈????锛?
135 set editor="vi"
136
137 濡????浣跨??xclip锛???插?ヤ互涓???戒护
138 :set paste
139 ???涓????涔??????????shift-insert??????浣跨??
140 :r filename
141
142濡??????宠?????琛ヤ??浣?涓哄??宓??????????
143(a)ttach宸ヤ?????寰?濂斤??涓?甯????"set paste"???
144
145???缃????椤癸??
146瀹?搴?璇ヤ互榛?璁よ?剧疆???褰㈠??宸ヤ?????
147??惰??锛????"send_charset"璁剧疆涓?"us-ascii::utf-8"涔????涓?涓?涓???????涓绘?????
148
149~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150Pine (TUI)
151
152Pine杩???绘??涓?浜?绌烘?煎????????棰?锛?浣????杩?浜???板?ㄥ??璇ラ?借??淇?澶?浜????
153
154濡???????浠ワ??璇蜂娇???alpine(pine???缁ф?胯??)
155
156???缃????椤癸??
157- ???杩?????????????瑕?娑???ゆ??绋???????
158- "no-strip-whitespace-before-send"???椤逛????????瑕???????
159
160
161~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162Sylpheed (GUI)
163
164- ???宓??????????浠ュ??濂界??宸ヤ??锛???????浣跨?ㄩ??浠讹?????
165- ???璁镐娇??ㄥ????ㄧ??缂?杈???ㄣ??
166- 瀵逛?????褰?杈?澶???堕??甯告?????
167- 濡???????杩?non-SSL杩???ワ?????娉?浣跨??TLS SMTP?????????
168- ??ㄧ?????绐???d腑???涓?涓?寰??????ㄧ??ruler bar???
169- 缁???板?????涓?娣诲????板??灏变??浼?姝g‘???浜?瑙f?剧ず??????
170
171~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172Thunderbird (GUI)
173
174榛?璁ゆ????典??锛?thunderbird寰?瀹规??????????????锛?浣????杩????涓?浜???规?????浠ュ己??跺?????寰???村ソ???
175
176- ??ㄧ?ㄦ?峰????疯?剧疆???锛?缁???????瀵诲??锛?涓?瑕???????"Compose messages in HTML format"???
177
178- 缂?杈?浣????Thunderbird???缃?璁剧疆??ヤ娇瀹?涓?瑕????琛?浣跨??锛?user_pref("mailnews.wraplength", 0);
179
180- 缂?杈?浣????Thunderbird???缃?璁剧疆锛?浣垮??涓?瑕?浣跨??"format=flowed"??煎??锛?user_pref("mailnews.
181 send_plaintext_flowed", false);
182
183- 浣????瑕?浣?Thunderbird???涓洪???????煎????瑰??锛?
184 濡????榛?璁ゆ????典??浣?涔??????????HTML??煎??锛???d?????寰???俱??浠?浠?浠????棰???????涓????妗?涓???????"Preformat"??煎?????
185 濡????榛?璁ゆ????典??浣?涔??????????????????煎??锛?浣?涓?寰????瀹???逛负HTML??煎??锛?浠?浠?浣?涓轰??娆℃?х??锛???ヤ功?????扮??娑????锛?
186 ??跺??寮哄?朵娇瀹??????版???????煎??锛???????瀹?灏变?????琛????瑕?瀹???板??锛???ㄥ??淇$????炬??涓?浣跨??shift?????ヤ娇瀹????涓?HTML
187 ??煎??锛???跺?????棰???????涓????妗?涓???????"Preformat"??煎?????
188
189- ???璁镐娇??ㄥ????ㄧ??缂?杈????锛?
190 ???瀵?Thunderbird???琛ヤ?????绠?????????规??灏辨??浣跨?ㄤ??涓?"external editor"??╁??锛???跺??浣跨?ㄤ????????娆㈢??
191 $EDITOR??ヨ?诲???????????骞惰ˉ涓???版?????涓????瑕?瀹???板??锛????浠ヤ??杞藉苟涓?瀹?瑁?杩?涓???╁??锛???跺??娣诲??涓?涓?浣跨?ㄥ?????
192 ??????View->Toolbars->Customize...??????褰?浣?涔????淇℃???????跺??浠?浠???瑰?诲??灏卞??浠ヤ?????
193
194~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195TkRat (GUI)
196
197???浠ヤ娇??ㄥ?????浣跨??"Insert file..."??????澶???ㄧ??缂?杈???ㄣ??
198
199~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200Gmail (Web GUI)
201
202涓?瑕?浣跨?ㄥ????????琛ヤ?????
203
204Gmail缃?椤靛?㈡?风???????ㄥ?版????惰〃绗?杞????涓虹┖??笺??
205
206??界?跺?惰〃绗?杞????涓虹┖??奸??棰????浠ヨ??澶???ㄧ??杈???ㄨВ??筹???????跺??杩?浼?浣跨?ㄥ??杞???㈣?????姣?琛???????涓?78涓?瀛?绗????
207
208???涓?涓????棰????Gmail杩?浼????浠讳??涓????ASCII???瀛?绗????淇℃????逛负base64缂???????瀹????涓?瑗垮????????娆ф床浜虹?????瀛????
209
210 ###
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
new file mode 100644
index 00000000000..4c4ce853577
--- /dev/null
+++ b/Documentation/zh_CN/magic-number.txt
@@ -0,0 +1,167 @@
1Chinese translated version of Documentation/magic-number.txt
2
3If you have any comment or update to the content, please post to LKML directly.
4However, if you have problem communicating in English you can also ask the
5Chinese maintainer for help. Contact the Chinese maintainer, if this
6translation is outdated or there is problem with translation.
7
8Chinese maintainer: Jia Wei Wei <harryxiyou@gmail.com>
9---------------------------------------------------------------------
10Documentation/magic-number.txt的中文翻译
11
12如果想评论或更新本文的内容,请直接发信到LKML。如果你使用英文交流有困难的话,也可
13以向中文版维护者求助。如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。
14
15中文版维护者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
16中文版翻译者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
17中文版校译者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
18
19以下为正文
20---------------------------------------------------------------------
21这个文件是有关当前使用的魔术值注册表。当你给一个结构添加了一个魔术值,你也应该把这个魔术值添加到这个文件,因为我们最好把用于各种结构的魔术值统一起来。
22
23使用魔术值来保护内核数据结构是一个非常好的主意。这就允许你在运行期检查(a)一个结构是否已经被攻击,或者(b)你已经给一个例行程序通过了一个错误的结构。后一种情况特别地有用---特别是当你通过一个空指针指向结构体的时候。tty源码,例如,经常通过特定驱动使用这种方法并且反复地排列特定方面的结构。
24
25使用魔术值的方法是在结构的开始处声明的,如下:
26
27struct tty_ldisc {
28 int magic;
29 ...
30};
31
32当你以后给内核添加增强功能的时候,请遵守这条规则!这样就会节省数不清的调试时间,特别是一些古怪的情况,例如,数组超出范围并且重新写了超出部分。遵守这个规则,‪这些情况可以被快速地,安全地避免。
33
34 Theodore Ts'o
35 31 Mar 94
36
37给当前的Linux 2.1.55添加魔术表。
38
39 Michael Chastain
40 <mailto:mec@shout.net>
41 22 Sep 1997
42
43现在应该最新的Linux 2.1.112.因为在特性冻结期间,不能在2.2.x前改变任何东西。这些条目被数域所排序。
44
45 Krzysztof G.Baranowski
46 <mailto: kgb@knm.org.pl>
47 29 Jul 1998
48
49更新魔术表到Linux 2.5.45。刚好越过特性冻结,但是有可能还会有一些新的魔术值在2.6.x之前融入到内核中。
50
51 Petr Baudis
52 <pasky@ucw.cz>
53 03 Nov 2002
54
55更新魔术表到Linux 2.5.74。
56
57 Fabian Frederick
58 <ffrederick@users.sourceforge.net>
59 09 Jul 2003
60
61魔术名 地址 结构 所在文件
62===========================================================================
63PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h
64CMAGIC 0x0111 user include/linux/a.out.h
65MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h
66RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h
67SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h
68HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c
69APM_BIOS_MAGIC 0x4101 apm_user arch/i386/kernel/apm.c
70CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h
71DB_MAGIC 0x4442 fc_info drivers/net/iph5526_novram.c
72DL_MAGIC 0x444d fc_info drivers/net/iph5526_novram.c
73FASYNC_MAGIC 0x4601 fasync_struct include/linux/fs.h
74FF_MAGIC 0x4646 fc_info drivers/net/iph5526_novram.c
75ISICOM_MAGIC 0x4d54 isi_port include/linux/isicom.h
76PTY_MAGIC 0x5001 drivers/char/pty.c
77PPP_MAGIC 0x5002 ppp include/linux/if_pppvar.h
78SERIAL_MAGIC 0x5301 async_struct include/linux/serial.h
79SSTATE_MAGIC 0x5302 serial_state include/linux/serial.h
80SLIP_MAGIC 0x5302 slip drivers/net/slip.h
81STRIP_MAGIC 0x5303 strip drivers/net/strip.c
82X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h
83SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h
84AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h
85ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h
86TTY_MAGIC 0x5401 tty_struct include/linux/tty.h
87MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c
88TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c
90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h
91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h
92FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c
93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c
94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
96CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
97A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
98RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
99LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
100GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
101RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c
102RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c
103SX_MAGIC 0x12345678 gs_port drivers/char/sx.h
104NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h
105RED_MAGIC2 0x170fc2a5 (any) mm/slab.c
106BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c
107ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data
108 drivers/isdn/isdn_x25iface.h
109ECP_MAGIC 0x21504345 cdkecpsig include/linux/cdk.h
110LSOMAGIC 0x27091997 lso drivers/fc4/fc.c
111LSMAGIC 0x2a3b4d2a ls drivers/fc4/fc.c
112WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} include/linux/wanpipe.h
113CS_CARD_MAGIC 0x43525553 cs_card sound/oss/cs46xx.c
114LABELCL_MAGIC 0x4857434c labelcl_info_s include/asm/ia64/sn/labelcl.h
115ISDN_ASYNC_MAGIC 0x49344C01 modem_info include/linux/isdn.h
116CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c
117ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h
118SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c
119STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h
120CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c
121SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h
126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
129RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
130STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h
131EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c
132HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h
133EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h
134PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h
135KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h
136I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c
137TRIDENT_STATE_MAGIC 0x63657373 trient_state sound/oss/trident.c
138M3_CARD_MAGIC 0x646e6f50 m3_card sound/oss/maestro3.c
139FW_HEADER_MAGIC 0x65726F66 fw_header drivers/atm/fore200e.h
140SLOT_MAGIC 0x67267321 slot drivers/hotplug/cpqphp.h
141SLOT_MAGIC 0x67267322 slot drivers/hotplug/acpiphp.h
142LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h
143OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h
144M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c
145STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h
146VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c
147KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
148PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
149NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
150STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
151ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
152SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
153CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h
154DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
155STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
156YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
157CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c
158QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c
159QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry drivers/scsi/arm/queue.c
160HTB_CMAGIC 0xFEFAFEF1 htb_class net/sched/sch_htb.c
161NMI_MAGIC 0x48414d4d455201 nmi_s arch/mips/include/asm/sn/nmi.h
162
163请注意,在声音记忆管理中仍然有每一些被定义的驱动魔术值。查看include/sound/sndmagic.h来获取他们完整的列表信息。很多OSS声音驱动拥有自己从声卡PCI ID构建的魔术值-他们也没有被列在这里。
164
165IrDA子系统也使用了大量的自己的魔术值,查看include/net/irda/irda.h来获取他们完整的信息。
166
167HFS是另外一个比较大的使用魔术值的文件系统-你可以在fs/hfs/hfs.h中找到他们。