Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

int mxc_request_iomux ( iomux_pin_name_t  pin,
iomux_pin_cfg_t  config 
)

Request ownership for an IO pin. This function has to be the first one being called before that pin is used. The caller has to check the return value to make sure it returns 0.

Parameters:
pin a name defined by iomux_pin_name_t
config config as defined in iomux_pin_ocfg_t
Returns:
0 if successful; Non-zero otherwise
Request ownership for an IO pin. This function has to be the first one being called before that pin is used. The caller has to check the return value to make sure it returns 0.

Parameters:
pin a name defined by iomux_pin_name_t
cfg an input function as defined in iomux_pin_cfg_t
Returns:
0 if successful; Non-zero otherwise
Request ownership for an IO pin. This function has to be the first one being called before that pin is used. The caller has to check the return value to make sure it returns 0.

Parameters:
pin a name defined by iomux_pin_name_t
config a configuration as defined in iomux_pin_cfg_t
Returns:
0 if successful; Non-zero otherwise

Definition at line 103 of file iomux.c.

References IOMUX_CONFIG_GPIO, iomux_config_mux(), MUX_CONFIG_FUNC, MUX_CONFIG_GPIO, and MUX_CONFIG_SION.

Referenced by gpio_activate_audio_ports(), gpio_activate_bt_audio_port(), gpio_activate_esai_ports(), gpio_ata_active(), gpio_ata_inactive(), gpio_can_active(), gpio_fec_active(), gpio_fec_inactive(), gpio_firi_inactive(), gpio_gps_active(), gpio_i2c_active(), gpio_i2c_inactive(), gpio_keypad_active(), gpio_keypad_inactive(), gpio_lcd_active(), gpio_lcdc_active(), gpio_mlb_active(), gpio_pcmcia_active(), gpio_pmic_active(), gpio_sdhc_active(), gpio_sdhc_inactive(), gpio_sensor_active(), gpio_sensor_inactive(), gpio_spdif_active(), gpio_spi_active(), gpio_tsc_active(), gpio_uart_active(), gpio_uart_inactive(), gpio_usbotg_fs_active(), init_dvfs_controller(), mx25_3stack_gpio_init(), mx31ads_gpio_init(), mx35_3stack_gpio_init(), mxc_board_init(), mxc_init_power_key(), and slcd_gpio_config().

{
      int ret = iomux_config_mux(pin, cfg);
      if (IOMUX_TO_GPIO(pin) < MXC_GPIO_IRQS) {
            if (((cfg & (~MUX_CONFIG_SION)) == MUX_CONFIG_GPIO) ||
                (((cfg & (~MUX_CONFIG_SION)) == MUX_CONFIG_FUNC) &&
                 ((pin == MX25_PIN_GPIO_A) || (pin == MX25_PIN_GPIO_B) ||
                  (pin == MX25_PIN_GPIO_C) || (pin == MX25_PIN_GPIO_D) ||
                  (pin == MX25_PIN_GPIO_E) || (pin == MX25_PIN_GPIO_F))))
                  ret |= gpio_request(IOMUX_TO_GPIO(pin), NULL);
      }
      return ret;
}


Generated by  Doxygen 1.6.0   Back to index