当前位置: 首页>>代码示例>>C++>>正文


C++ IOMUX_TO_GPIO函数代码示例

本文整理汇总了C++中IOMUX_TO_GPIO函数的典型用法代码示例。如果您正苦于以下问题:C++ IOMUX_TO_GPIO函数的具体用法?C++ IOMUX_TO_GPIO怎么用?C++ IOMUX_TO_GPIO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IOMUX_TO_GPIO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: headphone_det_status

static int headphone_det_status(void)
{
	if (cpu_is_mx51_rev(CHIP_REV_1_1) == 2)
		return (gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_D14)) == 0);

	return gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0));
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx51_babbage.c

示例2: kzm_init_ext_uart

static int __init kzm_init_ext_uart(void)
{
	u8 tmp;

	/*
	 * GPIO 1-1: external UART interrupt line
	 */
	mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO));
	gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1), "ext-uart-int");
	gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));

	/*
	 * Unmask UART interrupt
	 */
	tmp = __raw_readb(KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));
	tmp |= 0x2;
	__raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));

	serial_platform_data[0].irq =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));
	serial8250_resources[1].start =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));
	serial8250_resources[1].end =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));

	return platform_device_register(&serial_device);
}
开发者ID:linux-next,项目名称:linux-next,代码行数:27,代码来源:mach-kzm_arm11_01.c

示例3: efika_usb_phy_reset

/*
 * Reset USB PHY (or PHYs on EfikaSB)
 */
static void efika_usb_phy_reset(void)
{
	/* SMSC 3317 PHY reset */
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 0);
	udelay(1000);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 1);
}
开发者ID:AeroGirl,项目名称:u-boot-kern3.2,代码行数:10,代码来源:efikamx-usb.c

示例4: setup_iomux_spi

static void setup_iomux_spi(void)
{
	/* 000: Select mux mode: ALT0 mux port: MOSI of instance: ecspi1 */
	mxc_request_iomux(MX51_PIN_CSPI1_MOSI, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_MOSI,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);

	/* 000: Select mux mode: ALT0 mux port: MISO of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_MISO, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_MISO,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);

	/* Configure SS0 as a GPIO */
	mxc_request_iomux(MX51_PIN_CSPI1_SS0, IOMUX_CONFIG_GPIO);
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0), 0);

	/* Configure SS1 as a GPIO */
	mxc_request_iomux(MX51_PIN_CSPI1_SS1, IOMUX_CONFIG_GPIO);
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1), 1);

	/* 000: Select mux mode: ALT0 mux port: SS2 of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY,
		PAD_CTL_HYS_ENABLE | PAD_CTL_PKE_ENABLE);

	/* 000: Select mux mode: ALT0 mux port: SCLK of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_SCLK, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_SCLK,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);
}
开发者ID:Apaisal,项目名称:u-boot,代码行数:30,代码来源:efikamx.c

示例5: mx31moboard_marxbot_init

/*
 * system init for baseboard usage. Will be called by mx31moboard init.
 */
void __init mx31moboard_marxbot_init(void)
{
	printk(KERN_INFO "Initializing mx31marxbot peripherals\n");

	mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins),
		"marxbot");

	marxbot_init_sel_gpios();

	dspics_resets_init();

	mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);

	spi_register_board_info(marxbot_spi_board_info,
		ARRAY_SIZE(marxbot_spi_board_info));

	marxbot_cam_init();
	platform_add_devices(marxbot_cameras, ARRAY_SIZE(marxbot_cameras));

	/* battery present pin */
	gpio_request(IOMUX_TO_GPIO(MX31_PIN_LCS0), "bat-present");
	gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0));
	gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false);

	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);

	marxbot_usbh1_init();
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:31,代码来源:mx31moboard-marxbot.c

示例6: mx50_yoshi_gpio_spi_chipselect_active

void mx50_yoshi_gpio_spi_chipselect_active(int cspi_mode, int status,
		                             int chipselect)
{
	switch (cspi_mode) {
	case 1:
		break;
	case 2:
		break;
	case 3:
		switch (chipselect) {
		case 0x1:
		        /* enable ss0 */
		        mxc_request_iomux(MX50_PIN_CSPI_SS0, IOMUX_CONFIG_ALT0);
		        /*disable other ss */
		        mxc_request_iomux(MX50_PIN_ECSPI1_MOSI, IOMUX_CONFIG_GPIO);
		        /* pull up/down deassert it */
		        gpio_direction_input(IOMUX_TO_GPIO(MX50_PIN_ECSPI1_MOSI));
		        break;
		case 0x2:
		        /* enable ss1 */
		        mxc_request_iomux(MX50_PIN_ECSPI1_MOSI, IOMUX_CONFIG_ALT2);
		        /*disable other ss */
		        mxc_request_iomux(MX50_PIN_CSPI_SS0, IOMUX_CONFIG_GPIO);
		        /* pull up/down deassert it */
		        gpio_direction_input(IOMUX_TO_GPIO(MX50_PIN_CSPI_SS0));
		        break;
		default:
		        break;
		}
		break;

	default:
		break;
	}
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:35,代码来源:mx50_yoshi_gpio.c

示例7: mx31lite_late

static void __init mx31lite_late(void)
{
	int ret;

	if (mx31lite_baseboard == MX31LITE_DB)
		mx31lite_db_init();

	mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3));
	spi_register_board_info(&mc13783_spi_dev, 1);

	/* USB */
	usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
			ULPI_OTG_DRVVBUS_EXT);
	if (usbh2_pdata.otg)
		imx31_add_mxc_ehci_hs(2, &usbh2_pdata);

	/* SMSC9117 IRQ pin */
	ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
	if (ret)
		pr_warn("could not get LAN irq gpio\n");
	else {
		gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		smsc911x_resources[1].start =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		smsc911x_resources[1].end =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		platform_device_register(&smsc911x_device);
	}
}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:29,代码来源:mach-mx31lite.c

示例8: gpio_watchdog_low

/* Called during ship mode */
void gpio_watchdog_low(void)
{
	printk(KERN_CRIT "Halting ...\n");

	/* configure the PMIC for WDIRESET */
	pmic_write_reg(REG_POWER_CTL2, (0 << WDIRESET_LSH), (1 << WDIRESET_LSH));

	/* Turn on RESTARTEN */
	pmic_write_reg(REG_POWER_CTL2, (1 << RESTARTEN_LSH), (1 << RESTARTEN_LSH));

	/* Free WDOG as ALT2 */
	mxc_free_iomux(MX50_PIN_WDOG, IOMUX_CONFIG_ALT2);

	/* Re-request as GPIO */
	mxc_request_iomux(MX50_PIN_WDOG, IOMUX_CONFIG_ALT1);

	/* Pad settings */
	mxc_iomux_set_pad(MX50_PIN_WDOG, PAD_CTL_HYS_NONE | PAD_CTL_PKE_NONE |
				PAD_CTL_DRV_HIGH | PAD_CTL_ODE_OPENDRAIN_NONE);

	/* Enumerate */
	gpio_request(IOMUX_TO_GPIO(MX50_PIN_WDOG), "wdog");

	/* Direction output */
	gpio_direction_output(IOMUX_TO_GPIO(MX50_PIN_WDOG), 0);

	/* Set low */
	gpio_set_value(IOMUX_TO_GPIO(MX50_PIN_WDOG), 0);
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:30,代码来源:mx50_yoshi_gpio.c

示例9: si4702_reset

void si4702_reset(void)
{
	gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_SRST0), 0);
	msleep(100);
	gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_SRST0), 1);
	msleep(100);
}
开发者ID:vasubabu,项目名称:kernel,代码行数:7,代码来源:mx3_3stack.c

示例10: qong_nand_select_chip

static void qong_nand_select_chip(struct mtd_info *mtd, int chip)
{
	if (chip >= 0)
		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 0);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 1);
}
开发者ID:dileepgithub,项目名称:linux-2.6,代码行数:7,代码来源:mach-qong.c

示例11: si4702_reset

static void si4702_reset(void)
{
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_DTACK), 0);
	msleep(100);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_DTACK), 1);
	msleep(100);
}
开发者ID:babupeople,项目名称:linux-2.6.35.3-imx53,代码行数:7,代码来源:mx51_3stack.c

示例12: moboard_uart0_init

static void __init moboard_uart0_init(void)
{
	if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack")) {
		gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0);
		gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1));
	}
}
开发者ID:7799,项目名称:linux,代码行数:7,代码来源:mach-mx31moboard.c

示例13: mx53_gpio_host1_driver_vbus

void mx53_gpio_host1_driver_vbus(bool on)
{
	if (on)
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0);
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx53_evk_gpio.c

示例14: gpio_cs42888_pdwn

void gpio_cs42888_pdwn(int pdwn)
{
	if (pdwn)
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_12), 0);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_12), 1);
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx53_evk_gpio.c

示例15: flexcan_xcvr_enable

void flexcan_xcvr_enable(int id, int en)
{
	static int pwdn;
	if (id < 0 || id > 1)
		return;

	if (en) {
		if (!(pwdn++))
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_19), 1);

		if (id == 0) {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_18), 1);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_17), 1);
		} else {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_CSI0_D6), 1);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_14), 1);
		}

	} else {
		if (!(--pwdn))
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_19), 0);

		if (id == 0) {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_18), 0);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_17), 0);
		} else {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_CSI0_D6), 0);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_14), 0);
		}
	}
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:31,代码来源:mx53_evk_gpio.c


注:本文中的IOMUX_TO_GPIO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。