diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-hsi | 19 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt-nv12m.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/ata/ahci-platform.txt (renamed from Documentation/devicetree/bindings/ata/calxeda-sata.txt) | 5 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt | 132 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt | 132 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 128 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/pinmux/pinmux_nvidia.txt | 5 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/sound/sgtl5000.txt | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/usb/tegra-usb.txt | 3 | ||||
-rw-r--r-- | Documentation/driver-model/devres.txt | 4 | ||||
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 4 | ||||
-rw-r--r-- | Documentation/pinctrl.txt | 94 | ||||
-rw-r--r-- | Documentation/power/freezing-of-tasks.txt | 37 | ||||
-rw-r--r-- | Documentation/security/keys.txt | 14 |
15 files changed, 509 insertions, 74 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-hsi b/Documentation/ABI/testing/sysfs-bus-hsi new file mode 100644 index 000000000000..1b1b282a99e1 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-hsi | |||
@@ -0,0 +1,19 @@ | |||
1 | What: /sys/bus/hsi | ||
2 | Date: April 2012 | ||
3 | KernelVersion: 3.4 | ||
4 | Contact: Carlos Chinea <carlos.chinea@nokia.com> | ||
5 | Description: | ||
6 | High Speed Synchronous Serial Interface (HSI) is a | ||
7 | serial interface mainly used for connecting application | ||
8 | engines (APE) with cellular modem engines (CMT) in cellular | ||
9 | handsets. | ||
10 | The bus will be populated with devices (hsi_clients) representing | ||
11 | the protocols available in the system. Bus drivers implement | ||
12 | those protocols. | ||
13 | |||
14 | What: /sys/bus/hsi/devices/.../modalias | ||
15 | Date: April 2012 | ||
16 | KernelVersion: 3.4 | ||
17 | Contact: Carlos Chinea <carlos.chinea@nokia.com> | ||
18 | Description: Stores the same MODALIAS value emitted by uevent | ||
19 | Format: hsi:<hsi_client device name> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml index 3fd3ce5df270..5274c24d11e0 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-NV12M"> | 1 | <refentry id="V4L2-PIX-FMT-NV12M"> |
2 | <refmeta> | 2 | <refmeta> |
3 | <refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle> | 3 | <refentrytitle>V4L2_PIX_FMT_NV12M ('NM12')</refentrytitle> |
4 | &manvol; | 4 | &manvol; |
5 | </refmeta> | 5 | </refmeta> |
6 | <refnamediv> | 6 | <refnamediv> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml b/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml index 9957863daf18..60308f1eefdf 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-YUV420M"> | 1 | <refentry id="V4L2-PIX-FMT-YUV420M"> |
2 | <refmeta> | 2 | <refmeta> |
3 | <refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle> | 3 | <refentrytitle>V4L2_PIX_FMT_YUV420M ('YM12')</refentrytitle> |
4 | &manvol; | 4 | &manvol; |
5 | </refmeta> | 5 | </refmeta> |
6 | <refnamediv> | 6 | <refnamediv> |
diff --git a/Documentation/devicetree/bindings/ata/calxeda-sata.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 79caa5651f53..8bb8a76d42e8 100644 --- a/Documentation/devicetree/bindings/ata/calxeda-sata.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
@@ -1,10 +1,10 @@ | |||
1 | * Calxeda SATA Controller | 1 | * AHCI SATA Controller |
2 | 2 | ||
3 | SATA nodes are defined to describe on-chip Serial ATA controllers. | 3 | SATA nodes are defined to describe on-chip Serial ATA controllers. |
4 | Each SATA controller should have its own node. | 4 | Each SATA controller should have its own node. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : compatible list, contains "calxeda,hb-ahci" | 7 | - compatible : compatible list, contains "calxeda,hb-ahci" or "snps,spear-ahci" |
8 | - interrupts : <interrupt mapping for SATA IRQ> | 8 | - interrupts : <interrupt mapping for SATA IRQ> |
9 | - reg : <registers mapping> | 9 | - reg : <registers mapping> |
10 | 10 | ||
@@ -14,4 +14,3 @@ Example: | |||
14 | reg = <0xffe08000 0x1000>; | 14 | reg = <0xffe08000 0x1000>; |
15 | interrupts = <115>; | 15 | interrupts = <115>; |
16 | }; | 16 | }; |
17 | |||
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt new file mode 100644 index 000000000000..c8e578263ce2 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt | |||
@@ -0,0 +1,132 @@ | |||
1 | NVIDIA Tegra20 pinmux controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "nvidia,tegra20-pinmux" | ||
5 | - reg: Should contain the register physical address and length for each of | ||
6 | the tri-state, mux, pull-up/down, and pad control register sets. | ||
7 | |||
8 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
9 | common pinctrl bindings used by client devices, including the meaning of the | ||
10 | phrase "pin configuration node". | ||
11 | |||
12 | Tegra's pin configuration nodes act as a container for an abitrary number of | ||
13 | subnodes. Each of these subnodes represents some desired configuration for a | ||
14 | pin, a group, or a list of pins or groups. This configuration can include the | ||
15 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
16 | parameters, such as pull-up, tristate, drive strength, etc. | ||
17 | |||
18 | The name of each subnode is not important; all subnodes should be enumerated | ||
19 | and processed purely based on their content. | ||
20 | |||
21 | Each subnode only affects those parameters that are explicitly listed. In | ||
22 | other words, a subnode that lists a mux function but no pin configuration | ||
23 | parameters implies no information about any pin configuration parameters. | ||
24 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
25 | information about e.g. the mux function or tristate parameter. For this | ||
26 | reason, even seemingly boolean values are actually tristates in this binding: | ||
27 | unspecified, off, or on. Unspecified is represented as an absent property, | ||
28 | and off/on are represented as integer values 0 and 1. | ||
29 | |||
30 | Required subnode-properties: | ||
31 | - nvidia,pins : An array of strings. Each string contains the name of a pin or | ||
32 | group. Valid values for these names are listed below. | ||
33 | |||
34 | Optional subnode-properties: | ||
35 | - nvidia,function: A string containing the name of the function to mux to the | ||
36 | pin or group. Valid values for function names are listed below. See the Tegra | ||
37 | TRM to determine which are valid for each pin or group. | ||
38 | - nvidia,pull: Integer, representing the pull-down/up to apply to the pin. | ||
39 | 0: none, 1: down, 2: up. | ||
40 | - nvidia,tristate: Integer. | ||
41 | 0: drive, 1: tristate. | ||
42 | - nvidia,high-speed-mode: Integer. Enable high speed mode the pins. | ||
43 | 0: no, 1: yes. | ||
44 | - nvidia,schmitt: Integer. Enables Schmitt Trigger on the input. | ||
45 | 0: no, 1: yes. | ||
46 | - nvidia,low-power-mode: Integer. Valid values 0-3. 0 is least power, 3 is | ||
47 | most power. Controls the drive power or current. See "Low Power Mode" | ||
48 | or "LPMD1" and "LPMD0" in the Tegra TRM. | ||
49 | - nvidia,pull-down-strength: Integer. Controls drive strength. 0 is weakest. | ||
50 | The range of valid values depends on the pingroup. See "CAL_DRVDN" in the | ||
51 | Tegra TRM. | ||
52 | - nvidia,pull-up-strength: Integer. Controls drive strength. 0 is weakest. | ||
53 | The range of valid values depends on the pingroup. See "CAL_DRVUP" in the | ||
54 | Tegra TRM. | ||
55 | - nvidia,slew-rate-rising: Integer. Controls rising signal slew rate. 0 is | ||
56 | fastest. The range of valid values depends on the pingroup. See | ||
57 | "DRVDN_SLWR" in the Tegra TRM. | ||
58 | - nvidia,slew-rate-falling: Integer. Controls falling signal slew rate. 0 is | ||
59 | fastest. The range of valid values depends on the pingroup. See | ||
60 | "DRVUP_SLWF" in the Tegra TRM. | ||
61 | |||
62 | Note that many of these properties are only valid for certain specific pins | ||
63 | or groups. See the Tegra TRM and various pinmux spreadsheets for complete | ||
64 | details regarding which groups support which functionality. The Linux pinctrl | ||
65 | driver may also be a useful reference, since it consolidates, disambiguates, | ||
66 | and corrects data from all those sources. | ||
67 | |||
68 | Valid values for pin and group names are: | ||
69 | |||
70 | mux groups: | ||
71 | |||
72 | These all support nvidia,function, nvidia,tristate, and many support | ||
73 | nvidia,pull. | ||
74 | |||
75 | ata, atb, atc, atd, ate, cdev1, cdev2, crtp, csus, dap1, dap2, dap3, dap4, | ||
76 | ddc, dta, dtb, dtc, dtd, dte, dtf, gma, gmb, gmc, gmd, gme, gpu, gpu7, | ||
77 | gpv, hdint, i2cp, irrx, irtx, kbca, kbcb, kbcc, kbcd, kbce, kbcf, lcsn, | ||
78 | ld0, ld1, ld2, ld3, ld4, ld5, ld6, ld7, ld8, ld9, ld10, ld11, ld12, ld13, | ||
79 | ld14, ld15, ld16, ld17, ldc, ldi, lhp0, lhp1, lhp2, lhs, lm0, lm1, lpp, | ||
80 | lpw0, lpw1, lpw2, lsc0, lsc1, lsck, lsda, lsdi, lspi, lvp0, lvp1, lvs, | ||
81 | owc, pmc, pta, rm, sdb, sdc, sdd, sdio1, slxa, slxc, slxd, slxk, spdi, | ||
82 | spdo, spia, spib, spic, spid, spie, spif, spig, spih, uaa, uab, uac, uad, | ||
83 | uca, ucb, uda. | ||
84 | |||
85 | tristate groups: | ||
86 | |||
87 | These only support nvidia,pull. | ||
88 | |||
89 | ck32, ddrc, pmca, pmcb, pmcc, pmcd, pmce, xm2c, xm2d, ls, lc, ld17_0, | ||
90 | ld19_18, ld21_20, ld23_22. | ||
91 | |||
92 | drive groups: | ||
93 | |||
94 | With some exceptions, these support nvidia,high-speed-mode, | ||
95 | nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength, | ||
96 | nvidia,pull-up-strength, nvidia,slew_rate-rising, nvidia,slew_rate-falling. | ||
97 | |||
98 | drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2, | ||
99 | drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg, | ||
100 | drive_lcd1, drive_lcd2, drive_sdmmc2, drive_sdmmc3, drive_spi, drive_uaa, | ||
101 | drive_uab, drive_uart2, drive_uart3, drive_vi1, drive_vi2, drive_xm2a, | ||
102 | drive_xm2c, drive_xm2d, drive_xm2clk, drive_sdio1, drive_crt, drive_ddc, | ||
103 | drive_gma, drive_gmb, drive_gmc, drive_gmd, drive_gme, drive_owr, | ||
104 | drive_uda. | ||
105 | |||
106 | Example: | ||
107 | |||
108 | pinctrl@70000000 { | ||
109 | compatible = "nvidia,tegra20-pinmux"; | ||
110 | reg = < 0x70000014 0x10 /* Tri-state registers */ | ||
111 | 0x70000080 0x20 /* Mux registers */ | ||
112 | 0x700000a0 0x14 /* Pull-up/down registers */ | ||
113 | 0x70000868 0xa8 >; /* Pad control registers */ | ||
114 | }; | ||
115 | |||
116 | Example board file extract: | ||
117 | |||
118 | pinctrl@70000000 { | ||
119 | sdio4_default: sdio4_default { | ||
120 | atb { | ||
121 | nvidia,pins = "atb", "gma", "gme"; | ||
122 | nvidia,function = "sdio4"; | ||
123 | nvidia,pull = <0>; | ||
124 | nvidia,tristate = <0>; | ||
125 | }; | ||
126 | }; | ||
127 | }; | ||
128 | |||
129 | sdhci@c8000600 { | ||
130 | pinctrl-names = "default"; | ||
131 | pinctrl-0 = <&sdio4_default>; | ||
132 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt new file mode 100644 index 000000000000..c275b70349c1 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt | |||
@@ -0,0 +1,132 @@ | |||
1 | NVIDIA Tegra30 pinmux controller | ||
2 | |||
3 | The Tegra30 pinctrl binding is very similar to the Tegra20 pinctrl binding, | ||
4 | as described in nvidia,tegra20-pinmux.txt. In fact, this document assumes | ||
5 | that binding as a baseline, and only documents the differences between the | ||
6 | two bindings. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: "nvidia,tegra30-pinmux" | ||
10 | - reg: Should contain the register physical address and length for each of | ||
11 | the pad control and mux registers. | ||
12 | |||
13 | Tegra30 adds the following optional properties for pin configuration subnodes: | ||
14 | - nvidia,enable-input: Integer. Enable the pin's input path. 0: no, 1: yes. | ||
15 | - nvidia,open-drain: Integer. Enable open drain mode. 0: no, 1: yes. | ||
16 | - nvidia,lock: Integer. Lock the pin configuration against further changes | ||
17 | until reset. 0: no, 1: yes. | ||
18 | - nvidia,io-reset: Integer. Reset the IO path. 0: no, 1: yes. | ||
19 | |||
20 | As with Tegra20, see the Tegra TRM for complete details regarding which groups | ||
21 | support which functionality. | ||
22 | |||
23 | Valid values for pin and group names are: | ||
24 | |||
25 | per-pin mux groups: | ||
26 | |||
27 | These all support nvidia,function, nvidia,tristate, nvidia,pull, | ||
28 | nvidia,enable-input, nvidia,lock. Some support nvidia,open-drain, | ||
29 | nvidia,io-reset. | ||
30 | |||
31 | clk_32k_out_pa0, uart3_cts_n_pa1, dap2_fs_pa2, dap2_sclk_pa3, | ||
32 | dap2_din_pa4, dap2_dout_pa5, sdmmc3_clk_pa6, sdmmc3_cmd_pa7, gmi_a17_pb0, | ||
33 | gmi_a18_pb1, lcd_pwr0_pb2, lcd_pclk_pb3, sdmmc3_dat3_pb4, sdmmc3_dat2_pb5, | ||
34 | sdmmc3_dat1_pb6, sdmmc3_dat0_pb7, uart3_rts_n_pc0, lcd_pwr1_pc1, | ||
35 | uart2_txd_pc2, uart2_rxd_pc3, gen1_i2c_scl_pc4, gen1_i2c_sda_pc5, | ||
36 | lcd_pwr2_pc6, gmi_wp_n_pc7, sdmmc3_dat5_pd0, sdmmc3_dat4_pd1, lcd_dc1_pd2, | ||
37 | sdmmc3_dat6_pd3, sdmmc3_dat7_pd4, vi_d1_pd5, vi_vsync_pd6, vi_hsync_pd7, | ||
38 | lcd_d0_pe0, lcd_d1_pe1, lcd_d2_pe2, lcd_d3_pe3, lcd_d4_pe4, lcd_d5_pe5, | ||
39 | lcd_d6_pe6, lcd_d7_pe7, lcd_d8_pf0, lcd_d9_pf1, lcd_d10_pf2, lcd_d11_pf3, | ||
40 | lcd_d12_pf4, lcd_d13_pf5, lcd_d14_pf6, lcd_d15_pf7, gmi_ad0_pg0, | ||
41 | gmi_ad1_pg1, gmi_ad2_pg2, gmi_ad3_pg3, gmi_ad4_pg4, gmi_ad5_pg5, | ||
42 | gmi_ad6_pg6, gmi_ad7_pg7, gmi_ad8_ph0, gmi_ad9_ph1, gmi_ad10_ph2, | ||
43 | gmi_ad11_ph3, gmi_ad12_ph4, gmi_ad13_ph5, gmi_ad14_ph6, gmi_ad15_ph7, | ||
44 | gmi_wr_n_pi0, gmi_oe_n_pi1, gmi_dqs_pi2, gmi_cs6_n_pi3, gmi_rst_n_pi4, | ||
45 | gmi_iordy_pi5, gmi_cs7_n_pi6, gmi_wait_pi7, gmi_cs0_n_pj0, lcd_de_pj1, | ||
46 | gmi_cs1_n_pj2, lcd_hsync_pj3, lcd_vsync_pj4, uart2_cts_n_pj5, | ||
47 | uart2_rts_n_pj6, gmi_a16_pj7, gmi_adv_n_pk0, gmi_clk_pk1, gmi_cs4_n_pk2, | ||
48 | gmi_cs2_n_pk3, gmi_cs3_n_pk4, spdif_out_pk5, spdif_in_pk6, gmi_a19_pk7, | ||
49 | vi_d2_pl0, vi_d3_pl1, vi_d4_pl2, vi_d5_pl3, vi_d6_pl4, vi_d7_pl5, | ||
50 | vi_d8_pl6, vi_d9_pl7, lcd_d16_pm0, lcd_d17_pm1, lcd_d18_pm2, lcd_d19_pm3, | ||
51 | lcd_d20_pm4, lcd_d21_pm5, lcd_d22_pm6, lcd_d23_pm7, dap1_fs_pn0, | ||
52 | dap1_din_pn1, dap1_dout_pn2, dap1_sclk_pn3, lcd_cs0_n_pn4, lcd_sdout_pn5, | ||
53 | lcd_dc0_pn6, hdmi_int_pn7, ulpi_data7_po0, ulpi_data0_po1, ulpi_data1_po2, | ||
54 | ulpi_data2_po3, ulpi_data3_po4, ulpi_data4_po5, ulpi_data5_po6, | ||
55 | ulpi_data6_po7, dap3_fs_pp0, dap3_din_pp1, dap3_dout_pp2, dap3_sclk_pp3, | ||
56 | dap4_fs_pp4, dap4_din_pp5, dap4_dout_pp6, dap4_sclk_pp7, kb_col0_pq0, | ||
57 | kb_col1_pq1, kb_col2_pq2, kb_col3_pq3, kb_col4_pq4, kb_col5_pq5, | ||
58 | kb_col6_pq6, kb_col7_pq7, kb_row0_pr0, kb_row1_pr1, kb_row2_pr2, | ||
59 | kb_row3_pr3, kb_row4_pr4, kb_row5_pr5, kb_row6_pr6, kb_row7_pr7, | ||
60 | kb_row8_ps0, kb_row9_ps1, kb_row10_ps2, kb_row11_ps3, kb_row12_ps4, | ||
61 | kb_row13_ps5, kb_row14_ps6, kb_row15_ps7, vi_pclk_pt0, vi_mclk_pt1, | ||
62 | vi_d10_pt2, vi_d11_pt3, vi_d0_pt4, gen2_i2c_scl_pt5, gen2_i2c_sda_pt6, | ||
63 | sdmmc4_cmd_pt7, pu0, pu1, pu2, pu3, pu4, pu5, pu6, jtag_rtck_pu7, pv0, | ||
64 | pv1, pv2, pv3, ddc_scl_pv4, ddc_sda_pv5, crt_hsync_pv6, crt_vsync_pv7, | ||
65 | lcd_cs1_n_pw0, lcd_m1_pw1, spi2_cs1_n_pw2, spi2_cs2_n_pw3, clk1_out_pw4, | ||
66 | clk2_out_pw5, uart3_txd_pw6, uart3_rxd_pw7, spi2_mosi_px0, spi2_miso_px1, | ||
67 | spi2_sck_px2, spi2_cs0_n_px3, spi1_mosi_px4, spi1_sck_px5, spi1_cs0_n_px6, | ||
68 | spi1_miso_px7, ulpi_clk_py0, ulpi_dir_py1, ulpi_nxt_py2, ulpi_stp_py3, | ||
69 | sdmmc1_dat3_py4, sdmmc1_dat2_py5, sdmmc1_dat1_py6, sdmmc1_dat0_py7, | ||
70 | sdmmc1_clk_pz0, sdmmc1_cmd_pz1, lcd_sdin_pz2, lcd_wr_n_pz3, lcd_sck_pz4, | ||
71 | sys_clk_req_pz5, pwr_i2c_scl_pz6, pwr_i2c_sda_pz7, sdmmc4_dat0_paa0, | ||
72 | sdmmc4_dat1_paa1, sdmmc4_dat2_paa2, sdmmc4_dat3_paa3, sdmmc4_dat4_paa4, | ||
73 | sdmmc4_dat5_paa5, sdmmc4_dat6_paa6, sdmmc4_dat7_paa7, pbb0, | ||
74 | cam_i2c_scl_pbb1, cam_i2c_sda_pbb2, pbb3, pbb4, pbb5, pbb6, pbb7, | ||
75 | cam_mclk_pcc0, pcc1, pcc2, sdmmc4_rst_n_pcc3, sdmmc4_clk_pcc4, | ||
76 | clk2_req_pcc5, pex_l2_rst_n_pcc6, pex_l2_clkreq_n_pcc7, | ||
77 | pex_l0_prsnt_n_pdd0, pex_l0_rst_n_pdd1, pex_l0_clkreq_n_pdd2, | ||
78 | pex_wake_n_pdd3, pex_l1_prsnt_n_pdd4, pex_l1_rst_n_pdd5, | ||
79 | pex_l1_clkreq_n_pdd6, pex_l2_prsnt_n_pdd7, clk3_out_pee0, clk3_req_pee1, | ||
80 | clk1_req_pee2, hdmi_cec_pee3, clk_32k_in, core_pwr_req, cpu_pwr_req, owr, | ||
81 | pwr_int_n. | ||
82 | |||
83 | drive groups: | ||
84 | |||
85 | These all support nvidia,pull-down-strength, nvidia,pull-up-strength, | ||
86 | nvidia,slew_rate-rising, nvidia,slew_rate-falling. Most but not all | ||
87 | support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode. | ||
88 | |||
89 | ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, cec, crt, csus, dap1, | ||
90 | dap2, dap3, dap4, dbg, ddc, dev3, gma, gmb, gmc, gmd, gme, gmf, gmg, | ||
91 | gmh, gpv, lcd1, lcd2, owr, sdio1, sdio2, sdio3, spi, uaa, uab, uart2, | ||
92 | uart3, uda, vi1. | ||
93 | |||
94 | Example: | ||
95 | |||
96 | pinctrl@70000000 { | ||
97 | compatible = "nvidia,tegra30-pinmux"; | ||
98 | reg = < 0x70000868 0xd0 /* Pad control registers */ | ||
99 | 0x70003000 0x3e0 >; /* Mux registers */ | ||
100 | }; | ||
101 | |||
102 | Example board file extract: | ||
103 | |||
104 | pinctrl@70000000 { | ||
105 | sdmmc4_default: pinmux { | ||
106 | sdmmc4_clk_pcc4 { | ||
107 | nvidia,pins = "sdmmc4_clk_pcc4", | ||
108 | "sdmmc4_rst_n_pcc3"; | ||
109 | nvidia,function = "sdmmc4"; | ||
110 | nvidia,pull = <0>; | ||
111 | nvidia,tristate = <0>; | ||
112 | }; | ||
113 | sdmmc4_dat0_paa0 { | ||
114 | nvidia,pins = "sdmmc4_dat0_paa0", | ||
115 | "sdmmc4_dat1_paa1", | ||
116 | "sdmmc4_dat2_paa2", | ||
117 | "sdmmc4_dat3_paa3", | ||
118 | "sdmmc4_dat4_paa4", | ||
119 | "sdmmc4_dat5_paa5", | ||
120 | "sdmmc4_dat6_paa6", | ||
121 | "sdmmc4_dat7_paa7"; | ||
122 | nvidia,function = "sdmmc4"; | ||
123 | nvidia,pull = <2>; | ||
124 | nvidia,tristate = <0>; | ||
125 | }; | ||
126 | }; | ||
127 | }; | ||
128 | |||
129 | sdhci@78000400 { | ||
130 | pinctrl-names = "default"; | ||
131 | pinctrl-0 = <&sdmmc4_default>; | ||
132 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt new file mode 100644 index 000000000000..c95ea8278f87 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | |||
@@ -0,0 +1,128 @@ | |||
1 | == Introduction == | ||
2 | |||
3 | Hardware modules that control pin multiplexing or configuration parameters | ||
4 | such as pull-up/down, tri-state, drive-strength etc are designated as pin | ||
5 | controllers. Each pin controller must be represented as a node in device tree, | ||
6 | just like any other hardware module. | ||
7 | |||
8 | Hardware modules whose signals are affected by pin configuration are | ||
9 | designated client devices. Again, each client device must be represented as a | ||
10 | node in device tree, just like any other hardware module. | ||
11 | |||
12 | For a client device to operate correctly, certain pin controllers must | ||
13 | set up certain specific pin configurations. Some client devices need a | ||
14 | single static pin configuration, e.g. set up during initialization. Others | ||
15 | need to reconfigure pins at run-time, for example to tri-state pins when the | ||
16 | device is inactive. Hence, each client device can define a set of named | ||
17 | states. The number and names of those states is defined by the client device's | ||
18 | own binding. | ||
19 | |||
20 | The common pinctrl bindings defined in this file provide an infrastructure | ||
21 | for client device device tree nodes to map those state names to the pin | ||
22 | configuration used by those states. | ||
23 | |||
24 | Note that pin controllers themselves may also be client devices of themselves. | ||
25 | For example, a pin controller may set up its own "active" state when the | ||
26 | driver loads. This would allow representing a board's static pin configuration | ||
27 | in a single place, rather than splitting it across multiple client device | ||
28 | nodes. The decision to do this or not somewhat rests with the author of | ||
29 | individual board device tree files, and any requirements imposed by the | ||
30 | bindings for the individual client devices in use by that board, i.e. whether | ||
31 | they require certain specific named states for dynamic pin configuration. | ||
32 | |||
33 | == Pinctrl client devices == | ||
34 | |||
35 | For each client device individually, every pin state is assigned an integer | ||
36 | ID. These numbers start at 0, and are contiguous. For each state ID, a unique | ||
37 | property exists to define the pin configuration. Each state may also be | ||
38 | assigned a name. When names are used, another property exists to map from | ||
39 | those names to the integer IDs. | ||
40 | |||
41 | Each client device's own binding determines the set of states the must be | ||
42 | defined in its device tree node, and whether to define the set of state | ||
43 | IDs that must be provided, or whether to define the set of state names that | ||
44 | must be provided. | ||
45 | |||
46 | Required properties: | ||
47 | pinctrl-0: List of phandles, each pointing at a pin configuration | ||
48 | node. These referenced pin configuration nodes must be child | ||
49 | nodes of the pin controller that they configure. Multiple | ||
50 | entries may exist in this list so that multiple pin | ||
51 | controllers may be configured, or so that a state may be built | ||
52 | from multiple nodes for a single pin controller, each | ||
53 | contributing part of the overall configuration. See the next | ||
54 | section of this document for details of the format of these | ||
55 | pin configuration nodes. | ||
56 | |||
57 | In some cases, it may be useful to define a state, but for it | ||
58 | to be empty. This may be required when a common IP block is | ||
59 | used in an SoC either without a pin controller, or where the | ||
60 | pin controller does not affect the HW module in question. If | ||
61 | the binding for that IP block requires certain pin states to | ||
62 | exist, they must still be defined, but may be left empty. | ||
63 | |||
64 | Optional properties: | ||
65 | pinctrl-1: List of phandles, each pointing at a pin configuration | ||
66 | node within a pin controller. | ||
67 | ... | ||
68 | pinctrl-n: List of phandles, each pointing at a pin configuration | ||
69 | node within a pin controller. | ||
70 | pinctrl-names: The list of names to assign states. List entry 0 defines the | ||
71 | name for integer state ID 0, list entry 1 for state ID 1, and | ||
72 | so on. | ||
73 | |||
74 | For example: | ||
75 | |||
76 | /* For a client device requiring named states */ | ||
77 | device { | ||
78 | pinctrl-names = "active", "idle"; | ||
79 | pinctrl-0 = <&state_0_node_a>; | ||
80 | pinctrl-1 = <&state_1_node_a &state_1_node_b>; | ||
81 | }; | ||
82 | |||
83 | /* For the same device if using state IDs */ | ||
84 | device { | ||
85 | pinctrl-0 = <&state_0_node_a>; | ||
86 | pinctrl-1 = <&state_1_node_a &state_1_node_b>; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * For an IP block whose binding supports pin configuration, | ||
91 | * but in use on an SoC that doesn't have any pin control hardware | ||
92 | */ | ||
93 | device { | ||
94 | pinctrl-names = "active", "idle"; | ||
95 | pinctrl-0 = <>; | ||
96 | pinctrl-1 = <>; | ||
97 | }; | ||
98 | |||
99 | == Pin controller devices == | ||
100 | |||
101 | Pin controller devices should contain the pin configuration nodes that client | ||
102 | devices reference. | ||
103 | |||
104 | For example: | ||
105 | |||
106 | pincontroller { | ||
107 | ... /* Standard DT properties for the device itself elided */ | ||
108 | |||
109 | state_0_node_a { | ||
110 | ... | ||
111 | }; | ||
112 | state_1_node_a { | ||
113 | ... | ||
114 | }; | ||
115 | state_1_node_b { | ||
116 | ... | ||
117 | }; | ||
118 | } | ||
119 | |||
120 | The contents of each of those pin configuration child nodes is defined | ||
121 | entirely by the binding for the individual pin controller device. There | ||
122 | exists no common standard for this content. | ||
123 | |||
124 | The pin configuration nodes need not be direct children of the pin controller | ||
125 | device; they may be grandchildren, for example. Whether this is legal, and | ||
126 | whether there is any interaction between the child and intermediate parent | ||
127 | nodes, is again defined entirely by the binding for the individual pin | ||
128 | controller device. | ||
diff --git a/Documentation/devicetree/bindings/pinmux/pinmux_nvidia.txt b/Documentation/devicetree/bindings/pinmux/pinmux_nvidia.txt deleted file mode 100644 index 36f82dbdd14d..000000000000 --- a/Documentation/devicetree/bindings/pinmux/pinmux_nvidia.txt +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | NVIDIA Tegra 2 pinmux controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "nvidia,tegra20-pinmux" | ||
5 | |||
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index 2c3cd413f042..9cc44449508d 100644 --- a/Documentation/devicetree/bindings/sound/sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt | |||
@@ -3,6 +3,8 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "fsl,sgtl5000". | 4 | - compatible : "fsl,sgtl5000". |
5 | 5 | ||
6 | - reg : the I2C address of the device | ||
7 | |||
6 | Example: | 8 | Example: |
7 | 9 | ||
8 | codec: sgtl5000@0a { | 10 | codec: sgtl5000@0a { |
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/tegra-usb.txt index 007005ddbe12..e9b005dc7625 100644 --- a/Documentation/devicetree/bindings/usb/tegra-usb.txt +++ b/Documentation/devicetree/bindings/usb/tegra-usb.txt | |||
@@ -12,6 +12,9 @@ Required properties : | |||
12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be | 12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be |
13 | activated for the bus to be powered. | 13 | activated for the bus to be powered. |
14 | 14 | ||
15 | Required properties for phy_type == ulpi: | ||
16 | - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. | ||
17 | |||
15 | Optional properties: | 18 | Optional properties: |
16 | - dr_mode : dual role mode. Indicates the working mode for | 19 | - dr_mode : dual role mode. Indicates the working mode for |
17 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", | 20 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 2a596a4fc23e..ef4fa7b423d2 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
@@ -276,3 +276,7 @@ REGULATOR | |||
276 | devm_regulator_get() | 276 | devm_regulator_get() |
277 | devm_regulator_put() | 277 | devm_regulator_put() |
278 | devm_regulator_bulk_get() | 278 | devm_regulator_bulk_get() |
279 | |||
280 | PINCTRL | ||
281 | devm_pinctrl_get() | ||
282 | devm_pinctrl_put() | ||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index bd80ba5847d2..1619a8c80873 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -147,7 +147,7 @@ tcp_adv_win_scale - INTEGER | |||
147 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), | 147 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), |
148 | if it is <= 0. | 148 | if it is <= 0. |
149 | Possible values are [-31, 31], inclusive. | 149 | Possible values are [-31, 31], inclusive. |
150 | Default: 2 | 150 | Default: 1 |
151 | 151 | ||
152 | tcp_allowed_congestion_control - STRING | 152 | tcp_allowed_congestion_control - STRING |
153 | Show/set the congestion control choices available to non-privileged | 153 | Show/set the congestion control choices available to non-privileged |
@@ -410,7 +410,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max | |||
410 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables | 410 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables |
411 | automatic tuning of that socket's receive buffer size, in which | 411 | automatic tuning of that socket's receive buffer size, in which |
412 | case this value is ignored. | 412 | case this value is ignored. |
413 | Default: between 87380B and 4MB, depending on RAM size. | 413 | Default: between 87380B and 6MB, depending on RAM size. |
414 | 414 | ||
415 | tcp_sack - BOOLEAN | 415 | tcp_sack - BOOLEAN |
416 | Enable select acknowledgments (SACKS). | 416 | Enable select acknowledgments (SACKS). |
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index d97bccf46147..e40f4b4e1977 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -152,11 +152,9 @@ static const struct foo_group foo_groups[] = { | |||
152 | }; | 152 | }; |
153 | 153 | ||
154 | 154 | ||
155 | static int foo_list_groups(struct pinctrl_dev *pctldev, unsigned selector) | 155 | static int foo_get_groups_count(struct pinctrl_dev *pctldev) |
156 | { | 156 | { |
157 | if (selector >= ARRAY_SIZE(foo_groups)) | 157 | return ARRAY_SIZE(foo_groups); |
158 | return -EINVAL; | ||
159 | return 0; | ||
160 | } | 158 | } |
161 | 159 | ||
162 | static const char *foo_get_group_name(struct pinctrl_dev *pctldev, | 160 | static const char *foo_get_group_name(struct pinctrl_dev *pctldev, |
@@ -175,7 +173,7 @@ static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, | |||
175 | } | 173 | } |
176 | 174 | ||
177 | static struct pinctrl_ops foo_pctrl_ops = { | 175 | static struct pinctrl_ops foo_pctrl_ops = { |
178 | .list_groups = foo_list_groups, | 176 | .get_groups_count = foo_get_groups_count, |
179 | .get_group_name = foo_get_group_name, | 177 | .get_group_name = foo_get_group_name, |
180 | .get_group_pins = foo_get_group_pins, | 178 | .get_group_pins = foo_get_group_pins, |
181 | }; | 179 | }; |
@@ -186,13 +184,12 @@ static struct pinctrl_desc foo_desc = { | |||
186 | .pctlops = &foo_pctrl_ops, | 184 | .pctlops = &foo_pctrl_ops, |
187 | }; | 185 | }; |
188 | 186 | ||
189 | The pin control subsystem will call the .list_groups() function repeatedly | 187 | The pin control subsystem will call the .get_groups_count() function to |
190 | beginning on 0 until it returns non-zero to determine legal selectors, then | 188 | determine total number of legal selectors, then it will call the other functions |
191 | it will call the other functions to retrieve the name and pins of the group. | 189 | to retrieve the name and pins of the group. Maintaining the data structure of |
192 | Maintaining the data structure of the groups is up to the driver, this is | 190 | the groups is up to the driver, this is just a simple example - in practice you |
193 | just a simple example - in practice you may need more entries in your group | 191 | may need more entries in your group structure, for example specific register |
194 | structure, for example specific register ranges associated with each group | 192 | ranges associated with each group and so on. |
195 | and so on. | ||
196 | 193 | ||
197 | 194 | ||
198 | Pin configuration | 195 | Pin configuration |
@@ -606,11 +603,9 @@ static const struct foo_group foo_groups[] = { | |||
606 | }; | 603 | }; |
607 | 604 | ||
608 | 605 | ||
609 | static int foo_list_groups(struct pinctrl_dev *pctldev, unsigned selector) | 606 | static int foo_get_groups_count(struct pinctrl_dev *pctldev) |
610 | { | 607 | { |
611 | if (selector >= ARRAY_SIZE(foo_groups)) | 608 | return ARRAY_SIZE(foo_groups); |
612 | return -EINVAL; | ||
613 | return 0; | ||
614 | } | 609 | } |
615 | 610 | ||
616 | static const char *foo_get_group_name(struct pinctrl_dev *pctldev, | 611 | static const char *foo_get_group_name(struct pinctrl_dev *pctldev, |
@@ -629,7 +624,7 @@ static int foo_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, | |||
629 | } | 624 | } |
630 | 625 | ||
631 | static struct pinctrl_ops foo_pctrl_ops = { | 626 | static struct pinctrl_ops foo_pctrl_ops = { |
632 | .list_groups = foo_list_groups, | 627 | .get_groups_count = foo_get_groups_count, |
633 | .get_group_name = foo_get_group_name, | 628 | .get_group_name = foo_get_group_name, |
634 | .get_group_pins = foo_get_group_pins, | 629 | .get_group_pins = foo_get_group_pins, |
635 | }; | 630 | }; |
@@ -640,7 +635,7 @@ struct foo_pmx_func { | |||
640 | const unsigned num_groups; | 635 | const unsigned num_groups; |
641 | }; | 636 | }; |
642 | 637 | ||
643 | static const char * const spi0_groups[] = { "spi0_1_grp" }; | 638 | static const char * const spi0_groups[] = { "spi0_0_grp", "spi0_1_grp" }; |
644 | static const char * const i2c0_groups[] = { "i2c0_grp" }; | 639 | static const char * const i2c0_groups[] = { "i2c0_grp" }; |
645 | static const char * const mmc0_groups[] = { "mmc0_1_grp", "mmc0_2_grp", | 640 | static const char * const mmc0_groups[] = { "mmc0_1_grp", "mmc0_2_grp", |
646 | "mmc0_3_grp" }; | 641 | "mmc0_3_grp" }; |
@@ -663,11 +658,9 @@ static const struct foo_pmx_func foo_functions[] = { | |||
663 | }, | 658 | }, |
664 | }; | 659 | }; |
665 | 660 | ||
666 | int foo_list_funcs(struct pinctrl_dev *pctldev, unsigned selector) | 661 | int foo_get_functions_count(struct pinctrl_dev *pctldev) |
667 | { | 662 | { |
668 | if (selector >= ARRAY_SIZE(foo_functions)) | 663 | return ARRAY_SIZE(foo_functions); |
669 | return -EINVAL; | ||
670 | return 0; | ||
671 | } | 664 | } |
672 | 665 | ||
673 | const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) | 666 | const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) |
@@ -703,7 +696,7 @@ void foo_disable(struct pinctrl_dev *pctldev, unsigned selector, | |||
703 | } | 696 | } |
704 | 697 | ||
705 | struct pinmux_ops foo_pmxops = { | 698 | struct pinmux_ops foo_pmxops = { |
706 | .list_functions = foo_list_funcs, | 699 | .get_functions_count = foo_get_functions_count, |
707 | .get_function_name = foo_get_fname, | 700 | .get_function_name = foo_get_fname, |
708 | .get_function_groups = foo_get_groups, | 701 | .get_function_groups = foo_get_groups, |
709 | .enable = foo_enable, | 702 | .enable = foo_enable, |
@@ -786,7 +779,7 @@ and spi on the second function mapping: | |||
786 | 779 | ||
787 | #include <linux/pinctrl/machine.h> | 780 | #include <linux/pinctrl/machine.h> |
788 | 781 | ||
789 | static const struct pinctrl_map __initdata mapping[] = { | 782 | static const struct pinctrl_map mapping[] __initconst = { |
790 | { | 783 | { |
791 | .dev_name = "foo-spi.0", | 784 | .dev_name = "foo-spi.0", |
792 | .name = PINCTRL_STATE_DEFAULT, | 785 | .name = PINCTRL_STATE_DEFAULT, |
@@ -952,13 +945,13 @@ case), we define a mapping like this: | |||
952 | The result of grabbing this mapping from the device with something like | 945 | The result of grabbing this mapping from the device with something like |
953 | this (see next paragraph): | 946 | this (see next paragraph): |
954 | 947 | ||
955 | p = pinctrl_get(dev); | 948 | p = devm_pinctrl_get(dev); |
956 | s = pinctrl_lookup_state(p, "8bit"); | 949 | s = pinctrl_lookup_state(p, "8bit"); |
957 | ret = pinctrl_select_state(p, s); | 950 | ret = pinctrl_select_state(p, s); |
958 | 951 | ||
959 | or more simply: | 952 | or more simply: |
960 | 953 | ||
961 | p = pinctrl_get_select(dev, "8bit"); | 954 | p = devm_pinctrl_get_select(dev, "8bit"); |
962 | 955 | ||
963 | Will be that you activate all the three bottom records in the mapping at | 956 | Will be that you activate all the three bottom records in the mapping at |
964 | once. Since they share the same name, pin controller device, function and | 957 | once. Since they share the same name, pin controller device, function and |
@@ -992,7 +985,7 @@ foo_probe() | |||
992 | /* Allocate a state holder named "foo" etc */ | 985 | /* Allocate a state holder named "foo" etc */ |
993 | struct foo_state *foo = ...; | 986 | struct foo_state *foo = ...; |
994 | 987 | ||
995 | foo->p = pinctrl_get(&device); | 988 | foo->p = devm_pinctrl_get(&device); |
996 | if (IS_ERR(foo->p)) { | 989 | if (IS_ERR(foo->p)) { |
997 | /* FIXME: clean up "foo" here */ | 990 | /* FIXME: clean up "foo" here */ |
998 | return PTR_ERR(foo->p); | 991 | return PTR_ERR(foo->p); |
@@ -1000,24 +993,17 @@ foo_probe() | |||
1000 | 993 | ||
1001 | foo->s = pinctrl_lookup_state(foo->p, PINCTRL_STATE_DEFAULT); | 994 | foo->s = pinctrl_lookup_state(foo->p, PINCTRL_STATE_DEFAULT); |
1002 | if (IS_ERR(foo->s)) { | 995 | if (IS_ERR(foo->s)) { |
1003 | pinctrl_put(foo->p); | ||
1004 | /* FIXME: clean up "foo" here */ | 996 | /* FIXME: clean up "foo" here */ |
1005 | return PTR_ERR(s); | 997 | return PTR_ERR(s); |
1006 | } | 998 | } |
1007 | 999 | ||
1008 | ret = pinctrl_select_state(foo->s); | 1000 | ret = pinctrl_select_state(foo->s); |
1009 | if (ret < 0) { | 1001 | if (ret < 0) { |
1010 | pinctrl_put(foo->p); | ||
1011 | /* FIXME: clean up "foo" here */ | 1002 | /* FIXME: clean up "foo" here */ |
1012 | return ret; | 1003 | return ret; |
1013 | } | 1004 | } |
1014 | } | 1005 | } |
1015 | 1006 | ||
1016 | foo_remove() | ||
1017 | { | ||
1018 | pinctrl_put(state->p); | ||
1019 | } | ||
1020 | |||
1021 | This get/lookup/select/put sequence can just as well be handled by bus drivers | 1007 | This get/lookup/select/put sequence can just as well be handled by bus drivers |
1022 | if you don't want each and every driver to handle it and you know the | 1008 | if you don't want each and every driver to handle it and you know the |
1023 | arrangement on your bus. | 1009 | arrangement on your bus. |
@@ -1029,6 +1015,11 @@ The semantics of the pinctrl APIs are: | |||
1029 | kernel memory to hold the pinmux state. All mapping table parsing or similar | 1015 | kernel memory to hold the pinmux state. All mapping table parsing or similar |
1030 | slow operations take place within this API. | 1016 | slow operations take place within this API. |
1031 | 1017 | ||
1018 | - devm_pinctrl_get() is a variant of pinctrl_get() that causes pinctrl_put() | ||
1019 | to be called automatically on the retrieved pointer when the associated | ||
1020 | device is removed. It is recommended to use this function over plain | ||
1021 | pinctrl_get(). | ||
1022 | |||
1032 | - pinctrl_lookup_state() is called in process context to obtain a handle to a | 1023 | - pinctrl_lookup_state() is called in process context to obtain a handle to a |
1033 | specific state for a the client device. This operation may be slow too. | 1024 | specific state for a the client device. This operation may be slow too. |
1034 | 1025 | ||
@@ -1041,14 +1032,30 @@ The semantics of the pinctrl APIs are: | |||
1041 | 1032 | ||
1042 | - pinctrl_put() frees all information associated with a pinctrl handle. | 1033 | - pinctrl_put() frees all information associated with a pinctrl handle. |
1043 | 1034 | ||
1035 | - devm_pinctrl_put() is a variant of pinctrl_put() that may be used to | ||
1036 | explicitly destroy a pinctrl object returned by devm_pinctrl_get(). | ||
1037 | However, use of this function will be rare, due to the automatic cleanup | ||
1038 | that will occur even without calling it. | ||
1039 | |||
1040 | pinctrl_get() must be paired with a plain pinctrl_put(). | ||
1041 | pinctrl_get() may not be paired with devm_pinctrl_put(). | ||
1042 | devm_pinctrl_get() can optionally be paired with devm_pinctrl_put(). | ||
1043 | devm_pinctrl_get() may not be paired with plain pinctrl_put(). | ||
1044 | |||
1044 | Usually the pin control core handled the get/put pair and call out to the | 1045 | Usually the pin control core handled the get/put pair and call out to the |
1045 | device drivers bookkeeping operations, like checking available functions and | 1046 | device drivers bookkeeping operations, like checking available functions and |
1046 | the associated pins, whereas the enable/disable pass on to the pin controller | 1047 | the associated pins, whereas the enable/disable pass on to the pin controller |
1047 | driver which takes care of activating and/or deactivating the mux setting by | 1048 | driver which takes care of activating and/or deactivating the mux setting by |
1048 | quickly poking some registers. | 1049 | quickly poking some registers. |
1049 | 1050 | ||
1050 | The pins are allocated for your device when you issue the pinctrl_get() call, | 1051 | The pins are allocated for your device when you issue the devm_pinctrl_get() |
1051 | after this you should be able to see this in the debugfs listing of all pins. | 1052 | call, after this you should be able to see this in the debugfs listing of all |
1053 | pins. | ||
1054 | |||
1055 | NOTE: the pinctrl system will return -EPROBE_DEFER if it cannot find the | ||
1056 | requested pinctrl handles, for example if the pinctrl driver has not yet | ||
1057 | registered. Thus make sure that the error path in your driver gracefully | ||
1058 | cleans up and is ready to retry the probing later in the startup process. | ||
1052 | 1059 | ||
1053 | 1060 | ||
1054 | System pin control hogging | 1061 | System pin control hogging |
@@ -1094,13 +1101,13 @@ it, disables and releases it, and muxes it in on the pins defined by group B: | |||
1094 | 1101 | ||
1095 | #include <linux/pinctrl/consumer.h> | 1102 | #include <linux/pinctrl/consumer.h> |
1096 | 1103 | ||
1097 | foo_switch() | 1104 | struct pinctrl *p; |
1098 | { | 1105 | struct pinctrl_state *s1, *s2; |
1099 | struct pinctrl *p; | ||
1100 | struct pinctrl_state *s1, *s2; | ||
1101 | 1106 | ||
1107 | foo_probe() | ||
1108 | { | ||
1102 | /* Setup */ | 1109 | /* Setup */ |
1103 | p = pinctrl_get(&device); | 1110 | p = devm_pinctrl_get(&device); |
1104 | if (IS_ERR(p)) | 1111 | if (IS_ERR(p)) |
1105 | ... | 1112 | ... |
1106 | 1113 | ||
@@ -1111,7 +1118,10 @@ foo_switch() | |||
1111 | s2 = pinctrl_lookup_state(foo->p, "pos-B"); | 1118 | s2 = pinctrl_lookup_state(foo->p, "pos-B"); |
1112 | if (IS_ERR(s2)) | 1119 | if (IS_ERR(s2)) |
1113 | ... | 1120 | ... |
1121 | } | ||
1114 | 1122 | ||
1123 | foo_switch() | ||
1124 | { | ||
1115 | /* Enable on position A */ | 1125 | /* Enable on position A */ |
1116 | ret = pinctrl_select_state(s1); | 1126 | ret = pinctrl_select_state(s1); |
1117 | if (ret < 0) | 1127 | if (ret < 0) |
@@ -1125,8 +1135,6 @@ foo_switch() | |||
1125 | ... | 1135 | ... |
1126 | 1136 | ||
1127 | ... | 1137 | ... |
1128 | |||
1129 | pinctrl_put(p); | ||
1130 | } | 1138 | } |
1131 | 1139 | ||
1132 | The above has to be done from process context. | 1140 | The above has to be done from process context. |
diff --git a/Documentation/power/freezing-of-tasks.txt b/Documentation/power/freezing-of-tasks.txt index ec715cd78fbb..6ec291ea1c78 100644 --- a/Documentation/power/freezing-of-tasks.txt +++ b/Documentation/power/freezing-of-tasks.txt | |||
@@ -9,7 +9,7 @@ architectures). | |||
9 | 9 | ||
10 | II. How does it work? | 10 | II. How does it work? |
11 | 11 | ||
12 | There are four per-task flags used for that, PF_NOFREEZE, PF_FROZEN, TIF_FREEZE | 12 | There are three per-task flags used for that, PF_NOFREEZE, PF_FROZEN |
13 | and PF_FREEZER_SKIP (the last one is auxiliary). The tasks that have | 13 | and PF_FREEZER_SKIP (the last one is auxiliary). The tasks that have |
14 | PF_NOFREEZE unset (all user space processes and some kernel threads) are | 14 | PF_NOFREEZE unset (all user space processes and some kernel threads) are |
15 | regarded as 'freezable' and treated in a special way before the system enters a | 15 | regarded as 'freezable' and treated in a special way before the system enters a |
@@ -17,30 +17,31 @@ suspend state as well as before a hibernation image is created (in what follows | |||
17 | we only consider hibernation, but the description also applies to suspend). | 17 | we only consider hibernation, but the description also applies to suspend). |
18 | 18 | ||
19 | Namely, as the first step of the hibernation procedure the function | 19 | Namely, as the first step of the hibernation procedure the function |
20 | freeze_processes() (defined in kernel/power/process.c) is called. It executes | 20 | freeze_processes() (defined in kernel/power/process.c) is called. A system-wide |
21 | try_to_freeze_tasks() that sets TIF_FREEZE for all of the freezable tasks and | 21 | variable system_freezing_cnt (as opposed to a per-task flag) is used to indicate |
22 | either wakes them up, if they are kernel threads, or sends fake signals to them, | 22 | whether the system is to undergo a freezing operation. And freeze_processes() |
23 | if they are user space processes. A task that has TIF_FREEZE set, should react | 23 | sets this variable. After this, it executes try_to_freeze_tasks() that sends a |
24 | to it by calling the function called __refrigerator() (defined in | 24 | fake signal to all user space processes, and wakes up all the kernel threads. |
25 | kernel/freezer.c), which sets the task's PF_FROZEN flag, changes its state | 25 | All freezable tasks must react to that by calling try_to_freeze(), which |
26 | to TASK_UNINTERRUPTIBLE and makes it loop until PF_FROZEN is cleared for it. | 26 | results in a call to __refrigerator() (defined in kernel/freezer.c), which sets |
27 | Then, we say that the task is 'frozen' and therefore the set of functions | 27 | the task's PF_FROZEN flag, changes its state to TASK_UNINTERRUPTIBLE and makes |
28 | handling this mechanism is referred to as 'the freezer' (these functions are | 28 | it loop until PF_FROZEN is cleared for it. Then, we say that the task is |
29 | defined in kernel/power/process.c, kernel/freezer.c & include/linux/freezer.h). | 29 | 'frozen' and therefore the set of functions handling this mechanism is referred |
30 | User space processes are generally frozen before kernel threads. | 30 | to as 'the freezer' (these functions are defined in kernel/power/process.c, |
31 | kernel/freezer.c & include/linux/freezer.h). User space processes are generally | ||
32 | frozen before kernel threads. | ||
31 | 33 | ||
32 | __refrigerator() must not be called directly. Instead, use the | 34 | __refrigerator() must not be called directly. Instead, use the |
33 | try_to_freeze() function (defined in include/linux/freezer.h), that checks | 35 | try_to_freeze() function (defined in include/linux/freezer.h), that checks |
34 | the task's TIF_FREEZE flag and makes the task enter __refrigerator() if the | 36 | if the task is to be frozen and makes the task enter __refrigerator(). |
35 | flag is set. | ||
36 | 37 | ||
37 | For user space processes try_to_freeze() is called automatically from the | 38 | For user space processes try_to_freeze() is called automatically from the |
38 | signal-handling code, but the freezable kernel threads need to call it | 39 | signal-handling code, but the freezable kernel threads need to call it |
39 | explicitly in suitable places or use the wait_event_freezable() or | 40 | explicitly in suitable places or use the wait_event_freezable() or |
40 | wait_event_freezable_timeout() macros (defined in include/linux/freezer.h) | 41 | wait_event_freezable_timeout() macros (defined in include/linux/freezer.h) |
41 | that combine interruptible sleep with checking if TIF_FREEZE is set and calling | 42 | that combine interruptible sleep with checking if the task is to be frozen and |
42 | try_to_freeze(). The main loop of a freezable kernel thread may look like the | 43 | calling try_to_freeze(). The main loop of a freezable kernel thread may look |
43 | following one: | 44 | like the following one: |
44 | 45 | ||
45 | set_freezable(); | 46 | set_freezable(); |
46 | do { | 47 | do { |
@@ -53,7 +54,7 @@ following one: | |||
53 | (from drivers/usb/core/hub.c::hub_thread()). | 54 | (from drivers/usb/core/hub.c::hub_thread()). |
54 | 55 | ||
55 | If a freezable kernel thread fails to call try_to_freeze() after the freezer has | 56 | If a freezable kernel thread fails to call try_to_freeze() after the freezer has |
56 | set TIF_FREEZE for it, the freezing of tasks will fail and the entire | 57 | initiated a freezing operation, the freezing of tasks will fail and the entire |
57 | hibernation operation will be cancelled. For this reason, freezable kernel | 58 | hibernation operation will be cancelled. For this reason, freezable kernel |
58 | threads must call try_to_freeze() somewhere or use one of the | 59 | threads must call try_to_freeze() somewhere or use one of the |
59 | wait_event_freezable() and wait_event_freezable_timeout() macros. | 60 | wait_event_freezable() and wait_event_freezable_timeout() macros. |
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index 787717091421..d389acd31e19 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -123,7 +123,7 @@ KEY SERVICE OVERVIEW | |||
123 | 123 | ||
124 | The key service provides a number of features besides keys: | 124 | The key service provides a number of features besides keys: |
125 | 125 | ||
126 | (*) The key service defines two special key types: | 126 | (*) The key service defines three special key types: |
127 | 127 | ||
128 | (+) "keyring" | 128 | (+) "keyring" |
129 | 129 | ||
@@ -137,6 +137,18 @@ The key service provides a number of features besides keys: | |||
137 | blobs of data. These can be created, updated and read by userspace, | 137 | blobs of data. These can be created, updated and read by userspace, |
138 | and aren't intended for use by kernel services. | 138 | and aren't intended for use by kernel services. |
139 | 139 | ||
140 | (+) "logon" | ||
141 | |||
142 | Like a "user" key, a "logon" key has a payload that is an arbitrary | ||
143 | blob of data. It is intended as a place to store secrets which are | ||
144 | accessible to the kernel but not to userspace programs. | ||
145 | |||
146 | The description can be arbitrary, but must be prefixed with a non-zero | ||
147 | length string that describes the key "subclass". The subclass is | ||
148 | separated from the rest of the description by a ':'. "logon" keys can | ||
149 | be created and updated from userspace, but the payload is only | ||
150 | readable from kernel space. | ||
151 | |||
140 | (*) Each process subscribes to three keyrings: a thread-specific keyring, a | 152 | (*) Each process subscribes to three keyrings: a thread-specific keyring, a |
141 | process-specific keyring, and a session-specific keyring. | 153 | process-specific keyring, and a session-specific keyring. |
142 | 154 | ||