FreeBSD/sys/contrib/dev/acpica/compiler/aslmapenter.c
/*******************************************************************************
 *
 * FUNCTION:    MpSaveGpioInfo
 *
 * PARAMETERS:  Resource                - GPIO resource descriptor
 *              PinCount                - From GPIO descriptor
 *              PinList                 - From GPIO descriptor
 *              DeviceName              - The "ResourceSource" name
 *
 * RETURN:      None
 *
 * DESCRIPTION: External Interface.
 *              Save GPIO resource descriptor information.
 *              Creates new GPIO info blocks, one for each pin defined by the
 *              GPIO descriptor.
 *
 ******************************************************************************/
MpSaveGpioInfo
PARAMETERS:  Resource                - GPIO resource descriptor
PinCount                - From GPIO descriptor
PinList                 - From GPIO descriptor
DeviceName              - The "ResourceSource" name

None

External Interface.
Save GPIO resource descriptor information.
Creates new GPIO info blocks, one for each pin defined by the
GPIO descriptor.
MpSaveGpioInfo PARAMETERS : Resource - GPIO resource descriptor PinCount - From GPIO descriptor PinList - From GPIO descriptor DeviceName - The " ResourceSource " name None External Interface . Save GPIO resource descriptor information . Creates new GPIO info blocks one for each pin defined by the GPIO descriptor .
void
MpSaveGpioInfo (
    ACPI_PARSE_OBJECT       *Op,
    AML_RESOURCE            *Resource,
    UINT32                  PinCount,
    UINT16                  *PinList,
    char                    *DeviceName)
{
    ACPI_GPIO_INFO          *Info;
    UINT32                  i;
    if (!Gbl_MapfileFlag)
    {
        return;
    }
    for (i = 0; i < PinCount; i++)
    {
        Info = MpCreateGpioInfo (PinList[i], DeviceName);
        Info->Op = Op;
        Info->DeviceName = DeviceName;
        Info->PinCount = PinCount;
        Info->PinIndex = i;
        Info->PinNumber = PinList[i];
        Info->Type = Resource->Gpio.ConnectionType;
        Info->Direction = (UINT8) (Resource->Gpio.IntFlags & 0x0003);       
        Info->Polarity = (UINT8) ((Resource->Gpio.IntFlags >> 1) & 0x0003); 
    }
}
void MpSaveGpioInfo ( ACPI_PARSE_OBJECT * Op , AML_RESOURCE * Resource , UINT32 PinCount , UINT16 * PinList , char * DeviceName ) { ACPI_GPIO_INFO * Info ; UINT32 i ; if ( ! Gbl_MapfileFlag ) { return ; } for ( i = 0 ; i < PinCount ; i ++ ) { Info = MpCreateGpioInfo ( PinList [ i ] , DeviceName ) ; Info -> Op = Op ; Info -> DeviceName = DeviceName ; Info -> PinCount = PinCount ; Info -> PinIndex = i ; Info -> PinNumber = PinList [ i ] ; Info -> Type = Resource -> Gpio . ConnectionType ; Info -> Direction = ( UINT8 ) ( Resource -> Gpio . IntFlags & 0x0003 ) ; Info -> Polarity = ( UINT8 ) ( ( Resource -> Gpio . IntFlags >> 1 ) & 0x0003 ) ; } }
FUNCTION:    MpSaveGpioInfo
 PARAMETERS:  Resource                - GPIO resource descriptor
              PinCount                - From GPIO descriptor
              PinList                 - From GPIO descriptor
              DeviceName              - The "ResourceSource" name
FUNCTION : MpSaveGpioInfo PARAMETERS : Resource - GPIO resource descriptor PinCount - From GPIO descriptor PinList - From GPIO descriptor DeviceName - The " ResourceSource " name
/* Mapfile option enabled? */ /* Create an info block for each pin defined in the descriptor */ /* _IOR, for IO descriptor */ /* _POL, for INT descriptor */