aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-block-rssd12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-fcoe77
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd4
-rw-r--r--Documentation/ABI/testing/sysfs-class-backlight-driver-lm353348
-rw-r--r--Documentation/ABI/testing/sysfs-class-led-driver-lm353365
-rw-r--r--Documentation/CodingStyle16
-rw-r--r--Documentation/cgroups/memory.txt37
-rw-r--r--Documentation/cgroups/resource_counter.txt8
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt38
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt42
-rw-r--r--Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt14
-rw-r--r--Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt15
-rw-r--r--Documentation/devicetree/bindings/rtc/spear-rtc.txt17
-rw-r--r--Documentation/feature-removal-schedule.txt6
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/proc.txt25
-rw-r--r--Documentation/filesystems/vfs.txt13
-rw-r--r--Documentation/i2c/functionality9
-rw-r--r--Documentation/i2c/i2c-protocol9
-rw-r--r--Documentation/kernel-parameters.txt6
-rw-r--r--Documentation/leds/ledtrig-transient.txt152
-rw-r--r--Documentation/power/charger-manager.txt41
-rw-r--r--Documentation/power/power_supply_class.txt2
-rw-r--r--Documentation/sysctl/fs.txt7
-rw-r--r--Documentation/vm/pagemap.txt2
-rw-r--r--Documentation/vm/transhuge.txt62
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt43
-rw-r--r--Documentation/watchdog/watchdog-parameters.txt5
28 files changed, 735 insertions, 42 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-rssd b/Documentation/ABI/testing/sysfs-block-rssd
index d535757799fe..679ce3543122 100644
--- a/Documentation/ABI/testing/sysfs-block-rssd
+++ b/Documentation/ABI/testing/sysfs-block-rssd
@@ -6,13 +6,21 @@ Description: This is a read-only file. Dumps below driver information and
6 hardware registers. 6 hardware registers.
7 - S ACTive 7 - S ACTive
8 - Command Issue 8 - Command Issue
9 - Allocated
10 - Completed 9 - Completed
11 - PORT IRQ STAT 10 - PORT IRQ STAT
12 - HOST IRQ STAT 11 - HOST IRQ STAT
12 - Allocated
13 - Commands in Q
13 14
14What: /sys/block/rssd*/status 15What: /sys/block/rssd*/status
15Date: April 2012 16Date: April 2012
16KernelVersion: 3.4 17KernelVersion: 3.4
17Contact: Asai Thambi S P <asamymuthupa@micron.com> 18Contact: Asai Thambi S P <asamymuthupa@micron.com>
18Description: This is a read-only file. Indicates the status of the device. 19Description: This is a read-only file. Indicates the status of the device.
20
21What: /sys/block/rssd*/flags
22Date: May 2012
23KernelVersion: 3.5
24Contact: Asai Thambi S P <asamymuthupa@micron.com>
25Description: This is a read-only file. Dumps the flags in port and driver
26 data structure
diff --git a/Documentation/ABI/testing/sysfs-bus-fcoe b/Documentation/ABI/testing/sysfs-bus-fcoe
new file mode 100644
index 000000000000..469d09c02f6b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-fcoe
@@ -0,0 +1,77 @@
1What: /sys/bus/fcoe/ctlr_X
2Date: March 2012
3KernelVersion: TBD
4Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
5Description: 'FCoE Controller' instances on the fcoe bus
6Attributes:
7
8 fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing
9 this value will change the dev_loss_tmo for all
10 FCFs discovered by this controller.
11
12 lesb_link_fail: Link Error Status Block (LESB) link failure count.
13
14 lesb_vlink_fail: Link Error Status Block (LESB) virtual link
15 failure count.
16
17 lesb_miss_fka: Link Error Status Block (LESB) missed FCoE
18 Initialization Protocol (FIP) Keep-Alives (FKA).
19
20 lesb_symb_err: Link Error Status Block (LESB) symbolic error count.
21
22 lesb_err_block: Link Error Status Block (LESB) block error count.
23
24 lesb_fcs_error: Link Error Status Block (LESB) Fibre Channel
25 Serivces error count.
26
27Notes: ctlr_X (global increment starting at 0)
28
29What: /sys/bus/fcoe/fcf_X
30Date: March 2012
31KernelVersion: TBD
32Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
33Description: 'FCoE FCF' instances on the fcoe bus. A FCF is a Fibre Channel
34 Forwarder, which is a FCoE switch that can accept FCoE
35 (Ethernet) packets, unpack them, and forward the embedded
36 Fibre Channel frames into a FC fabric. It can also take
37 outbound FC frames and pack them in Ethernet packets to
38 be sent to their destination on the Ethernet segment.
39Attributes:
40
41 fabric_name: Identifies the fabric that the FCF services.
42
43 switch_name: Identifies the FCF.
44
45 priority: The switch's priority amongst other FCFs on the same
46 fabric.
47
48 selected: 1 indicates that the switch has been selected for use;
49 0 indicates that the swich will not be used.
50
51 fc_map: The Fibre Channel MAP
52
53 vfid: The Virtual Fabric ID
54
55 mac: The FCF's MAC address
56
57 fka_peroid: The FIP Keep-Alive peroid
58
59 fabric_state: The internal kernel state
60 "Unknown" - Initialization value
61 "Disconnected" - No link to the FCF/fabric
62 "Connected" - Host is connected to the FCF
63 "Deleted" - FCF is being removed from the system
64
65 dev_loss_tmo: The device loss timeout peroid for this FCF.
66
67Notes: A device loss infrastructre similar to the FC Transport's
68 is present in fcoe_sysfs. It is nice to have so that a
69 link flapping adapter doesn't continually advance the count
70 used to identify the discovered FCF. FCFs will exist in a
71 "Disconnected" state until either the timer expires and the
72 FCF becomes "Deleted" or the FCF is rediscovered and becomes
73 "Connected."
74
75
76Users: The first user of this interface will be the fcoeadm application,
77 which is commonly packaged in the fcoe-utils package.
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index dbedafb095e2..bcd88eb7ebcd 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -65,11 +65,11 @@ snap_*
65Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> 65Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
66------------------------------------------------------------- 66-------------------------------------------------------------
67 67
68id 68snap_id
69 69
70 The rados internal snapshot id assigned for this snapshot 70 The rados internal snapshot id assigned for this snapshot
71 71
72size 72snap_size
73 73
74 The size of the image when this snapshot was taken. 74 The size of the image when this snapshot was taken.
75 75
diff --git a/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
new file mode 100644
index 000000000000..77cf7ac949af
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
@@ -0,0 +1,48 @@
1What: /sys/class/backlight/<backlight>/als_channel
2Date: May 2012
3KernelVersion: 3.5
4Contact: Johan Hovold <jhovold@gmail.com>
5Description:
6 Get the ALS output channel used as input in
7 ALS-current-control mode (0, 1), where
8
9 0 - out_current0 (backlight 0)
10 1 - out_current1 (backlight 1)
11
12What: /sys/class/backlight/<backlight>/als_en
13Date: May 2012
14KernelVersion: 3.5
15Contact: Johan Hovold <jhovold@gmail.com>
16Description:
17 Enable ALS-current-control mode (0, 1).
18
19What: /sys/class/backlight/<backlight>/id
20Date: April 2012
21KernelVersion: 3.5
22Contact: Johan Hovold <jhovold@gmail.com>
23Description:
24 Get the id of this backlight (0, 1).
25
26What: /sys/class/backlight/<backlight>/linear
27Date: April 2012
28KernelVersion: 3.5
29Contact: Johan Hovold <jhovold@gmail.com>
30Description:
31 Set the brightness-mapping mode (0, 1), where
32
33 0 - exponential mode
34 1 - linear mode
35
36What: /sys/class/backlight/<backlight>/pwm
37Date: April 2012
38KernelVersion: 3.5
39Contact: Johan Hovold <jhovold@gmail.com>
40Description:
41 Set the PWM-input control mask (5 bits), where
42
43 bit 5 - PWM-input enabled in Zone 4
44 bit 4 - PWM-input enabled in Zone 3
45 bit 3 - PWM-input enabled in Zone 2
46 bit 2 - PWM-input enabled in Zone 1
47 bit 1 - PWM-input enabled in Zone 0
48 bit 0 - PWM-input enabled
diff --git a/Documentation/ABI/testing/sysfs-class-led-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533
new file mode 100644
index 000000000000..620ebb3b9baa
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533
@@ -0,0 +1,65 @@
1What: /sys/class/leds/<led>/als_channel
2Date: May 2012
3KernelVersion: 3.5
4Contact: Johan Hovold <jhovold@gmail.com>
5Description:
6 Set the ALS output channel to use as input in
7 ALS-current-control mode (1, 2), where
8
9 1 - out_current1
10 2 - out_current2
11
12What: /sys/class/leds/<led>/als_en
13Date: May 2012
14KernelVersion: 3.5
15Contact: Johan Hovold <jhovold@gmail.com>
16Description:
17 Enable ALS-current-control mode (0, 1).
18
19What: /sys/class/leds/<led>/falltime
20What: /sys/class/leds/<led>/risetime
21Date: April 2012
22KernelVersion: 3.5
23Contact: Johan Hovold <jhovold@gmail.com>
24Description:
25 Set the pattern generator fall and rise times (0..7), where
26
27 0 - 2048 us
28 1 - 262 ms
29 2 - 524 ms
30 3 - 1.049 s
31 4 - 2.097 s
32 5 - 4.194 s
33 6 - 8.389 s
34 7 - 16.78 s
35
36What: /sys/class/leds/<led>/id
37Date: April 2012
38KernelVersion: 3.5
39Contact: Johan Hovold <jhovold@gmail.com>
40Description:
41 Get the id of this led (0..3).
42
43What: /sys/class/leds/<led>/linear
44Date: April 2012
45KernelVersion: 3.5
46Contact: Johan Hovold <jhovold@gmail.com>
47Description:
48 Set the brightness-mapping mode (0, 1), where
49
50 0 - exponential mode
51 1 - linear mode
52
53What: /sys/class/leds/<led>/pwm
54Date: April 2012
55KernelVersion: 3.5
56Contact: Johan Hovold <jhovold@gmail.com>
57Description:
58 Set the PWM-input control mask (5 bits), where
59
60 bit 5 - PWM-input enabled in Zone 4
61 bit 4 - PWM-input enabled in Zone 3
62 bit 3 - PWM-input enabled in Zone 2
63 bit 2 - PWM-input enabled in Zone 1
64 bit 1 - PWM-input enabled in Zone 0
65 bit 0 - PWM-input enabled
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index c58b236bbe04..cb9258b8fd35 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -671,8 +671,9 @@ ones already enabled by DEBUG.
671 Chapter 14: Allocating memory 671 Chapter 14: Allocating memory
672 672
673The kernel provides the following general purpose memory allocators: 673The kernel provides the following general purpose memory allocators:
674kmalloc(), kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Please refer to 674kmalloc(), kzalloc(), kmalloc_array(), kcalloc(), vmalloc(), and
675the API documentation for further information about them. 675vzalloc(). Please refer to the API documentation for further information
676about them.
676 677
677The preferred form for passing a size of a struct is the following: 678The preferred form for passing a size of a struct is the following:
678 679
@@ -686,6 +687,17 @@ Casting the return value which is a void pointer is redundant. The conversion
686from void pointer to any other pointer type is guaranteed by the C programming 687from void pointer to any other pointer type is guaranteed by the C programming
687language. 688language.
688 689
690The preferred form for allocating an array is the following:
691
692 p = kmalloc_array(n, sizeof(...), ...);
693
694The preferred form for allocating a zeroed array is the following:
695
696 p = kcalloc(n, sizeof(...), ...);
697
698Both forms check for overflow on the allocation size n * sizeof(...),
699and return NULL if that occurred.
700
689 701
690 Chapter 15: The inline disease 702 Chapter 15: The inline disease
691 703
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 9b1067afb224..dd88540bb995 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared
184page will eventually get charged for it (once it is uncharged from 184page will eventually get charged for it (once it is uncharged from
185the cgroup that brought it in -- this will happen on memory pressure). 185the cgroup that brought it in -- this will happen on memory pressure).
186 186
187But see section 8.2: when moving a task to another cgroup, its pages may
188be recharged to the new cgroup, if move_charge_at_immigrate has been chosen.
189
187Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. 190Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used.
188When you do swapoff and make swapped-out pages of shmem(tmpfs) to 191When you do swapoff and make swapped-out pages of shmem(tmpfs) to
189be backed into memory in force, charges for pages are accounted against the 192be backed into memory in force, charges for pages are accounted against the
190caller of swapoff rather than the users of shmem. 193caller of swapoff rather than the users of shmem.
191 194
192
1932.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) 1952.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP)
194 196
195Swap Extension allows you to record charge for swap. A swapped-in page is 197Swap Extension allows you to record charge for swap. A swapped-in page is
@@ -374,14 +376,15 @@ cgroup might have some charge associated with it, even though all
374tasks have migrated away from it. (because we charge against pages, not 376tasks have migrated away from it. (because we charge against pages, not
375against tasks.) 377against tasks.)
376 378
377Such charges are freed or moved to their parent. At moving, both of RSS 379We move the stats to root (if use_hierarchy==0) or parent (if
378and CACHES are moved to parent. 380use_hierarchy==1), and no change on the charge except uncharging
379rmdir() may return -EBUSY if freeing/moving fails. See 5.1 also. 381from the child.
380 382
381Charges recorded in swap information is not updated at removal of cgroup. 383Charges recorded in swap information is not updated at removal of cgroup.
382Recorded information is discarded and a cgroup which uses swap (swapcache) 384Recorded information is discarded and a cgroup which uses swap (swapcache)
383will be charged as a new owner of it. 385will be charged as a new owner of it.
384 386
387About use_hierarchy, see Section 6.
385 388
3865. Misc. interfaces. 3895. Misc. interfaces.
387 390
@@ -394,13 +397,15 @@ will be charged as a new owner of it.
394 397
395 Almost all pages tracked by this memory cgroup will be unmapped and freed. 398 Almost all pages tracked by this memory cgroup will be unmapped and freed.
396 Some pages cannot be freed because they are locked or in-use. Such pages are 399 Some pages cannot be freed because they are locked or in-use. Such pages are
397 moved to parent and this cgroup will be empty. This may return -EBUSY if 400 moved to parent(if use_hierarchy==1) or root (if use_hierarchy==0) and this
398 VM is too busy to free/move all pages immediately. 401 cgroup will be empty.
399 402
400 Typical use case of this interface is that calling this before rmdir(). 403 Typical use case of this interface is that calling this before rmdir().
401 Because rmdir() moves all pages to parent, some out-of-use page caches can be 404 Because rmdir() moves all pages to parent, some out-of-use page caches can be
402 moved to the parent. If you want to avoid that, force_empty will be useful. 405 moved to the parent. If you want to avoid that, force_empty will be useful.
403 406
407 About use_hierarchy, see Section 6.
408
4045.2 stat file 4095.2 stat file
405 410
406memory.stat file includes following statistics 411memory.stat file includes following statistics
@@ -430,17 +435,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy
430hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to 435hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to
431 hierarchy under which memory cgroup is. 436 hierarchy under which memory cgroup is.
432 437
433total_cache - sum of all children's "cache" 438total_<counter> - # hierarchical version of <counter>, which in
434total_rss - sum of all children's "rss" 439 addition to the cgroup's own value includes the
435total_mapped_file - sum of all children's "cache" 440 sum of all hierarchical children's values of
436total_pgpgin - sum of all children's "pgpgin" 441 <counter>, i.e. total_cache
437total_pgpgout - sum of all children's "pgpgout"
438total_swap - sum of all children's "swap"
439total_inactive_anon - sum of all children's "inactive_anon"
440total_active_anon - sum of all children's "active_anon"
441total_inactive_file - sum of all children's "inactive_file"
442total_active_file - sum of all children's "active_file"
443total_unevictable - sum of all children's "unevictable"
444 442
445# The following additional stats are dependent on CONFIG_DEBUG_VM. 443# The following additional stats are dependent on CONFIG_DEBUG_VM.
446 444
@@ -622,8 +620,7 @@ memory cgroup.
622 bit | what type of charges would be moved ? 620 bit | what type of charges would be moved ?
623 -----+------------------------------------------------------------------------ 621 -----+------------------------------------------------------------------------
624 0 | A charge of an anonymous page(or swap of it) used by the target task. 622 0 | A charge of an anonymous page(or swap of it) used by the target task.
625 | Those pages and swaps must be used only by the target task. You must 623 | You must enable Swap Extension(see 2.4) to enable move of swap charges.
626 | enable Swap Extension(see 2.4) to enable move of swap charges.
627 -----+------------------------------------------------------------------------ 624 -----+------------------------------------------------------------------------
628 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) 625 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory)
629 | and swaps of tmpfs file) mmapped by the target task. Unlike the case of 626 | and swaps of tmpfs file) mmapped by the target task. Unlike the case of
@@ -636,8 +633,6 @@ memory cgroup.
636 633
6378.3 TODO 6348.3 TODO
638 635
639- Implement madvise(2) to let users decide the vma to be moved or not to be
640 moved.
641- All of moving charge operations are done under cgroup_mutex. It's not good 636- All of moving charge operations are done under cgroup_mutex. It's not good
642 behavior to hold the mutex too long, so we may need some trick. 637 behavior to hold the mutex too long, so we may need some trick.
643 638
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index f3c4ec3626a2..0c4a344e78fa 100644
--- a/Documentation/cgroups/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
@@ -92,6 +92,14 @@ to work with it.
92 92
93 The _locked routines imply that the res_counter->lock is taken. 93 The _locked routines imply that the res_counter->lock is taken.
94 94
95 f. void res_counter_uncharge_until
96 (struct res_counter *rc, struct res_counter *top,
97 unsinged long val)
98
99 Almost same as res_cunter_uncharge() but propagation of uncharge
100 stops when rc == top. This is useful when kill a res_coutner in
101 child cgroup.
102
95 2.1 Other accounting routines 103 2.1 Other accounting routines
96 104
97 There are more routines that may help you with common needs, like 105 There are more routines that may help you with common needs, like
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt
new file mode 100644
index 000000000000..f93d51478d5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt
@@ -0,0 +1,38 @@
1Lantiq SoC External Bus memory mapped GPIO controller
2
3By attaching hardware latches to the EBU it is possible to create output
4only gpios. This driver configures a special memory address, which when
5written to outputs 16 bit to the latches.
6
7The node describing the memory mapped GPIOs needs to be a child of the node
8describing the "lantiq,localbus".
9
10Required properties:
11- compatible : Should be "lantiq,gpio-mm-lantiq"
12- reg : Address and length of the register set for the device
13- #gpio-cells : Should be two. The first cell is the pin number and
14 the second cell is used to specify optional parameters (currently
15 unused).
16- gpio-controller : Marks the device node as a gpio controller.
17
18Optional properties:
19- lantiq,shadow : The default value that we shall assume as already set on the
20 shift register cascade.
21
22Example:
23
24localbus@0 {
25 #address-cells = <2>;
26 #size-cells = <1>;
27 ranges = <0 0 0x0 0x3ffffff /* addrsel0 */
28 1 0 0x4000000 0x4000010>; /* addsel1 */
29 compatible = "lantiq,localbus", "simple-bus";
30
31 gpio_mm0: gpio@4000000 {
32 compatible = "lantiq,gpio-mm";
33 reg = <1 0x0 0x10>;
34 gpio-controller;
35 #gpio-cells = <2>;
36 lantiq,shadow = <0x77f>
37 };
38}
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt
new file mode 100644
index 000000000000..854de130a971
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt
@@ -0,0 +1,42 @@
1Lantiq SoC Serial To Parallel (STP) GPIO controller
2
3The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
4peripheral controller used to drive external shift register cascades. At most
53 groups of 8 bits can be driven. The hardware is able to allow the DSL modem
6to drive the 2 LSBs of the cascade automatically.
7
8
9Required properties:
10- compatible : Should be "lantiq,gpio-stp-xway"
11- reg : Address and length of the register set for the device
12- #gpio-cells : Should be two. The first cell is the pin number and
13 the second cell is used to specify optional parameters (currently
14 unused).
15- gpio-controller : Marks the device node as a gpio controller.
16
17Optional properties:
18- lantiq,shadow : The default value that we shall assume as already set on the
19 shift register cascade.
20- lantiq,groups : Set the 3 bit mask to select which of the 3 groups are enabled
21 in the shift register cascade.
22- lantiq,dsl : The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit
23 property can enable this feature.
24- lantiq,phy1 : The gphy1 core can control 3 bits of the gpio cascade.
25- lantiq,phy2 : The gphy2 core can control 3 bits of the gpio cascade.
26- lantiq,rising : use rising instead of falling edge for the shift register
27
28Example:
29
30gpio1: stp@E100BB0 {
31 compatible = "lantiq,gpio-stp-xway";
32 reg = <0xE100BB0 0x40>;
33 #gpio-cells = <2>;
34 gpio-controller;
35
36 lantiq,shadow = <0xffff>;
37 lantiq,groups = <0x7>;
38 lantiq,dsl = <0x3>;
39 lantiq,phy1 = <0x7>;
40 lantiq,phy2 = <0x7>;
41 /* lantiq,rising; */
42};
diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
new file mode 100644
index 000000000000..099d9362ebc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
@@ -0,0 +1,14 @@
1NVIDIA Tegra 20 GART
2
3Required properties:
4- compatible: "nvidia,tegra20-gart"
5- reg: Two pairs of cells specifying the physical address and size of
6 the memory controller registers and the GART aperture respectively.
7
8Example:
9
10 gart {
11 compatible = "nvidia,tegra20-gart";
12 reg = <0x7000f024 0x00000018 /* controller registers */
13 0x58000000 0x02000000>; /* GART aperture */
14 };
diff --git a/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
new file mode 100644
index 000000000000..a87a1e9bc060
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
@@ -0,0 +1,15 @@
1* NXP LPC32xx SoC Real Time Clock controller
2
3Required properties:
4- compatible: must be "nxp,lpc3220-rtc"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: The RTC interrupt
8
9Example:
10
11 rtc@40024000 {
12 compatible = "nxp,lpc3220-rtc";
13 reg = <0x40024000 0x1000>;
14 interrupts = <52 0>;
15 };
diff --git a/Documentation/devicetree/bindings/rtc/spear-rtc.txt b/Documentation/devicetree/bindings/rtc/spear-rtc.txt
new file mode 100644
index 000000000000..ca67ac62108e
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/spear-rtc.txt
@@ -0,0 +1,17 @@
1* SPEAr RTC
2
3Required properties:
4- compatible : "st,spear600-rtc"
5- reg : Address range of the rtc registers
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupt: Should contain the rtc interrupt number
9
10Example:
11
12 rtc@fc000000 {
13 compatible = "st,spear600-rtc";
14 reg = <0xfc000000 0x1000>;
15 interrupt-parent = <&vic1>;
16 interrupts = <12>;
17 };
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index ebaffe208ccb..56000b33340b 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -606,3 +606,9 @@ Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support
606Who: Ludovic Desroches <ludovic.desroches@atmel.com> 606Who: Ludovic Desroches <ludovic.desroches@atmel.com>
607 607
608---------------------------- 608----------------------------
609
610What: net/wanrouter/
611When: June 2013
612Why: Unsupported/unmaintained/unused since 2.6
613
614----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index d5a269a51a9e..8e2da1e06e3b 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -60,7 +60,6 @@ ata *);
60 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 60 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
61 ssize_t (*listxattr) (struct dentry *, char *, size_t); 61 ssize_t (*listxattr) (struct dentry *, char *, size_t);
62 int (*removexattr) (struct dentry *, const char *); 62 int (*removexattr) (struct dentry *, const char *);
63 void (*truncate_range)(struct inode *, loff_t, loff_t);
64 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); 63 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
65 void (*update_time)(struct inode *, struct timespec *, int); 64 void (*update_time)(struct inode *, struct timespec *, int);
66 65
@@ -88,7 +87,6 @@ setxattr: yes
88getxattr: no 87getxattr: no
89listxattr: no 88listxattr: no
90removexattr: yes 89removexattr: yes
91truncate_range: yes
92fiemap: no 90fiemap: no
93update_time: no 91update_time: no
94 92
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index ef088e55ab2e..fb0a6aeb936c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -40,6 +40,7 @@ Table of Contents
40 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings 40 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
41 3.5 /proc/<pid>/mountinfo - Information about mounts 41 3.5 /proc/<pid>/mountinfo - Information about mounts
42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm 42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
43 3.7 /proc/<pid>/task/<tid>/children - Information about task children
43 44
44 4 Configuring procfs 45 4 Configuring procfs
45 4.1 Mount options 46 4.1 Mount options
@@ -310,6 +311,11 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
310 start_data address above which program data+bss is placed 311 start_data address above which program data+bss is placed
311 end_data address below which program data+bss is placed 312 end_data address below which program data+bss is placed
312 start_brk address above which program heap can be expanded with brk() 313 start_brk address above which program heap can be expanded with brk()
314 arg_start address above which program command line is placed
315 arg_end address below which program command line is placed
316 env_start address above which program environment is placed
317 env_end address below which program environment is placed
318 exit_code the thread's exit_code in the form reported by the waitpid system call
313.............................................................................. 319..............................................................................
314 320
315The /proc/PID/maps file containing the currently mapped memory regions and 321The /proc/PID/maps file containing the currently mapped memory regions and
@@ -743,6 +749,7 @@ Committed_AS: 100056 kB
743VmallocTotal: 112216 kB 749VmallocTotal: 112216 kB
744VmallocUsed: 428 kB 750VmallocUsed: 428 kB
745VmallocChunk: 111088 kB 751VmallocChunk: 111088 kB
752AnonHugePages: 49152 kB
746 753
747 MemTotal: Total usable ram (i.e. physical ram minus a few reserved 754 MemTotal: Total usable ram (i.e. physical ram minus a few reserved
748 bits and the kernel binary code) 755 bits and the kernel binary code)
@@ -776,6 +783,7 @@ VmallocChunk: 111088 kB
776 Dirty: Memory which is waiting to get written back to the disk 783 Dirty: Memory which is waiting to get written back to the disk
777 Writeback: Memory which is actively being written back to the disk 784 Writeback: Memory which is actively being written back to the disk
778 AnonPages: Non-file backed pages mapped into userspace page tables 785 AnonPages: Non-file backed pages mapped into userspace page tables
786AnonHugePages: Non-file backed huge pages mapped into userspace page tables
779 Mapped: files which have been mmaped, such as libraries 787 Mapped: files which have been mmaped, such as libraries
780 Slab: in-kernel data structures cache 788 Slab: in-kernel data structures cache
781SReclaimable: Part of Slab, that might be reclaimed, such as caches 789SReclaimable: Part of Slab, that might be reclaimed, such as caches
@@ -1576,6 +1584,23 @@ then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
1576comm value. 1584comm value.
1577 1585
1578 1586
15873.7 /proc/<pid>/task/<tid>/children - Information about task children
1588-------------------------------------------------------------------------
1589This file provides a fast way to retrieve first level children pids
1590of a task pointed by <pid>/<tid> pair. The format is a space separated
1591stream of pids.
1592
1593Note the "first level" here -- if a child has own children they will
1594not be listed here, one needs to read /proc/<children-pid>/task/<tid>/children
1595to obtain the descendants.
1596
1597Since this interface is intended to be fast and cheap it doesn't
1598guarantee to provide precise results and some children might be
1599skipped, especially if they've exited right after we printed their
1600pids, so one need to either stop or freeze processes being inspected
1601if precise results are needed.
1602
1603
1579------------------------------------------------------------------------------ 1604------------------------------------------------------------------------------
1580Configuring procfs 1605Configuring procfs
1581------------------------------------------------------------------------------ 1606------------------------------------------------------------------------------
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index b2aa722e5ea2..efd23f481704 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -363,7 +363,6 @@ struct inode_operations {
363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
364 ssize_t (*listxattr) (struct dentry *, char *, size_t); 364 ssize_t (*listxattr) (struct dentry *, char *, size_t);
365 int (*removexattr) (struct dentry *, const char *); 365 int (*removexattr) (struct dentry *, const char *);
366 void (*truncate_range)(struct inode *, loff_t, loff_t);
367 void (*update_time)(struct inode *, struct timespec *, int); 366 void (*update_time)(struct inode *, struct timespec *, int);
368}; 367};
369 368
@@ -473,9 +472,6 @@ otherwise noted.
473 removexattr: called by the VFS to remove an extended attribute from 472 removexattr: called by the VFS to remove an extended attribute from
474 a file. This method is called by removexattr(2) system call. 473 a file. This method is called by removexattr(2) system call.
475 474
476 truncate_range: a method provided by the underlying filesystem to truncate a
477 range of blocks , i.e. punch a hole somewhere in a file.
478
479 update_time: called by the VFS to update a specific time or the i_version of 475 update_time: called by the VFS to update a specific time or the i_version of
480 an inode. If this is not defined the VFS will update the inode itself 476 an inode. If this is not defined the VFS will update the inode itself
481 and call mark_inode_dirty_sync. 477 and call mark_inode_dirty_sync.
@@ -764,7 +760,7 @@ struct file_operations
764---------------------- 760----------------------
765 761
766This describes how the VFS can manipulate an open file. As of kernel 762This describes how the VFS can manipulate an open file. As of kernel
7672.6.22, the following members are defined: 7633.5, the following members are defined:
768 764
769struct file_operations { 765struct file_operations {
770 struct module *owner; 766 struct module *owner;
@@ -794,6 +790,8 @@ struct file_operations {
794 int (*flock) (struct file *, int, struct file_lock *); 790 int (*flock) (struct file *, int, struct file_lock *);
795 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
796 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 792 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
793 int (*setlease)(struct file *, long arg, struct file_lock **);
794 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
797}; 795};
798 796
799Again, all methods are called without any locks being held, unless 797Again, all methods are called without any locks being held, unless
@@ -862,6 +860,11 @@ otherwise noted.
862 splice_read: called by the VFS to splice data from file to a pipe. This 860 splice_read: called by the VFS to splice data from file to a pipe. This
863 method is used by the splice(2) system call 861 method is used by the splice(2) system call
864 862
863 setlease: called by the VFS to set or release a file lock lease.
864 setlease has the file_lock_lock held and must not sleep.
865
866 fallocate: called by the VFS to preallocate blocks or punch a hole.
867
865Note that the file operations are implemented by the specific 868Note that the file operations are implemented by the specific
866filesystem in which the inode resides. When opening a device node 869filesystem in which the inode resides. When opening a device node
867(character or block special) most filesystems will call special 870(character or block special) most filesystems will call special
diff --git a/Documentation/i2c/functionality b/Documentation/i2c/functionality
index 42c17c1fb3cd..b0ff2ab596ce 100644
--- a/Documentation/i2c/functionality
+++ b/Documentation/i2c/functionality
@@ -18,9 +18,9 @@ For the most up-to-date list of functionality constants, please check
18 adapters typically can not do these) 18 adapters typically can not do these)
19 I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions 19 I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions
20 I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK, 20 I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK,
21 I2C_M_REV_DIR_ADDR, I2C_M_NOSTART and 21 I2C_M_REV_DIR_ADDR and I2C_M_NO_RD_ACK
22 I2C_M_NO_RD_ACK flags (which modify the 22 flags (which modify the I2C protocol!)
23 I2C protocol!) 23 I2C_FUNC_NOSTART Can skip repeated start sequence
24 I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command 24 I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command
25 I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command 25 I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command
26 I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command 26 I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command
@@ -50,6 +50,9 @@ A few combinations of the above flags are also defined for your convenience:
50 emulated by a real I2C adapter (using 50 emulated by a real I2C adapter (using
51 the transparent emulation layer) 51 the transparent emulation layer)
52 52
53In kernel versions prior to 3.5 I2C_FUNC_NOSTART was implemented as
54part of I2C_FUNC_PROTOCOL_MANGLING.
55
53 56
54ADAPTER IMPLEMENTATION 57ADAPTER IMPLEMENTATION
55---------------------- 58----------------------
diff --git a/Documentation/i2c/i2c-protocol b/Documentation/i2c/i2c-protocol
index 10518dd58814..0b3e62d1f77a 100644
--- a/Documentation/i2c/i2c-protocol
+++ b/Documentation/i2c/i2c-protocol
@@ -49,7 +49,9 @@ a byte read, followed by a byte write:
49Modified transactions 49Modified transactions
50===================== 50=====================
51 51
52We have found some I2C devices that needs the following modifications: 52The following modifications to the I2C protocol can also be generated,
53with the exception of I2C_M_NOSTART these are usually only needed to
54work around device issues:
53 55
54 Flag I2C_M_NOSTART: 56 Flag I2C_M_NOSTART:
55 In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some 57 In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some
@@ -60,6 +62,11 @@ We have found some I2C devices that needs the following modifications:
60 we do not generate Addr, but we do generate the startbit S. This will 62 we do not generate Addr, but we do generate the startbit S. This will
61 probably confuse all other clients on your bus, so don't try this. 63 probably confuse all other clients on your bus, so don't try this.
62 64
65 This is often used to gather transmits from multiple data buffers in
66 system memory into something that appears as a single transfer to the
67 I2C device but may also be used between direction changes by some
68 rare devices.
69
63 Flags I2C_M_REV_DIR_ADDR 70 Flags I2C_M_REV_DIR_ADDR
64 This toggles the Rd/Wr flag. That is, if you want to do a write, but 71 This toggles the Rd/Wr flag. That is, if you want to do a write, but
65 need to emit an Rd instead of a Wr, or vice versa, you set this 72 need to emit an Rd instead of a Wr, or vice versa, you set this
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b40b413db88e..c45513d806ab 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -335,6 +335,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
335 requirements as needed. This option 335 requirements as needed. This option
336 does not override iommu=pt 336 does not override iommu=pt
337 337
338 amd_iommu_dump= [HW,X86-64]
339 Enable AMD IOMMU driver option to dump the ACPI table
340 for AMD IOMMU. With this option enabled, AMD IOMMU
341 driver will print ACPI tables for AMD IOMMU during
342 IOMMU initialization.
343
338 amijoy.map= [HW,JOY] Amiga joystick support 344 amijoy.map= [HW,JOY] Amiga joystick support
339 Map of devices attached to JOY0DAT and JOY1DAT 345 Map of devices attached to JOY0DAT and JOY1DAT
340 Format: <a>,<b> 346 Format: <a>,<b>
diff --git a/Documentation/leds/ledtrig-transient.txt b/Documentation/leds/ledtrig-transient.txt
new file mode 100644
index 000000000000..3bd38b487df1
--- /dev/null
+++ b/Documentation/leds/ledtrig-transient.txt
@@ -0,0 +1,152 @@
1LED Transient Trigger
2=====================
3
4The leds timer trigger does not currently have an interface to activate
5a one shot timer. The current support allows for setting two timers, one for
6specifying how long a state to be on, and the second for how long the state
7to be off. The delay_on value specifies the time period an LED should stay
8in on state, followed by a delay_off value that specifies how long the LED
9should stay in off state. The on and off cycle repeats until the trigger
10gets deactivated. There is no provision for one time activation to implement
11features that require an on or off state to be held just once and then stay in
12the original state forever.
13
14Without one shot timer interface, user space can still use timer trigger to
15set a timer to hold a state, however when user space application crashes or
16goes away without deactivating the timer, the hardware will be left in that
17state permanently.
18
19As a specific example of this use-case, let's look at vibrate feature on
20phones. Vibrate function on phones is implemented using PWM pins on SoC or
21PMIC. There is a need to activate one shot timer to control the vibrate
22feature, to prevent user space crashes leaving the phone in vibrate mode
23permanently causing the battery to drain.
24
25Transient trigger addresses the need for one shot timer activation. The
26transient trigger can be enabled and disabled just like the other leds
27triggers.
28
29When an led class device driver registers itself, it can specify all leds
30triggers it supports and a default trigger. During registration, activation
31routine for the default trigger gets called. During registration of an led
32class device, the LED state does not change.
33
34When the driver unregisters, deactivation routine for the currently active
35trigger will be called, and LED state is changed to LED_OFF.
36
37Driver suspend changes the LED state to LED_OFF and resume doesn't change
38the state. Please note that there is no explicit interaction between the
39suspend and resume actions and the currently enabled trigger. LED state
40changes are suspended while the driver is in suspend state. Any timers
41that are active at the time driver gets suspended, continue to run, without
42being able to actually change the LED state. Once driver is resumed, triggers
43start functioning again.
44
45LED state changes are controlled using brightness which is a common led
46class device property. When brightness is set to 0 from user space via
47echo 0 > brightness, it will result in deactivating the current trigger.
48
49Transient trigger uses standard register and unregister interfaces. During
50trigger registration, for each led class device that specifies this trigger
51as its default trigger, trigger activation routine will get called. During
52registration, the LED state does not change, unless there is another trigger
53active, in which case LED state changes to LED_OFF.
54
55During trigger unregistration, LED state gets changed to LED_OFF.
56
57Transient trigger activation routine doesn't change the LED state. It
58creates its properties and does its initialization. Transient trigger
59deactivation routine, will cancel any timer that is active before it cleans
60up and removes the properties it created. It will restore the LED state to
61non-transient state. When driver gets suspended, irrespective of the transient
62state, the LED state changes to LED_OFF.
63
64Transient trigger can be enabled and disabled from user space on led class
65devices, that support this trigger as shown below:
66
67echo transient > trigger
68echo none > trigger
69
70NOTE: Add a new property trigger state to control the state.
71
72This trigger exports three properties, activate, state, and duration. When
73transient trigger is activated these properties are set to default values.
74
75- duration allows setting timer value in msecs. The initial value is 0.
76- activate allows activating and deactivating the timer specified by
77 duration as needed. The initial and default value is 0. This will allow
78 duration to be set after trigger activation.
79- state allows user to specify a transient state to be held for the specified
80 duration.
81
82 activate - one shot timer activate mechanism.
83 1 when activated, 0 when deactivated.
84 default value is zero when transient trigger is enabled,
85 to allow duration to be set.
86
87 activate state indicates a timer with a value of specified
88 duration running.
89 deactivated state indicates that there is no active timer
90 running.
91
92 duration - one shot timer value. When activate is set, duration value
93 is used to start a timer that runs once. This value doesn't
94 get changed by the trigger unless user does a set via
95 echo new_value > duration
96
97 state - transient state to be held. It has two values 0 or 1. 0 maps
98 to LED_OFF and 1 maps to LED_FULL. The specified state is
99 held for the duration of the one shot timer and then the
100 state gets changed to the non-transient state which is the
101 inverse of transient state.
102 If state = LED_FULL, when the timer runs out the state will
103 go back to LED_OFF.
104 If state = LED_OFF, when the timer runs out the state will
105 go back to LED_FULL.
106 Please note that current LED state is not checked prior to
107 changing the state to the specified state.
108 Driver could map these values to inverted depending on the
109 default states it defines for the LED in its brightness_set()
110 interface which is called from the led brightness_set()
111 interfaces to control the LED state.
112
113When timer expires activate goes back to deactivated state, duration is left
114at the set value to be used when activate is set at a future time. This will
115allow user app to set the time once and activate it to run it once for the
116specified value as needed. When timer expires, state is restored to the
117non-transient state which is the inverse of the transient state.
118
119 echo 1 > activate - starts timer = duration when duration is not 0.
120 echo 0 > activate - cancels currently running timer.
121 echo n > duration - stores timer value to be used upon next
122 activate. Currently active timer if
123 any, continues to run for the specified time.
124 echo 0 > duration - stores timer value to be used upon next
125 activate. Currently active timer if any,
126 continues to run for the specified time.
127 echo 1 > state - stores desired transient state LED_FULL to be
128 held for the specified duration.
129 echo 0 > state - stores desired transient state LED_OFF to be
130 held for the specified duration.
131
132What is not supported:
133======================
134- Timer activation is one shot and extending and/or shortening the timer
135 is not supported.
136
137Example use-case 1:
138 echo transient > trigger
139 echo n > duration
140 echo 1 > state
141repeat the following step as needed:
142 echo 1 > activate - start timer = duration to run once
143 echo 1 > activate - start timer = duration to run once
144 echo none > trigger
145
146This trigger is intended to be used for for the following example use cases:
147 - Control of vibrate (phones, tablets etc.) hardware by user space app.
148 - Use of LED by user space app as activity indicator.
149 - Use of LED by user space app as a kind of watchdog indicator -- as
150 long as the app is alive, it can keep the LED illuminated, if it dies
151 the LED will be extinguished automatically.
152 - Use by any user space app that needs a transient GPIO output.
diff --git a/Documentation/power/charger-manager.txt b/Documentation/power/charger-manager.txt
index fdcca991df30..b4f7f4b23f64 100644
--- a/Documentation/power/charger-manager.txt
+++ b/Documentation/power/charger-manager.txt
@@ -44,6 +44,16 @@ Charger Manager supports the following:
44 Normally, the platform will need to resume and suspend some devices 44 Normally, the platform will need to resume and suspend some devices
45 that are used by Charger Manager. 45 that are used by Charger Manager.
46 46
47* Support for premature full-battery event handling
48 If the battery voltage drops by "fullbatt_vchkdrop_uV" after
49 "fullbatt_vchkdrop_ms" from the full-battery event, the framework
50 restarts charging. This check is also performed while suspended by
51 setting wakeup time accordingly and using suspend_again.
52
53* Support for uevent-notify
54 With the charger-related events, the device sends
55 notification to users with UEVENT.
56
472. Global Charger-Manager Data related with suspend_again 572. Global Charger-Manager Data related with suspend_again
48======================================================== 58========================================================
49In order to setup Charger Manager with suspend-again feature 59In order to setup Charger Manager with suspend-again feature
@@ -55,7 +65,7 @@ if there are multiple batteries. If there are multiple batteries, the
55multiple instances of Charger Manager share the same charger_global_desc 65multiple instances of Charger Manager share the same charger_global_desc
56and it will manage in-suspend monitoring for all instances of Charger Manager. 66and it will manage in-suspend monitoring for all instances of Charger Manager.
57 67
58The user needs to provide all the two entries properly in order to activate 68The user needs to provide all the three entries properly in order to activate
59in-suspend monitoring: 69in-suspend monitoring:
60 70
61struct charger_global_desc { 71struct charger_global_desc {
@@ -74,6 +84,11 @@ bool (*rtc_only_wakeup)(void);
74 same struct. If there is any other wakeup source triggered the 84 same struct. If there is any other wakeup source triggered the
75 wakeup, it should return false. If the "rtc" is the only wakeup 85 wakeup, it should return false. If the "rtc" is the only wakeup
76 reason, it should return true. 86 reason, it should return true.
87
88bool assume_timer_stops_in_suspend;
89 : if true, Charger Manager assumes that
90 the timer (CM uses jiffies as timer) stops during suspend. Then, CM
91 assumes that the suspend-duration is same as the alarm length.
77}; 92};
78 93
793. How to setup suspend_again 943. How to setup suspend_again
@@ -111,6 +126,16 @@ enum polling_modes polling_mode;
111 CM_POLL_CHARGING_ONLY: poll this battery if and only if the 126 CM_POLL_CHARGING_ONLY: poll this battery if and only if the
112 battery is being charged. 127 battery is being charged.
113 128
129unsigned int fullbatt_vchkdrop_ms;
130unsigned int fullbatt_vchkdrop_uV;
131 : If both have non-zero values, Charger Manager will check the
132 battery voltage drop fullbatt_vchkdrop_ms after the battery is fully
133 charged. If the voltage drop is over fullbatt_vchkdrop_uV, Charger
134 Manager will try to recharge the battery by disabling and enabling
135 chargers. Recharge with voltage drop condition only (without delay
136 condition) is needed to be implemented with hardware interrupts from
137 fuel gauges or charger devices/chips.
138
114unsigned int fullbatt_uV; 139unsigned int fullbatt_uV;
115 : If specified with a non-zero value, Charger Manager assumes 140 : If specified with a non-zero value, Charger Manager assumes
116 that the battery is full (capacity = 100) if the battery is not being 141 that the battery is full (capacity = 100) if the battery is not being
@@ -122,6 +147,8 @@ unsigned int polling_interval_ms;
122 this battery every polling_interval_ms or more frequently. 147 this battery every polling_interval_ms or more frequently.
123 148
124enum data_source battery_present; 149enum data_source battery_present;
150 : CM_BATTERY_PRESENT: assume that the battery exists.
151 CM_NO_BATTERY: assume that the battery does not exists.
125 CM_FUEL_GAUGE: get battery presence information from fuel gauge. 152 CM_FUEL_GAUGE: get battery presence information from fuel gauge.
126 CM_CHARGER_STAT: get battery presence from chargers. 153 CM_CHARGER_STAT: get battery presence from chargers.
127 154
@@ -151,7 +178,17 @@ bool measure_battery_temp;
151 the value of measure_battery_temp. 178 the value of measure_battery_temp.
152}; 179};
153 180
1545. Other Considerations 1815. Notify Charger-Manager of charger events: cm_notify_event()
182=========================================================
183If there is an charger event is required to notify
184Charger Manager, a charger device driver that triggers the event can call
185cm_notify_event(psy, type, msg) to notify the corresponding Charger Manager.
186In the function, psy is the charger driver's power_supply pointer, which is
187associated with Charger-Manager. The parameter "type"
188is the same as irq's type (enum cm_event_types). The event message "msg" is
189optional and is effective only if the event type is "UNDESCRIBED" or "OTHERS".
190
1916. Other Considerations
155======================= 192=======================
156 193
157At the charger/battery-related events such as battery-pulled-out, 194At the charger/battery-related events such as battery-pulled-out,
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 9f16c5178b66..211831d4095f 100644
--- a/Documentation/power/power_supply_class.txt
+++ b/Documentation/power/power_supply_class.txt
@@ -84,6 +84,8 @@ are already charged or discharging, 'n/a' can be displayed (or
84HEALTH - represents health of the battery, values corresponds to 84HEALTH - represents health of the battery, values corresponds to
85POWER_SUPPLY_HEALTH_*, defined in battery.h. 85POWER_SUPPLY_HEALTH_*, defined in battery.h.
86 86
87VOLTAGE_OCV - open circuit voltage of the battery.
88
87VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and 89VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and
88minimal power supply voltages. Maximal/minimal means values of voltages 90minimal power supply voltages. Maximal/minimal means values of voltages
89when battery considered "full"/"empty" at normal conditions. Yes, there is 91when battery considered "full"/"empty" at normal conditions. Yes, there is
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
index 88fd7f5c8dcd..13d6166d7a27 100644
--- a/Documentation/sysctl/fs.txt
+++ b/Documentation/sysctl/fs.txt
@@ -225,6 +225,13 @@ a queue must be less or equal then msg_max.
225maximum message size value (it is every message queue's attribute set during 225maximum message size value (it is every message queue's attribute set during
226its creation). 226its creation).
227 227
228/proc/sys/fs/mqueue/msg_default is a read/write file for setting/getting the
229default number of messages in a queue value if attr parameter of mq_open(2) is
230NULL. If it exceed msg_max, the default value is initialized msg_max.
231
232/proc/sys/fs/mqueue/msgsize_default is a read/write file for setting/getting
233the default message size value if attr parameter of mq_open(2) is NULL. If it
234exceed msgsize_max, the default value is initialized msgsize_max.
228 235
2294. /proc/sys/fs/epoll - Configuration options for the epoll interface 2364. /proc/sys/fs/epoll - Configuration options for the epoll interface
230-------------------------------------------------------- 237--------------------------------------------------------
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
index 4600cbe3d6be..7587493c67f1 100644
--- a/Documentation/vm/pagemap.txt
+++ b/Documentation/vm/pagemap.txt
@@ -16,7 +16,7 @@ There are three components to pagemap:
16 * Bits 0-4 swap type if swapped 16 * Bits 0-4 swap type if swapped
17 * Bits 5-54 swap offset if swapped 17 * Bits 5-54 swap offset if swapped
18 * Bits 55-60 page shift (page size = 1<<page shift) 18 * Bits 55-60 page shift (page size = 1<<page shift)
19 * Bit 61 reserved for future use 19 * Bit 61 page is file-page or shared-anon
20 * Bit 62 page swapped 20 * Bit 62 page swapped
21 * Bit 63 page present 21 * Bit 63 page present
22 22
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt
index 29bdf62aac09..f734bb2a78dc 100644
--- a/Documentation/vm/transhuge.txt
+++ b/Documentation/vm/transhuge.txt
@@ -166,6 +166,68 @@ behavior. So to make them effective you need to restart any
166application that could have been using hugepages. This also applies to 166application that could have been using hugepages. This also applies to
167the regions registered in khugepaged. 167the regions registered in khugepaged.
168 168
169== Monitoring usage ==
170
171The number of transparent huge pages currently used by the system is
172available by reading the AnonHugePages field in /proc/meminfo. To
173identify what applications are using transparent huge pages, it is
174necessary to read /proc/PID/smaps and count the AnonHugePages fields
175for each mapping. Note that reading the smaps file is expensive and
176reading it frequently will incur overhead.
177
178There are a number of counters in /proc/vmstat that may be used to
179monitor how successfully the system is providing huge pages for use.
180
181thp_fault_alloc is incremented every time a huge page is successfully
182 allocated to handle a page fault. This applies to both the
183 first time a page is faulted and for COW faults.
184
185thp_collapse_alloc is incremented by khugepaged when it has found
186 a range of pages to collapse into one huge page and has
187 successfully allocated a new huge page to store the data.
188
189thp_fault_fallback is incremented if a page fault fails to allocate
190 a huge page and instead falls back to using small pages.
191
192thp_collapse_alloc_failed is incremented if khugepaged found a range
193 of pages that should be collapsed into one huge page but failed
194 the allocation.
195
196thp_split is incremented every time a huge page is split into base
197 pages. This can happen for a variety of reasons but a common
198 reason is that a huge page is old and is being reclaimed.
199
200As the system ages, allocating huge pages may be expensive as the
201system uses memory compaction to copy data around memory to free a
202huge page for use. There are some counters in /proc/vmstat to help
203monitor this overhead.
204
205compact_stall is incremented every time a process stalls to run
206 memory compaction so that a huge page is free for use.
207
208compact_success is incremented if the system compacted memory and
209 freed a huge page for use.
210
211compact_fail is incremented if the system tries to compact memory
212 but failed.
213
214compact_pages_moved is incremented each time a page is moved. If
215 this value is increasing rapidly, it implies that the system
216 is copying a lot of data to satisfy the huge page allocation.
217 It is possible that the cost of copying exceeds any savings
218 from reduced TLB misses.
219
220compact_pagemigrate_failed is incremented when the underlying mechanism
221 for moving a page failed.
222
223compact_blocks_moved is incremented each time memory compaction examines
224 a huge page aligned range of pages.
225
226It is possible to establish how long the stalls were using the function
227tracer to record how long was spent in __alloc_pages_nodemask and
228using the mm_page_alloc tracepoint to identify which allocations were
229for huge pages.
230
169== get_user_pages and follow_page == 231== get_user_pages and follow_page ==
170 232
171get_user_pages and follow_page if run on a hugepage, will return the 233get_user_pages and follow_page if run on a hugepage, will return the
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 25fe4304f2fc..086638f6c82d 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 16-Mar-2012 3Last reviewed: 22-May-2012
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -39,6 +39,10 @@ watchdog_device structure.
39The watchdog device structure looks like this: 39The watchdog device structure looks like this:
40 40
41struct watchdog_device { 41struct watchdog_device {
42 int id;
43 struct cdev cdev;
44 struct device *dev;
45 struct device *parent;
42 const struct watchdog_info *info; 46 const struct watchdog_info *info;
43 const struct watchdog_ops *ops; 47 const struct watchdog_ops *ops;
44 unsigned int bootstatus; 48 unsigned int bootstatus;
@@ -46,10 +50,20 @@ struct watchdog_device {
46 unsigned int min_timeout; 50 unsigned int min_timeout;
47 unsigned int max_timeout; 51 unsigned int max_timeout;
48 void *driver_data; 52 void *driver_data;
53 struct mutex lock;
49 unsigned long status; 54 unsigned long status;
50}; 55};
51 56
52It contains following fields: 57It contains following fields:
58* id: set by watchdog_register_device, id 0 is special. It has both a
59 /dev/watchdog0 cdev (dynamic major, minor 0) as well as the old
60 /dev/watchdog miscdev. The id is set automatically when calling
61 watchdog_register_device.
62* cdev: cdev for the dynamic /dev/watchdog<id> device nodes. This
63 field is also populated by watchdog_register_device.
64* dev: device under the watchdog class (created by watchdog_register_device).
65* parent: set this to the parent device (or NULL) before calling
66 watchdog_register_device.
53* info: a pointer to a watchdog_info structure. This structure gives some 67* info: a pointer to a watchdog_info structure. This structure gives some
54 additional information about the watchdog timer itself. (Like it's unique name) 68 additional information about the watchdog timer itself. (Like it's unique name)
55* ops: a pointer to the list of watchdog operations that the watchdog supports. 69* ops: a pointer to the list of watchdog operations that the watchdog supports.
@@ -61,6 +75,7 @@ It contains following fields:
61* driver_data: a pointer to the drivers private data of a watchdog device. 75* driver_data: a pointer to the drivers private data of a watchdog device.
62 This data should only be accessed via the watchdog_set_drvdata and 76 This data should only be accessed via the watchdog_set_drvdata and
63 watchdog_get_drvdata routines. 77 watchdog_get_drvdata routines.
78* lock: Mutex for WatchDog Timer Driver Core internal use only.
64* status: this field contains a number of status bits that give extra 79* status: this field contains a number of status bits that give extra
65 information about the status of the device (Like: is the watchdog timer 80 information about the status of the device (Like: is the watchdog timer
66 running/active, is the nowayout bit set, is the device opened via 81 running/active, is the nowayout bit set, is the device opened via
@@ -78,6 +93,8 @@ struct watchdog_ops {
78 unsigned int (*status)(struct watchdog_device *); 93 unsigned int (*status)(struct watchdog_device *);
79 int (*set_timeout)(struct watchdog_device *, unsigned int); 94 int (*set_timeout)(struct watchdog_device *, unsigned int);
80 unsigned int (*get_timeleft)(struct watchdog_device *); 95 unsigned int (*get_timeleft)(struct watchdog_device *);
96 void (*ref)(struct watchdog_device *);
97 void (*unref)(struct watchdog_device *);
81 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); 98 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
82}; 99};
83 100
@@ -85,6 +102,21 @@ It is important that you first define the module owner of the watchdog timer
85driver's operations. This module owner will be used to lock the module when 102driver's operations. This module owner will be used to lock the module when
86the watchdog is active. (This to avoid a system crash when you unload the 103the watchdog is active. (This to avoid a system crash when you unload the
87module and /dev/watchdog is still open). 104module and /dev/watchdog is still open).
105
106If the watchdog_device struct is dynamically allocated, just locking the module
107is not enough and a driver also needs to define the ref and unref operations to
108ensure the structure holding the watchdog_device does not go away.
109
110The simplest (and usually sufficient) implementation of this is to:
1111) Add a kref struct to the same structure which is holding the watchdog_device
1122) Define a release callback for the kref which frees the struct holding both
1133) Call kref_init on this kref *before* calling watchdog_register_device()
1144) Define a ref operation calling kref_get on this kref
1155) Define a unref operation calling kref_put on this kref
1166) When it is time to cleanup:
117 * Do not kfree() the struct holding both, the last kref_put will do this!
118 * *After* calling watchdog_unregister_device() call kref_put on the kref
119
88Some operations are mandatory and some are optional. The mandatory operations 120Some operations are mandatory and some are optional. The mandatory operations
89are: 121are:
90* start: this is a pointer to the routine that starts the watchdog timer 122* start: this is a pointer to the routine that starts the watchdog timer
@@ -125,6 +157,10 @@ they are supported. These optional routines/operations are:
125 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 157 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
126 watchdog's info structure). 158 watchdog's info structure).
127* get_timeleft: this routines returns the time that's left before a reset. 159* get_timeleft: this routines returns the time that's left before a reset.
160* ref: the operation that calls kref_get on the kref of a dynamically
161 allocated watchdog_device struct.
162* unref: the operation that calls kref_put on the kref of a dynamically
163 allocated watchdog_device struct.
128* ioctl: if this routine is present then it will be called first before we do 164* ioctl: if this routine is present then it will be called first before we do
129 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD 165 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD
130 if a command is not supported. The parameters that are passed to the ioctl 166 if a command is not supported. The parameters that are passed to the ioctl
@@ -144,6 +180,11 @@ bit-operations. The status bits that are defined are:
144 (This bit should only be used by the WatchDog Timer Driver Core). 180 (This bit should only be used by the WatchDog Timer Driver Core).
145* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog. 181* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog.
146 If this bit is set then the watchdog timer will not be able to stop. 182 If this bit is set then the watchdog timer will not be able to stop.
183* WDOG_UNREGISTERED: this bit gets set by the WatchDog Timer Driver Core
184 after calling watchdog_unregister_device, and then checked before calling
185 any watchdog_ops, so that you can be sure that no operations (other then
186 unref) will get called after unregister, even if userspace still holds a
187 reference to /dev/watchdog
147 188
148 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog 189 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
149 timer device) you can either: 190 timer device) you can either:
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 17ddd822b456..04fddbacdbde 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -78,6 +78,11 @@ wd0_timeout: Default watchdog0 timeout in 1/10secs
78wd1_timeout: Default watchdog1 timeout in 1/10secs 78wd1_timeout: Default watchdog1 timeout in 1/10secs
79wd2_timeout: Default watchdog2 timeout in 1/10secs 79wd2_timeout: Default watchdog2 timeout in 1/10secs
80------------------------------------------------- 80-------------------------------------------------
81da9052wdt:
82timeout: Watchdog timeout in seconds. 2<= timeout <=131, default=2.048s
83nowayout: Watchdog cannot be stopped once started
84 (default=kernel config parameter)
85-------------------------------------------------
81davinci_wdt: 86davinci_wdt:
82heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60 87heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60
83------------------------------------------------- 88-------------------------------------------------