xref: /freebsd/sys/contrib/dev/acpica/components/resources/rsserial.c (revision 924226fba12cc9a228c73b956e1b7fa24c60b055)
1 /*******************************************************************************
2  *
3  * Module Name: rsserial - GPIO/SerialBus resource descriptors
4  *
5  ******************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************
115  *
116  * Alternatively, you may choose to be licensed under the terms of the
117  * following license:
118  *
119  * Redistribution and use in source and binary forms, with or without
120  * modification, are permitted provided that the following conditions
121  * are met:
122  * 1. Redistributions of source code must retain the above copyright
123  *    notice, this list of conditions, and the following disclaimer,
124  *    without modification.
125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126  *    substantially similar to the "NO WARRANTY" disclaimer below
127  *    ("Disclaimer") and any redistribution must be conditioned upon
128  *    including a substantially similar Disclaimer requirement for further
129  *    binary redistribution.
130  * 3. Neither the names of the above-listed copyright holders nor the names
131  *    of any contributors may be used to endorse or promote products derived
132  *    from this software without specific prior written permission.
133  *
134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145  *
146  * Alternatively, you may choose to be licensed under the terms of the
147  * GNU General Public License ("GPL") version 2 as published by the Free
148  * Software Foundation.
149  *
150  *****************************************************************************/
151 
152 #include <contrib/dev/acpica/include/acpi.h>
153 #include <contrib/dev/acpica/include/accommon.h>
154 #include <contrib/dev/acpica/include/acresrc.h>
155 
156 #define _COMPONENT          ACPI_RESOURCES
157         ACPI_MODULE_NAME    ("rsserial")
158 
159 
160 /*******************************************************************************
161  *
162  * AcpiRsConvertGpio
163  *
164  ******************************************************************************/
165 
166 ACPI_RSCONVERT_INFO     AcpiRsConvertGpio[18] =
167 {
168     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_GPIO,
169                         ACPI_RS_SIZE (ACPI_RESOURCE_GPIO),
170                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)},
171 
172     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_GPIO,
173                         sizeof (AML_RESOURCE_GPIO),
174                         0},
175 
176     /*
177      * These fields are contiguous in both the source and destination:
178      * RevisionId
179      * ConnectionType
180      */
181     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.RevisionId),
182                         AML_OFFSET (Gpio.RevisionId),
183                         2},
184 
185     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer),
186                         AML_OFFSET (Gpio.Flags),
187                         0},
188 
189     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Shareable),
190                         AML_OFFSET (Gpio.IntFlags),
191                         3},
192 
193     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable),
194                         AML_OFFSET (Gpio.IntFlags),
195                         4},
196 
197     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction),
198                         AML_OFFSET (Gpio.IntFlags),
199                         0},
200 
201     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering),
202                         AML_OFFSET (Gpio.IntFlags),
203                         0},
204 
205     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity),
206                         AML_OFFSET (Gpio.IntFlags),
207                         1},
208 
209     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.PinConfig),
210                         AML_OFFSET (Gpio.PinConfig),
211                         1},
212 
213     /*
214      * These fields are contiguous in both the source and destination:
215      * DriveStrength
216      * DebounceTimeout
217      */
218     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.Gpio.DriveStrength),
219                         AML_OFFSET (Gpio.DriveStrength),
220                         2},
221 
222     /* Pin Table */
223 
224     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength),
225                         AML_OFFSET (Gpio.PinTableOffset),
226                         AML_OFFSET (Gpio.ResSourceOffset)},
227 
228     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable),
229                         AML_OFFSET (Gpio.PinTableOffset),
230                         0},
231 
232     /* Resource Source */
233 
234     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index),
235                         AML_OFFSET (Gpio.ResSourceIndex),
236                         1},
237 
238     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength),
239                         AML_OFFSET (Gpio.ResSourceOffset),
240                         AML_OFFSET (Gpio.VendorOffset)},
241 
242     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr),
243                         AML_OFFSET (Gpio.ResSourceOffset),
244                         0},
245 
246     /* Vendor Data */
247 
248     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.Gpio.VendorLength),
249                         AML_OFFSET (Gpio.VendorLength),
250                         1},
251 
252     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.VendorData),
253                         AML_OFFSET (Gpio.VendorOffset),
254                         0},
255 };
256 
257 /*******************************************************************************
258  *
259  * AcpiRsConvertPinfunction
260  *
261  ******************************************************************************/
262 
263 ACPI_RSCONVERT_INFO     AcpiRsConvertPinFunction[13] =
264 {
265     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_FUNCTION,
266                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_FUNCTION),
267                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinFunction)},
268 
269     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_FUNCTION,
270                         sizeof (AML_RESOURCE_PIN_FUNCTION),
271                         0},
272 
273     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.RevisionId),
274                         AML_OFFSET (PinFunction.RevisionId),
275                         1},
276 
277     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinFunction.Shareable),
278                         AML_OFFSET (PinFunction.Flags),
279                         0},
280 
281     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.PinConfig),
282                         AML_OFFSET (PinFunction.PinConfig),
283                         1},
284 
285     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.PinFunction.FunctionNumber),
286                         AML_OFFSET (PinFunction.FunctionNumber),
287                         2},
288 
289     /* Pin Table */
290 
291     /*
292      * It is OK to use GPIO operations here because none of them refer GPIO
293      * structures directly but instead use offsets given here.
294      */
295 
296     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinFunction.PinTableLength),
297                         AML_OFFSET (PinFunction.PinTableOffset),
298                         AML_OFFSET (PinFunction.ResSourceOffset)},
299 
300     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinFunction.PinTable),
301                         AML_OFFSET (PinFunction.PinTableOffset),
302                         0},
303 
304     /* Resource Source */
305 
306     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.Index),
307                         AML_OFFSET (PinFunction.ResSourceIndex),
308                         1},
309 
310     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.StringLength),
311                         AML_OFFSET (PinFunction.ResSourceOffset),
312                         AML_OFFSET (PinFunction.VendorOffset)},
313 
314     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.StringPtr),
315                         AML_OFFSET (PinFunction.ResSourceOffset),
316                         0},
317 
318     /* Vendor Data */
319 
320     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinFunction.VendorLength),
321                         AML_OFFSET (PinFunction.VendorLength),
322                         1},
323 
324     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinFunction.VendorData),
325                         AML_OFFSET (PinFunction.VendorOffset),
326                         0},
327 };
328 
329 
330 /*******************************************************************************
331  *
332  * AcpiRsConvertCsi2SerialBus
333  *
334  ******************************************************************************/
335 
336 ACPI_RSCONVERT_INFO     AcpiRsConvertCsi2SerialBus[14] =
337 {
338     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
339                         ACPI_RS_SIZE (ACPI_RESOURCE_CSI2_SERIALBUS),
340                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertCsi2SerialBus)},
341 
342     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
343                         sizeof (AML_RESOURCE_CSI2_SERIALBUS),
344                         0},
345 
346     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
347                         AML_OFFSET (CommonSerialBus.RevisionId),
348                         1},
349 
350     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.Type),
351                         AML_OFFSET (Csi2SerialBus.Type),
352                         1},
353 
354     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.ProducerConsumer),
355                         AML_OFFSET (Csi2SerialBus.Flags),
356                         1},
357 
358     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.SlaveMode),
359                         AML_OFFSET (Csi2SerialBus.Flags),
360                         0},
361 
362     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.PhyType),
363                         AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
364                         0},
365 
366     {ACPI_RSC_6BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.LocalPortInstance),
367                         AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
368                         2},
369 
370     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.TypeRevisionId),
371                         AML_OFFSET (Csi2SerialBus.TypeRevisionId),
372                         1},
373 
374     /* Vendor data */
375 
376     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorLength),
377                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
378                         AML_RESOURCE_CSI2_MIN_DATA_LEN},
379 
380     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorData),
381                         0,
382                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
383 
384     /* Resource Source */
385 
386     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.Index),
387                         AML_OFFSET (Csi2SerialBus.ResSourceIndex),
388                         1},
389 
390     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringLength),
391                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
392                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
393 
394     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringPtr),
395                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
396                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
397 };
398 
399 
400 /*******************************************************************************
401  *
402  * AcpiRsConvertI2cSerialBus
403  *
404  ******************************************************************************/
405 
406 ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[17] =
407 {
408     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
409                         ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
410                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)},
411 
412     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
413                         sizeof (AML_RESOURCE_I2C_SERIALBUS),
414                         0},
415 
416     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
417                         AML_OFFSET (CommonSerialBus.RevisionId),
418                         1},
419 
420     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
421                         AML_OFFSET (CommonSerialBus.Type),
422                         1},
423 
424     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
425                         AML_OFFSET (CommonSerialBus.Flags),
426                         0},
427 
428     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
429                         AML_OFFSET (CommonSerialBus.Flags),
430                         1},
431 
432     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
433                         AML_OFFSET (CommonSerialBus.Flags),
434                         2},
435 
436     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
437                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
438                         1},
439 
440     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
441                         AML_OFFSET (CommonSerialBus.TypeDataLength),
442                         1},
443 
444     /* Vendor data */
445 
446     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
447                         AML_OFFSET (CommonSerialBus.TypeDataLength),
448                         AML_RESOURCE_I2C_MIN_DATA_LEN},
449 
450     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
451                         0,
452                         sizeof (AML_RESOURCE_I2C_SERIALBUS)},
453 
454     /* Resource Source */
455 
456     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
457                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
458                         1},
459 
460     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
461                         AML_OFFSET (CommonSerialBus.TypeDataLength),
462                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
463 
464     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
465                         AML_OFFSET (CommonSerialBus.TypeDataLength),
466                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
467 
468     /* I2C bus type specific */
469 
470     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode),
471                         AML_OFFSET (I2cSerialBus.TypeSpecificFlags),
472                         0},
473 
474     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed),
475                         AML_OFFSET (I2cSerialBus.ConnectionSpeed),
476                         1},
477 
478     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress),
479                         AML_OFFSET (I2cSerialBus.SlaveAddress),
480                         1},
481 };
482 
483 
484 /*******************************************************************************
485  *
486  * AcpiRsConvertSpiSerialBus
487  *
488  ******************************************************************************/
489 
490 ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[21] =
491 {
492     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
493                         ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
494                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)},
495 
496     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
497                         sizeof (AML_RESOURCE_SPI_SERIALBUS),
498                         0},
499 
500     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
501                         AML_OFFSET (CommonSerialBus.RevisionId),
502                         1},
503 
504     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
505                         AML_OFFSET (CommonSerialBus.Type),
506                         1},
507 
508     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
509                         AML_OFFSET (CommonSerialBus.Flags),
510                         0},
511 
512     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
513                         AML_OFFSET (CommonSerialBus.Flags),
514                         1},
515 
516     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
517                         AML_OFFSET (CommonSerialBus.Flags),
518                         2},
519 
520     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
521                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
522                         1},
523 
524     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
525                         AML_OFFSET (CommonSerialBus.TypeDataLength),
526                         1},
527 
528     /* Vendor data */
529 
530     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
531                         AML_OFFSET (CommonSerialBus.TypeDataLength),
532                         AML_RESOURCE_SPI_MIN_DATA_LEN},
533 
534     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
535                         0,
536                         sizeof (AML_RESOURCE_SPI_SERIALBUS)},
537 
538     /* Resource Source */
539 
540     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
541                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
542                         1},
543 
544     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
545                         AML_OFFSET (CommonSerialBus.TypeDataLength),
546                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
547 
548     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
549                         AML_OFFSET (CommonSerialBus.TypeDataLength),
550                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
551 
552     /* Spi bus type specific  */
553 
554     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode),
555                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
556                         0},
557 
558     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity),
559                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
560                         1},
561 
562     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength),
563                         AML_OFFSET (SpiSerialBus.DataBitLength),
564                         1},
565 
566     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase),
567                         AML_OFFSET (SpiSerialBus.ClockPhase),
568                         1},
569 
570     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity),
571                         AML_OFFSET (SpiSerialBus.ClockPolarity),
572                         1},
573 
574     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection),
575                         AML_OFFSET (SpiSerialBus.DeviceSelection),
576                         1},
577 
578     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed),
579                         AML_OFFSET (SpiSerialBus.ConnectionSpeed),
580                         1},
581 };
582 
583 
584 /*******************************************************************************
585  *
586  * AcpiRsConvertUartSerialBus
587  *
588  ******************************************************************************/
589 
590 ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[23] =
591 {
592     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
593                         ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
594                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)},
595 
596     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
597                         sizeof (AML_RESOURCE_UART_SERIALBUS),
598                         0},
599 
600     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
601                         AML_OFFSET (CommonSerialBus.RevisionId),
602                         1},
603 
604     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
605                         AML_OFFSET (CommonSerialBus.Type),
606                         1},
607 
608     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
609                         AML_OFFSET (CommonSerialBus.Flags),
610                         0},
611 
612     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
613                         AML_OFFSET (CommonSerialBus.Flags),
614                         1},
615 
616     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
617                         AML_OFFSET (CommonSerialBus.Flags),
618                         2},
619 
620     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
621                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
622                         1},
623 
624     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
625                         AML_OFFSET (CommonSerialBus.TypeDataLength),
626                         1},
627 
628     /* Vendor data */
629 
630     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
631                         AML_OFFSET (CommonSerialBus.TypeDataLength),
632                         AML_RESOURCE_UART_MIN_DATA_LEN},
633 
634     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
635                         0,
636                         sizeof (AML_RESOURCE_UART_SERIALBUS)},
637 
638     /* Resource Source */
639 
640     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
641                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
642                         1},
643 
644     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
645                         AML_OFFSET (CommonSerialBus.TypeDataLength),
646                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
647 
648     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
649                         AML_OFFSET (CommonSerialBus.TypeDataLength),
650                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
651 
652     /* Uart bus type specific  */
653 
654     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl),
655                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
656                         0},
657 
658     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits),
659                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
660                         2},
661 
662     {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits),
663                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
664                         4},
665 
666     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian),
667                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
668                         7},
669 
670     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.Parity),
671                         AML_OFFSET (UartSerialBus.Parity),
672                         1},
673 
674     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled),
675                         AML_OFFSET (UartSerialBus.LinesEnabled),
676                         1},
677 
678     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize),
679                         AML_OFFSET (UartSerialBus.RxFifoSize),
680                         1},
681 
682     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize),
683                         AML_OFFSET (UartSerialBus.TxFifoSize),
684                         1},
685 
686     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate),
687                         AML_OFFSET (UartSerialBus.DefaultBaudRate),
688                         1},
689 };
690 
691 
692 /*******************************************************************************
693  *
694  * AcpiRsConvertPinConfig
695  *
696  ******************************************************************************/
697 
698 ACPI_RSCONVERT_INFO     AcpiRsConvertPinConfig[14] =
699 {
700     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_CONFIG,
701                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_CONFIG),
702                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinConfig)},
703 
704     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_CONFIG,
705                         sizeof (AML_RESOURCE_PIN_CONFIG),
706                         0},
707 
708     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.RevisionId),
709                         AML_OFFSET (PinConfig.RevisionId),
710                         1},
711 
712     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.Shareable),
713                         AML_OFFSET (PinConfig.Flags),
714                         0},
715 
716     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.ProducerConsumer),
717                         AML_OFFSET (PinConfig.Flags),
718                         1},
719 
720     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.PinConfigType),
721                         AML_OFFSET (PinConfig.PinConfigType),
722                         1},
723 
724     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.PinConfig.PinConfigValue),
725                         AML_OFFSET (PinConfig.PinConfigValue),
726                         1},
727 
728     /* Pin Table */
729 
730     /*
731      * It is OK to use GPIO operations here because none of them refer GPIO
732      * structures directly but instead use offsets given here.
733      */
734 
735     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinConfig.PinTableLength),
736                         AML_OFFSET (PinConfig.PinTableOffset),
737                         AML_OFFSET (PinConfig.ResSourceOffset)},
738 
739     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinConfig.PinTable),
740                         AML_OFFSET (PinConfig.PinTableOffset),
741                         0},
742 
743     /* Resource Source */
744 
745     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.Index),
746                         AML_OFFSET (PinConfig.ResSourceIndex),
747                         1},
748 
749     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.StringLength),
750                         AML_OFFSET (PinConfig.ResSourceOffset),
751                         AML_OFFSET (PinConfig.VendorOffset)},
752 
753     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.StringPtr),
754                         AML_OFFSET (PinConfig.ResSourceOffset),
755                         0},
756 
757     /* Vendor Data */
758 
759     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinConfig.VendorLength),
760                         AML_OFFSET (PinConfig.VendorLength),
761                         1},
762 
763     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinConfig.VendorData),
764                         AML_OFFSET (PinConfig.VendorOffset),
765                         0},
766 };
767 
768 /*******************************************************************************
769  *
770  * AcpiRsConvertPinGroup
771  *
772  ******************************************************************************/
773 
774 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroup[10] =
775 {
776     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP,
777                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP),
778                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroup)},
779 
780     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP,
781                         sizeof (AML_RESOURCE_PIN_GROUP),
782                         0},
783 
784     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroup.RevisionId),
785                         AML_OFFSET (PinGroup.RevisionId),
786                         1},
787 
788     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroup.ProducerConsumer),
789                         AML_OFFSET (PinGroup.Flags),
790                         0},
791 
792     /* Pin Table */
793 
794     /*
795      * It is OK to use GPIO operations here because none of them refer GPIO
796      * structures directly but instead use offsets given here.
797      */
798 
799     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinGroup.PinTableLength),
800                         AML_OFFSET (PinGroup.PinTableOffset),
801                         AML_OFFSET (PinGroup.LabelOffset)},
802 
803     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinGroup.PinTable),
804                         AML_OFFSET (PinGroup.PinTableOffset),
805                         0},
806 
807     /* Resource Label */
808 
809     {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.PinGroup.ResourceLabel.StringLength),
810                         AML_OFFSET (PinGroup.LabelOffset),
811                         AML_OFFSET (PinGroup.VendorOffset)},
812 
813     {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.PinGroup.ResourceLabel.StringPtr),
814                         AML_OFFSET (PinGroup.LabelOffset),
815                         0},
816 
817     /* Vendor Data */
818 
819     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroup.VendorLength),
820                         AML_OFFSET (PinGroup.VendorLength),
821                         1},
822 
823     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroup.VendorData),
824                         AML_OFFSET (PinGroup.VendorOffset),
825                         0},
826 };
827 
828 /*******************************************************************************
829  *
830  * AcpiRsConvertPinGroupFunction
831  *
832  ******************************************************************************/
833 
834 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroupFunction[13] =
835 {
836     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION,
837                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_FUNCTION),
838                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroupFunction)},
839 
840     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION,
841                         sizeof (AML_RESOURCE_PIN_GROUP_FUNCTION),
842                         0},
843 
844     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupFunction.RevisionId),
845                         AML_OFFSET (PinGroupFunction.RevisionId),
846                         1},
847 
848     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.Shareable),
849                         AML_OFFSET (PinGroupFunction.Flags),
850                         0},
851 
852     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.ProducerConsumer),
853                         AML_OFFSET (PinGroupFunction.Flags),
854                         1},
855 
856     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.PinGroupFunction.FunctionNumber),
857                         AML_OFFSET (PinGroupFunction.FunctionNumber),
858                         1},
859 
860     /* Resource Source */
861 
862     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.Index),
863                         AML_OFFSET (PinGroupFunction.ResSourceIndex),
864                         1},
865 
866     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.StringLength),
867                         AML_OFFSET (PinGroupFunction.ResSourceOffset),
868                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset)},
869 
870     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.StringPtr),
871                         AML_OFFSET (PinGroupFunction.ResSourceOffset),
872                         0},
873 
874     /* Resource Source Label */
875 
876     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSourceLabel.StringLength),
877                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset),
878                         AML_OFFSET (PinGroupFunction.VendorOffset)},
879 
880     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSourceLabel.StringPtr),
881                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset),
882                         0},
883 
884     /* Vendor Data */
885 
886     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroupFunction.VendorLength),
887                         AML_OFFSET (PinGroupFunction.VendorLength),
888                         1},
889 
890     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.VendorData),
891                         AML_OFFSET (PinGroupFunction.VendorOffset),
892                         0},
893 };
894 
895 /*******************************************************************************
896  *
897  * AcpiRsConvertPinGroupConfig
898  *
899  ******************************************************************************/
900 
901 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroupConfig[14] =
902 {
903     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG,
904                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_CONFIG),
905                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroupConfig)},
906 
907     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG,
908                         sizeof (AML_RESOURCE_PIN_GROUP_CONFIG),
909                         0},
910 
911     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.RevisionId),
912                         AML_OFFSET (PinGroupConfig.RevisionId),
913                         1},
914 
915     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.Shareable),
916                         AML_OFFSET (PinGroupConfig.Flags),
917                         0},
918 
919     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.ProducerConsumer),
920                         AML_OFFSET (PinGroupConfig.Flags),
921                         1},
922 
923     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.PinConfigType),
924                         AML_OFFSET (PinGroupConfig.PinConfigType),
925                         1},
926 
927     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.PinGroupConfig.PinConfigValue),
928                         AML_OFFSET (PinGroupConfig.PinConfigValue),
929                         1},
930 
931     /* Resource Source */
932 
933     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.Index),
934                         AML_OFFSET (PinGroupConfig.ResSourceIndex),
935                         1},
936 
937     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.StringLength),
938                         AML_OFFSET (PinGroupConfig.ResSourceOffset),
939                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset)},
940 
941     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.StringPtr),
942                         AML_OFFSET (PinGroupConfig.ResSourceOffset),
943                         0},
944 
945     /* Resource Source Label */
946 
947     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSourceLabel.StringLength),
948                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset),
949                         AML_OFFSET (PinGroupConfig.VendorOffset)},
950 
951     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSourceLabel.StringPtr),
952                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset),
953                         0},
954 
955     /* Vendor Data */
956 
957     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroupConfig.VendorLength),
958                         AML_OFFSET (PinGroupConfig.VendorLength),
959                         1},
960 
961     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.VendorData),
962                         AML_OFFSET (PinGroupConfig.VendorOffset),
963                         0},
964 };
965