xref: /linux/drivers/acpi/acpica/utresdecode.c (revision 44f57d78)
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /*******************************************************************************
3  *
4  * Module Name: utresdecode - Resource descriptor keyword strings
5  *
6  ******************************************************************************/
7 
8 #include <acpi/acpi.h>
9 #include "accommon.h"
10 #include "acresrc.h"
11 
12 #define _COMPONENT          ACPI_UTILITIES
13 ACPI_MODULE_NAME("utresdecode")
14 
15 #if defined (ACPI_DEBUG_OUTPUT) || \
16 	defined (ACPI_DISASSEMBLER) || \
17 	defined (ACPI_DEBUGGER)
18 /*
19  * Strings used to decode resource descriptors.
20  * Used by both the disassembler and the debugger resource dump routines
21  */
22 const char *acpi_gbl_bm_decode[] = {
23 	"NotBusMaster",
24 	"BusMaster"
25 };
26 
27 const char *acpi_gbl_config_decode[] = {
28 	"0 - Good Configuration",
29 	"1 - Acceptable Configuration",
30 	"2 - Suboptimal Configuration",
31 	"3 - ***Invalid Configuration***",
32 };
33 
34 const char *acpi_gbl_consume_decode[] = {
35 	"ResourceProducer",
36 	"ResourceConsumer"
37 };
38 
39 const char *acpi_gbl_dec_decode[] = {
40 	"PosDecode",
41 	"SubDecode"
42 };
43 
44 const char *acpi_gbl_he_decode[] = {
45 	"Level",
46 	"Edge"
47 };
48 
49 const char *acpi_gbl_io_decode[] = {
50 	"Decode10",
51 	"Decode16"
52 };
53 
54 const char *acpi_gbl_ll_decode[] = {
55 	"ActiveHigh",
56 	"ActiveLow",
57 	"ActiveBoth",
58 	"Reserved"
59 };
60 
61 const char *acpi_gbl_max_decode[] = {
62 	"MaxNotFixed",
63 	"MaxFixed"
64 };
65 
66 const char *acpi_gbl_mem_decode[] = {
67 	"NonCacheable",
68 	"Cacheable",
69 	"WriteCombining",
70 	"Prefetchable"
71 };
72 
73 const char *acpi_gbl_min_decode[] = {
74 	"MinNotFixed",
75 	"MinFixed"
76 };
77 
78 const char *acpi_gbl_mtp_decode[] = {
79 	"AddressRangeMemory",
80 	"AddressRangeReserved",
81 	"AddressRangeACPI",
82 	"AddressRangeNVS"
83 };
84 
85 const char *acpi_gbl_rng_decode[] = {
86 	"InvalidRanges",
87 	"NonISAOnlyRanges",
88 	"ISAOnlyRanges",
89 	"EntireRange"
90 };
91 
92 const char *acpi_gbl_rw_decode[] = {
93 	"ReadOnly",
94 	"ReadWrite"
95 };
96 
97 const char *acpi_gbl_shr_decode[] = {
98 	"Exclusive",
99 	"Shared",
100 	"ExclusiveAndWake",	/* ACPI 5.0 */
101 	"SharedAndWake"		/* ACPI 5.0 */
102 };
103 
104 const char *acpi_gbl_siz_decode[] = {
105 	"Transfer8",
106 	"Transfer8_16",
107 	"Transfer16",
108 	"InvalidSize"
109 };
110 
111 const char *acpi_gbl_trs_decode[] = {
112 	"DenseTranslation",
113 	"SparseTranslation"
114 };
115 
116 const char *acpi_gbl_ttp_decode[] = {
117 	"TypeStatic",
118 	"TypeTranslation"
119 };
120 
121 const char *acpi_gbl_typ_decode[] = {
122 	"Compatibility",
123 	"TypeA",
124 	"TypeB",
125 	"TypeF"
126 };
127 
128 const char *acpi_gbl_ppc_decode[] = {
129 	"PullDefault",
130 	"PullUp",
131 	"PullDown",
132 	"PullNone"
133 };
134 
135 const char *acpi_gbl_ior_decode[] = {
136 	"IoRestrictionNone",
137 	"IoRestrictionInputOnly",
138 	"IoRestrictionOutputOnly",
139 	"IoRestrictionNoneAndPreserve"
140 };
141 
142 const char *acpi_gbl_dts_decode[] = {
143 	"Width8bit",
144 	"Width16bit",
145 	"Width32bit",
146 	"Width64bit",
147 	"Width128bit",
148 	"Width256bit",
149 };
150 
151 /* GPIO connection type */
152 
153 const char *acpi_gbl_ct_decode[] = {
154 	"Interrupt",
155 	"I/O"
156 };
157 
158 /* Serial bus type */
159 
160 const char *acpi_gbl_sbt_decode[] = {
161 	"/* UNKNOWN serial bus type */",
162 	"I2C",
163 	"SPI",
164 	"UART"
165 };
166 
167 /* I2C serial bus access mode */
168 
169 const char *acpi_gbl_am_decode[] = {
170 	"AddressingMode7Bit",
171 	"AddressingMode10Bit"
172 };
173 
174 /* I2C serial bus slave mode */
175 
176 const char *acpi_gbl_sm_decode[] = {
177 	"ControllerInitiated",
178 	"DeviceInitiated"
179 };
180 
181 /* SPI serial bus wire mode */
182 
183 const char *acpi_gbl_wm_decode[] = {
184 	"FourWireMode",
185 	"ThreeWireMode"
186 };
187 
188 /* SPI serial clock phase */
189 
190 const char *acpi_gbl_cph_decode[] = {
191 	"ClockPhaseFirst",
192 	"ClockPhaseSecond"
193 };
194 
195 /* SPI serial bus clock polarity */
196 
197 const char *acpi_gbl_cpo_decode[] = {
198 	"ClockPolarityLow",
199 	"ClockPolarityHigh"
200 };
201 
202 /* SPI serial bus device polarity */
203 
204 const char *acpi_gbl_dp_decode[] = {
205 	"PolarityLow",
206 	"PolarityHigh"
207 };
208 
209 /* UART serial bus endian */
210 
211 const char *acpi_gbl_ed_decode[] = {
212 	"LittleEndian",
213 	"BigEndian"
214 };
215 
216 /* UART serial bus bits per byte */
217 
218 const char *acpi_gbl_bpb_decode[] = {
219 	"DataBitsFive",
220 	"DataBitsSix",
221 	"DataBitsSeven",
222 	"DataBitsEight",
223 	"DataBitsNine",
224 	"/* UNKNOWN Bits per byte */",
225 	"/* UNKNOWN Bits per byte */",
226 	"/* UNKNOWN Bits per byte */"
227 };
228 
229 /* UART serial bus stop bits */
230 
231 const char *acpi_gbl_sb_decode[] = {
232 	"StopBitsZero",
233 	"StopBitsOne",
234 	"StopBitsOnePlusHalf",
235 	"StopBitsTwo"
236 };
237 
238 /* UART serial bus flow control */
239 
240 const char *acpi_gbl_fc_decode[] = {
241 	"FlowControlNone",
242 	"FlowControlHardware",
243 	"FlowControlXON",
244 	"/* UNKNOWN flow control keyword */"
245 };
246 
247 /* UART serial bus parity type */
248 
249 const char *acpi_gbl_pt_decode[] = {
250 	"ParityTypeNone",
251 	"ParityTypeEven",
252 	"ParityTypeOdd",
253 	"ParityTypeMark",
254 	"ParityTypeSpace",
255 	"/* UNKNOWN parity keyword */",
256 	"/* UNKNOWN parity keyword */",
257 	"/* UNKNOWN parity keyword */"
258 };
259 
260 /* pin_config type */
261 
262 const char *acpi_gbl_ptyp_decode[] = {
263 	"Default",
264 	"Bias Pull-up",
265 	"Bias Pull-down",
266 	"Bias Default",
267 	"Bias Disable",
268 	"Bias High Impedance",
269 	"Bias Bus Hold",
270 	"Drive Open Drain",
271 	"Drive Open Source",
272 	"Drive Push Pull",
273 	"Drive Strength",
274 	"Slew Rate",
275 	"Input Debounce",
276 	"Input Schmitt Trigger",
277 };
278 
279 #endif
280