本文整理汇总了C++中IOMUX_TO_IRQ函数的典型用法代码示例。如果您正苦于以下问题:C++ IOMUX_TO_IRQ函数的具体用法?C++ IOMUX_TO_IRQ怎么用?C++ IOMUX_TO_IRQ使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IOMUX_TO_IRQ函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sdhc_intr_clear
/*!
* Invert the IOMUX/GPIO for SDHC1 SD1_DET.
*
* @param flag Flag represents whether the card is inserted/removed.
* Using this sensitive level of GPIO signal is changed.
*
**/
void sdhc_intr_clear(int flag)
{
if (flag) {
set_irq_type(IOMUX_TO_IRQ(PIN_GPIO37), IRQT_FALLING);
} else {
set_irq_type(IOMUX_TO_IRQ(PIN_GPIO37), IRQT_RISING);
}
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:15,代码来源:i30030evb_gpio.c
示例2: sdhc_intr_clear
/*!
* Invert the IOMUX/GPIO for SDHC1 SD1_DET.
*
* @param flag Flag represents whether the mmc card is inserted/removed.
* Using this sensitive level of GPIO signal is changed.
*
**/
void sdhc_intr_clear(int flag)
{
if (flag) {
set_irq_type(IOMUX_TO_IRQ(SP_SD2_DAT1), IRQT_FALLING);
} else {
set_irq_type(IOMUX_TO_IRQ(SP_SD2_DAT1), IRQT_RISING);
}
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:15,代码来源:mxc27530evb_gpio.c
示例3: mx31_3ds_sdhc1_init
static int mx31_3ds_sdhc1_init(struct device *dev,
irq_handler_t detect_irq,
void *data)
{
int ret;
ret = gpio_request_array(mx31_3ds_sdhc1_gpios,
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
if (ret) {
pr_warning("Unable to request the SD/MMC GPIOs.\n");
return ret;
}
ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
detect_irq, IRQF_DISABLED |
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
"sdhc1-detect", data);
if (ret) {
pr_warning("Unable to request the SD/MMC card-detect IRQ.\n");
goto gpio_free;
}
return 0;
gpio_free:
gpio_free_array(mx31_3ds_sdhc1_gpios,
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
return ret;
}
开发者ID:mesosexy,项目名称:linux-2.6,代码行数:29,代码来源:mach-mx31_3ds.c
示例4: pcm970_sdhc1_init
static int pcm970_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
void *data)
{
int ret;
ret = gpio_request(SDHC1_GPIO_DET, "sdhc-detect");
if (ret)
return ret;
gpio_direction_input(SDHC1_GPIO_DET);
#ifdef PCM970_SDHC_RW_SWITCH
ret = gpio_request(SDHC1_GPIO_WP, "sdhc-wp");
if (ret)
goto err_gpio_free;
gpio_direction_input(SDHC1_GPIO_WP);
#endif
ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), detect_irq,
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
"sdhc-detect", data);
if (ret)
goto err_gpio_free_2;
return 0;
err_gpio_free_2:
#ifdef PCM970_SDHC_RW_SWITCH
gpio_free(SDHC1_GPIO_WP);
err_gpio_free:
#endif
gpio_free(SDHC1_GPIO_DET);
return ret;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:35,代码来源:mach-pcm037.c
示例5: TRACE_MSG0
/*!
* zasevb_isp1301_bh()- call isp1301 bottom half handler
* @param arg
* This is a wrapper to the isp1301 bottom half handler, it
* re-enables the gpio interrupt after processing complete.
*/
void *zasevb_isp1301_bh(void *arg)
{
TRACE_MSG0(REMOVE_TCD, "ZASEVB GPIO INTERRUPT: ISP1301_BH");
isp1301_bh(arg);
TRACE_MSG0(REMOVE_TCD, "ZASEVB GPIO INTERRUPT: REENABLE");
if (zasevb_int_disabled) {
zasevb_int_disabled = FALSE;
enable_irq(IOMUX_TO_IRQ(PIN_GPIO2));
}
return 0;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:18,代码来源:mxc91331-gpio.c
示例6: mxc_iomux_gpio_isp1301_set
int mxc_iomux_gpio_isp1301_set (struct otg_instance *otg, int usb_mode)
{
int gpio = 1;
printk (KERN_INFO"MXC gpio setting for isp1301\n");
isp1301_mod_init(otg, &zasevb_isp1301_bh);
TRACE_MSG0(otg->tcd->TAG, "5. IOMUX and GPIO Interrupt Configuration");
iomux_config_mux(PIN_GPIO2, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
//Setting interrupt for ISP1301
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
set_irq_type(IOMUX_TO_IRQ(PIN_GPIO2), IRQF_TRIGGER_FALLING);
#else
set_irq_type(IOMUX_TO_IRQ(PIN_GPIO2), IRQT_FALLING);
#endif
gpio = request_irq(IOMUX_TO_IRQ(PIN_GPIO2), zasevb_gpio_int_hndlr,
0, "ISP1301", (void *)&ocd_ops);
THROW_IF(gpio, error);
iomux_config_mux(PIN_USB_XRXD, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
iomux_config_mux(PIN_USB_VMOUT, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
iomux_config_mux(PIN_USB_VPOUT, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
iomux_config_mux(PIN_USB_VPIN, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
iomux_config_mux(PIN_USB_TXENB, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
iomux_config_mux(PIN_USB_VMIN, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
CATCH(error) {
printk(KERN_INFO"%s: failed\n", __FUNCTION__);
UNLESS (gpio) gpio_free_irq (ZGPIO_PORT, ZGPIO_PIN, GPIO_HIGH_PRIO);
return -EINVAL;
}
return 0;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:40,代码来源:mxc91331-gpio.c
示例7: mxc_init_power_key
/*!
* Power Key initialization.
*/
static int __init mxc_init_power_key(void)
{
/* Set power key as wakeup resource */
int irq, ret;
irq = IOMUX_TO_IRQ(MX51_PIN_EIM_A27);
set_irq_type(irq, IRQF_TRIGGER_RISING);
ret = request_irq(irq, power_key_int, 0, "power_key", 0);
if (ret)
pr_info("register on-off key interrupt failed\n");
else
enable_irq_wake(irq);
return ret;
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:16,代码来源:mx51_babbage.c
示例8: mxc_expio_init
static int __init mxc_expio_init(void)
{
int i;
mx35_3stack_board_io = (u32) ioremap(BOARD_IO_ADDR, SZ_4K);
if (mx35_3stack_board_io == 0)
return -ENOMEM;
if ((__raw_readw(mx35_3stack_board_io + MAGIC_NUMBER1_REG) != 0xAAAA) ||
(__raw_readw(mx35_3stack_board_io + MAGIC_NUMBER2_REG) != 0x5555))
return -ENODEV;
pr_info("3-Stack Debug board detected, rev = 0x%04X\n",
readw(mx35_3stack_board_io + CPLD_CODE_VER_REG));
/*
* Configure INT line as GPIO input
*/
mxc_request_iomux(EXPIO_PARENT_INT, MUX_CONFIG_FUNC);
gpio_request(IOMUX_TO_GPIO(EXPIO_PARENT_INT), NULL);
gpio_direction_input(IOMUX_TO_GPIO(EXPIO_PARENT_INT));
/* disable the interrupt and clear the status */
__raw_writew(0, mx35_3stack_board_io + INTR_MASK_REG);
__raw_writew(0xFFFF, mx35_3stack_board_io + INTR_RESET_REG);
__raw_writew(0, mx35_3stack_board_io + INTR_RESET_REG);
__raw_writew(0x1F, mx35_3stack_board_io + INTR_MASK_REG);
for (i = MXC_BOARD_IRQ_START; i < (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS);
i++) {
set_irq_chip(i, &expio_irq_chip);
set_irq_handler(i, handle_level_irq);
set_irq_flags(i, IRQF_VALID);
}
set_irq_type(IOMUX_TO_IRQ(EXPIO_PARENT_INT), IRQF_TRIGGER_LOW);
set_irq_chained_handler(IOMUX_TO_IRQ(EXPIO_PARENT_INT),
mxc_expio_irq_handler);
return 0;
}
开发者ID:despierto,项目名称:imx_233_linux,代码行数:38,代码来源:mx35_3stack_cpld.c
示例9: volume_get_irq
int volume_get_irq(int line_direction)
{
iomux_pin_name_t gpio;
int err = -1;
switch (line_direction) {
case 0: gpio = VOLUME_UP_gpio;
break;
case 1: gpio = VOLUME_DOWN_gpio;
break;
default: return err;
}
return IOMUX_TO_IRQ(gpio);
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:14,代码来源:mx50_yoshi_gpio.c
示例10: sdhc_intr_setup
/*!
* Setup the IOMUX/GPIO for SDHC1 SD1_DET.
*
* @param host Pointer to MMC/SD host structure.
* @param handler GPIO ISR function pointer for the GPIO signal.
* @return The function returns 0 on success and -1 on failure.
*
**/
int sdhc_intr_setup(void *host,
irqreturn_t(*handler) (int, void *, struct pt_regs *))
{
int ret;
/* MMC1_SDDET is connected to GPIO37 */
iomux_config_mux(PIN_GPIO37, OUTPUTCONFIG_FUNC, INPUTCONFIG_FUNC);
/* check if a card in the slot if so we need to start with
* the proper edge definition
*/
sdhc_intr_clear(sdhc_find_card());
ret = request_irq(IOMUX_TO_IRQ(PIN_GPIO37), handler, 0, "MXCMMC", host);
return ret;
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:24,代码来源:i30030evb_gpio.c
示例11: mxc_mmc1_init
static int mxc_mmc1_init(struct device *dev,
irq_handler_t detect_irq, void *data)
{
int ret;
gpio_det = IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1);
gpio_wp = IOMUX_TO_GPIO(MX31_PIN_GPIO1_6);
mxc_iomux_set_pad(MX31_PIN_SD1_DATA0,
MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU);
mxc_iomux_set_pad(MX31_PIN_SD1_DATA1,
MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU);
mxc_iomux_set_pad(MX31_PIN_SD1_DATA2,
MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU);
mxc_iomux_set_pad(MX31_PIN_SD1_DATA3,
MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU);
mxc_iomux_set_pad(MX31_PIN_SD1_CMD,
MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU);
mxc_iomux_set_pad(MX31_PIN_SD1_CLK, MMC_PAD_CFG);
ret = gpio_request(gpio_det, "MMC detect");
if (ret)
return ret;
ret = gpio_request(gpio_wp, "MMC w/p");
if (ret)
goto exit_free_det;
gpio_direction_input(gpio_det);
gpio_direction_input(gpio_wp);
ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), detect_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"MMC detect", data);
if (ret)
goto exit_free_wp;
return 0;
exit_free_wp:
gpio_free(gpio_wp);
exit_free_det:
gpio_free(gpio_det);
return ret;
}
开发者ID:curbthepain,项目名称:android_kernel_us990_rev,代码行数:47,代码来源:mx31lite-db.c
示例12: sdhc_intr_setup
/*!
* Setup the IOMUX/GPIO for SDHC1 SD1_DET.
*
* @param host Pointer to MMC/SD host structure.
* @param handler GPIO ISR function pointer for the GPIO signal.
* @return The function returns 0 on success and -1 on failure.
*
**/
int sdhc_intr_setup(void *host,
irqreturn_t(*handler) (int, void *, struct pt_regs *))
{
int ret;
/* use SD2_DAT1 as GPIO for SD1_DET */
iomux_config_mux(SP_SD2_DAT1, OUTPUTCONFIG_DEFAULT,
INPUTCONFIG_DEFAULT);
/* check if a card in the slot if so we need to start with
* the proper edge definition
*/
sdhc_intr_clear(sdhc_find_card());
ret = request_irq(IOMUX_TO_IRQ(SP_SD2_DAT1), handler,
0, "MXCMMC", host);
return ret;
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:26,代码来源:mxc27530evb_gpio.c
示例13: sdhc_init_card_det
/*
* Return the card detect pin.
*/
int sdhc_init_card_det(int id)
{
#if defined(GPIO_SDHC_ENABLE)
if (id == 0) {
int ret = 0;
mxc_request_iomux(MX37_PIN_UART1_CTS, IOMUX_CONFIG_ALT4);
mxc_iomux_set_pad(MX37_PIN_UART1_CTS, PAD_CTL_DRV_HIGH |
PAD_CTL_HYS_NONE | PAD_CTL_PKE_NONE | PAD_CTL_SRE_FAST);
mxc_set_gpio_direction(MX37_PIN_UART1_CTS, 1);
pr_info("[Henry/0206] SD detect pin initialized!!\n");
ret = IOMUX_TO_IRQ(MX37_PIN_UART1_CTS);
mxc_free_iomux(MX37_PIN_UART1_CTS, IOMUX_CONFIG_ALT4);
return ret;
} else { /* config the det pin for SDHC2 */
return 0;
}
#endif
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:22,代码来源:mx37_bigbang_gpio.c
示例14: fiveway_get_irq
int fiveway_get_irq(int line_direction)
{
iomux_pin_name_t gpio;
int err = -1;
switch (line_direction) {
case 0: gpio = FIVEWAY_up_gpio;
break;
case 1: gpio = FIVEWAY_down_gpio;
break;
case 2: gpio = FIVEWAY_left_gpio;
break;
case 3: gpio = FIVEWAY_right_gpio;
break;
case 4: gpio = FIVEWAY_select_gpio;
break;
default: return err;
}
return IOMUX_TO_IRQ(gpio);
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:20,代码来源:mx50_yoshi_gpio.c
示例15: mxc_init_power_key
/*!
* Power Key initialization.
*/
static int __init mxc_init_power_key(void)
{
/*Set power key as wakeup resource */
int irq, ret;
mxc_request_iomux(MX25_PIN_A25, MUX_CONFIG_ALT5);
mxc_iomux_set_pad(MX25_PIN_A25, PAD_CTL_DRV_NORMAL);
gpio_request(IOMUX_TO_GPIO(MX25_PIN_A25), NULL);
gpio_direction_input(IOMUX_TO_GPIO(MX25_PIN_A25));
irq = IOMUX_TO_IRQ(MX25_PIN_A25);
set_irq_type(irq, IRQF_TRIGGER_RISING);
ret = request_irq(irq, power_key_int, 0, "power_key", 0);
if (ret)
pr_info("register on-off key interrupt failed\n");
else
enable_irq_wake(irq);
return ret;
}
开发者ID:despierto,项目名称:imx_233_linux,代码行数:23,代码来源:mx25_3stack.c
示例16: armadillo5x0_sdhc1_init
static int armadillo5x0_sdhc1_init(struct device *dev,
irq_handler_t detect_irq, void *data)
{
int ret;
int gpio_det, gpio_wp;
gpio_det = IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK);
gpio_wp = IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B);
ret = gpio_request(gpio_det, "sdhc-card-detect");
if (ret)
return ret;
gpio_direction_input(gpio_det);
ret = gpio_request(gpio_wp, "sdhc-write-protect");
if (ret)
goto err_gpio_free;
gpio_direction_input(gpio_wp);
/* When supported the trigger type have to be BOTH */
ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq,
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
"sdhc-detect", data);
if (ret)
goto err_gpio_free_2;
return 0;
err_gpio_free_2:
gpio_free(gpio_wp);
err_gpio_free:
gpio_free(gpio_det);
return ret;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:40,代码来源:mach-armadillo5x0.c
示例17: pcm970_sdhc1_exit
static void pcm970_sdhc1_exit(struct device *dev, void *data)
{
free_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), data);
gpio_free(SDHC1_GPIO_DET);
gpio_free(SDHC1_GPIO_WP);
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:6,代码来源:mach-pcm037.c
示例18: IOMUX_TO_IRQ
},
.resource = &pcm037_flash_resource,
.num_resources = 1,
};
static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
static struct resource smsc911x_resources[] = {
{
.start = MX31_CS1_BASE_ADDR + 0x300,
.end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
.end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},
};
static struct smsc911x_platform_config smsc911x_info = {
.flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY |
SMSC911X_SAVE_MAC_ADDRESS,
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
.phy_interface = PHY_INTERFACE_MODE_MII,
};
static struct platform_device pcm037_eth = {
.name = "smsc911x",
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:31,代码来源:mach-pcm037.c
示例19: mx31_3ds_sdhc1_exit
static void mx31_3ds_sdhc1_exit(struct device *dev, void *data)
{
free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data);
gpio_free_array(mx31_3ds_sdhc1_gpios,
ARRAY_SIZE(mx31_3ds_sdhc1_gpios));
}
开发者ID:mesosexy,项目名称:linux-2.6,代码行数:6,代码来源:mach-mx31_3ds.c
示例20: IOMUX_TO_IRQ
};
#endif
#ifdef CONFIG_I2C_MXC_SELECT2
static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
{
.type = "wm8903-i2c",
.addr = 0x1a,
},
{
.type = "sgtl5000-i2c",
.addr = 0x0a,
},
{
.type = "tsc2007",
.addr = 0x48,
.irq = IOMUX_TO_IRQ(MX51_PIN_GPIO1_5),
},
{
.type = "si4702",
.addr = 0x10,
.platform_data = (void *)&si4702_data,
},
};
#endif
#if defined(CONFIG_I2C_MXC_HS) || defined(CONFIG_I2C_MXC_HS_MODULE)
static struct mxc_camera_platform_data camera_data = {
.io_regulator = "SW4",
.analog_regulator = "VIOHI",
.mclk = 24000000,
.csi = 0,
};
开发者ID:traveller42,项目名称:linux-2.6.28.mx233-falconwing,代码行数:31,代码来源:mx51_3stack.c
注:本文中的IOMUX_TO_IRQ函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论