# GPIO configuration timeline

Source: [https://docs.qualcomm.com/doc/80-88500-4/topic/27_GPIO_configuration_timeline.html](https://docs.qualcomm.com/doc/80-88500-4/topic/27_GPIO_configuration_timeline.html)

A GPIO goes through different configurations during the device operation.

The following are the configurations from boot up to sleep:

1. After the device boots up, GPIOs are initialized in their Default Hardware state.
2. The TLMM driver does the following:
    - Loads and initializes TLMM\_GPIO\_LP\_CFGn registers based on the low-power configuration defined in TLMMChipset.xml file.
    - Configures the GPIOs to their sleep configuration in the TLMMChipset.xml file, if
            DALTLMM\_PRG\_YES is specified for the GPIOs. This initial configuration ensures that any
            unused GPIOs remain at their Low Power state after the device boots up. 
        If it is
              necessary to avoid this type of initial configuration on GPIO, specify DALTLMM\_PRG\_NO
              for a GPIO in the TLMMChipset.xml file.
3. The initialization code of the software module that owns the GPIO must carry out the GPIO
        initialization and configure its GPIO to its active configuration. 
    During its operation,
          it is possible that the configuration of a GPIO is changed. For example, from an alternate
          function pin to a general-purpose I/O pin.
4. When the software module that owns the GPIO goes into sleep, it needs to apply the sleep
        configuration on the GPIO to conserve power. This sleep configuration can be applied by
        calling the TLMM API. 
    For example, when a module calls the
            DalTlMM\_ConfigGpioIdInactive() API to disable a GPIO, the API applies
          the sleep configuration stored in the TLMM\_GPIO\_LP\_CFGn registers.

**Parent Topic:** [GPIO DAL driver](https://docs.qualcomm.com/doc/80-88500-4/topic/25_GPIO_DAL_driver.html)

Last Published: Aug 18, 2023

[Previous Topic
GPIO configurations](https://docs.qualcomm.com/bundle/publicresource/80-88500-4/topics/26_GPIO_configurations.md) [Next Topic
DALTLMM data definitions](https://docs.qualcomm.com/bundle/publicresource/80-88500-4/topics/28_DALTLMM_data_definitions.md)