• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OMAP_GPIO_IRQ函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: omap4_mapphone_wifi_init

static void omap4_mapphone_wifi_init(void)
{
	int ret;
	mapphone_wifi_pmena_gpio = get_gpio_by_name("wlan_pmena");
	mapphone_wifi_irq_gpio = get_gpio_by_name("wlan_irqena");
	ret = gpio_request(mapphone_wifi_pmena_gpio, "wifi_pmena");
	if (ret < 0)
		goto out;
	gpio_direction_output(mapphone_wifi_pmena_gpio, 0);
	omap4_mapphone_wlan_data.irq = OMAP_GPIO_IRQ(mapphone_wifi_irq_gpio);
	if (wl12xx_set_platform_data(&omap4_mapphone_wlan_data))
		pr_err("Error setting wl12xx data\n");
out:
	return;
}
开发者ID:Superdallas,项目名称:JBX_Kernel,代码行数:15,代码来源:board-mapphone.c


示例2: omap3beagle_ks8851_init

static void __init omap3beagle_ks8851_init(void)
{
	if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) &&
	    (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) {
		gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0);
		omap3beagle_zippy2_spi_board_info[0].irq	= OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ);
		set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
	} else {
		printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n");
		return;
	}

	spi_register_board_info(omap3beagle_zippy2_spi_board_info,
							ARRAY_SIZE(omap3beagle_zippy2_spi_board_info));
}
开发者ID:andydev,项目名称:spec_mtk,代码行数:15,代码来源:board-omap3beagle.c


示例3: dhd_customer_oob_irq_map

int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr)
{
	int  host_oob_irq = 0;
	//&*&*&*JohWan1 mod BCM4329 OOB support

	#if 0

#ifdef CUSTOMER_HW2
	host_oob_irq = wifi_get_irq_number(irq_flags_ptr);

#else /* for NOT  CUSTOMER_HW2 */
#if defined(CUSTOM_OOB_GPIO_NUM)
	if (dhd_oob_gpio_num < 0) {
		dhd_oob_gpio_num = CUSTOM_OOB_GPIO_NUM;
	}
#endif

	if (dhd_oob_gpio_num < 0) {
		WL_ERROR(("%s: ERROR customer specific Host GPIO is NOT defined \n",
			__FUNCTION__));
		return (dhd_oob_gpio_num);
	}

	WL_ERROR(("%s: customer specific Host GPIO number is (%d)\n",
	         __FUNCTION__, dhd_oob_gpio_num));

#if defined CUSTOMER_HW
	host_oob_irq = MSM_GPIO_TO_INT(dhd_oob_gpio_num);
#elif defined CUSTOMER_HW3
	gpio_request(dhd_oob_gpio_num, "oob irq");
	host_oob_irq = gpio_to_irq(dhd_oob_gpio_num);
	gpio_direction_input(dhd_oob_gpio_num);
#endif /* CUSTOMER_HW */
#endif /* CUSTOMER_HW2 */

	#else //if 0
	{
	  //BOARD_ID_EVT3
	  gpio_direction_input(CUSTOM_OOB_GPIO_NUM);
	  host_oob_irq = OMAP_GPIO_IRQ(CUSTOM_OOB_GPIO_NUM);
	  printk("dhd_customer_oob_irq_map irg = %d \n",host_oob_irq);
	}
	#endif //if 0
	//&*&*&*JohWan2 mod BCM4329 OOB support
	return (host_oob_irq);
}
开发者ID:A1DEVS,项目名称:lenovo_a1_07_bcm4329,代码行数:46,代码来源:dhd_custom_gpio.c


示例4: cy_as_hal_omap_hardware_deinit

void cy_as_hal_omap_hardware_deinit(cy_as_omap_dev_kernel *dev_p)
{
	/*
	 * free omap hw resources
	 */
	if (dev_p->m_vma_addr_base != 0)
		iounmap((void *)dev_p->m_vma_addr_base);

	if (dev_p->m_phy_addr_base != 0)
		release_mem_region((void *)dev_p->m_phy_addr_base, SZ_16K);

	gpmc_cs_free(AST_GPMC_CS);

	if (have_irq)
		free_irq(OMAP_GPIO_IRQ(AST_INT), dev_p);

	cy_as_hal_release_user_pads(user_pad_cfg);
}
开发者ID:Sk8tr419,项目名称:linux_kernel_sgh-i777,代码行数:18,代码来源:cyashalomap_cram_org.c


示例5: omap_3430sdp_init

static void __init omap_3430sdp_init(void)
{
	platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
	omap_board_config = sdp3430_config;
	omap_board_config_size = ARRAY_SIZE(sdp3430_config);
	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0))
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = OMAP_GPIO_IRQ(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	sdp3430_flash_init();
	omap_serial_init();
	sdp3430_usb_init();
	sdp_mmc_init();
}
开发者ID:bubyte,项目名称:linwizard-strtrk,代码行数:18,代码来源:board-3430sdp.c


示例6: omap1510_fpga_init_irq

/*
 * All of the FPGA interrupt request inputs except for the touchscreen are
 * edge-sensitive; the touchscreen is level-sensitive.  The edge-sensitive
 * interrupts are acknowledged as a side-effect of reading the interrupt
 * status register from the FPGA.  The edge-sensitive interrupt inputs
 * cause a problem with level interrupt requests, such as Ethernet.  The
 * problem occurs when a level interrupt request is asserted while its
 * interrupt input is masked in the FPGA, which results in a missed
 * interrupt.
 *
 * In an attempt to workaround the problem with missed interrupts, the
 * mask_ack routine for all of the FPGA interrupts has been changed from
 * fpga_mask_ack_irq() to fpga_ack_irq() so that the specific FPGA interrupt
 * being serviced is left unmasked.  We can do this because the FPGA cascade
 * interrupt is installed with the IRQF_DISABLED flag, which leaves all
 * interrupts masked at the CPU while an FPGA interrupt handler executes.
 *
 * Limited testing indicates that this workaround appears to be effective
 * for the smc9194 Ethernet driver used on the Innovator.  It should work
 * on other FPGA interrupts as well, but any drivers that explicitly mask
 * interrupts at the interrupt controller via disable_irq/enable_irq
 * could pose a problem.
 */
void omap1510_fpga_init_irq(void)
{
	int i;

	__raw_writeb(0, OMAP1510_FPGA_IMR_LO);
	__raw_writeb(0, OMAP1510_FPGA_IMR_HI);
	__raw_writeb(0, INNOVATOR_FPGA_IMR2);

	for (i = OMAP1510_IH_FPGA_BASE; i < (OMAP1510_IH_FPGA_BASE + NR_FPGA_IRQS); i++) {

		if (i == OMAP1510_INT_FPGA_TS) {
			/*
			 * The touchscreen interrupt is level-sensitive, so
			 * we'll use the regular mask_ack routine for it.
			 */
			set_irq_chip(i, &omap_fpga_irq_ack);
		}
		else {
			/*
			 * All FPGA interrupts except the touchscreen are
			 * edge-sensitive, so we won't mask them.
			 */
			set_irq_chip(i, &omap_fpga_irq);
		}

		set_irq_handler(i, handle_edge_irq);
		set_irq_flags(i, IRQF_VALID);
	}

	/*
	 * The FPGA interrupt line is connected to GPIO13. Claim this pin for
	 * the ARM.
	 *
	 * NOTE: For general GPIO/MPUIO access and interrupts, please see
	 * gpio.[ch]
	 */
	omap_request_gpio(13);
	omap_set_gpio_direction(13, 1);
	set_irq_type(OMAP_GPIO_IRQ(13), IRQT_RISING);
	set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:64,代码来源:fpga.c


示例7: hx_ts_probe

static int __init hx_ts_probe(struct omap_ts_t *ts)
{
	unsigned	gpio;

	if (machine_is_omap_h2()) {
		gpio = H2_GPIO_NUM;
		omap_cfg_reg(P20_1610_GPIO4);
	} else if (machine_is_omap_h3()) {
		gpio = H3_GPIO_NUM;
		omap_cfg_reg(W19_1610_GPIO48);
	} else
		return -ENODEV;

	ts->irq = OMAP_GPIO_IRQ(gpio);
	if (omap_request_gpio(gpio) != 0) {
		printk(KERN_ERR "hX_ts_init.c: Could not reserve GPIO!\n");
		return -EINVAL;
	};

	omap_set_gpio_direction(gpio, 1);
	ts->irq_type = IRQF_TRIGGER_FALLING;
	return 0;
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:23,代码来源:ts_hx.c


示例8: microusbic_fast_init

int microusbic_fast_init(void)
{
	int microusbic_irq = 0;

     	printk(" Microusbic init\n");

	install_usbic_irq_chip_handler();

	INIT_WORK(&work_device_intr,  work_handler_device_intr);

	////////////////////////////////////////////////////////////
	// microusbic irq
	microusbic_irq = OMAP_GPIO_IRQ(OMAP_GPIO_USBSW_NINT);
	set_irq_type(microusbic_irq, 3);          //IRQT_BOTHEDGE

	if(request_irq(microusbic_irq, microusbic_interrupt,
				IRQF_DISABLED | IRQF_SHARED, "USBIC", (void *)&dev_id))
		printk("[microusbic] Error! irq %d in use.\n", microusbic_irq);
	else
		printk("[microusbic] found microusbic at irq %d\n", microusbic_irq);
	enable_irq_wake(microusbic_irq);
	return 0;
}
开发者ID:macroliu,项目名称:samsung_kernel_nowplus,代码行数:23,代码来源:microusbic_core.c


示例9: omap_kp_scan_keypad

static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state)
{
	int col = 0;

	/* read the keypad status */
	if (cpu_is_omap24xx()) {
		int i;
		for (i = 0; i < omap_kp->rows; i++)
			disable_irq(OMAP_GPIO_IRQ(row_gpios[i]));

		/* read the keypad status */
		for (col = 0; col < omap_kp->cols; col++) {
			set_col_gpio_val(omap_kp, ~(1 << col));
			state[col] = ~(get_row_gpio_val(omap_kp)) & 0x3f;
		}
		set_col_gpio_val(omap_kp, 0);

	} else {
		/* disable keyboard interrupt and schedule for handling */
		omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);

		/* read the keypad status */
		omap_writew(0xff, OMAP_MPUIO_BASE + OMAP_MPUIO_KBC);
		for (col = 0; col < omap_kp->cols; col++) {
			omap_writew(~(1 << col) & 0xff,
				    OMAP_MPUIO_BASE + OMAP_MPUIO_KBC);

			udelay(omap_kp->delay);

			state[col] = ~omap_readw(OMAP_MPUIO_BASE +
						 OMAP_MPUIO_KBR_LATCH) & 0xff;
		}
		omap_writew(0x00, OMAP_MPUIO_BASE + OMAP_MPUIO_KBC);
		udelay(2);
	}
}
开发者ID:mozyg,项目名称:kernel,代码行数:36,代码来源:omap-keypad.c


示例10: smsc43340_usb_probe

static int __init smsc43340_usb_probe(struct platform_device *pdev)
{
	struct smsc43340_usb_data *pdata = pdev->dev.platform_data;
	struct smsc43340_usb	  *smsc;
	int			status;

	if (!pdata) {
		dev_dbg(&pdev->dev, "platform_data not available\n");
		return -EINVAL;
	}

	smsc = kzalloc(sizeof *smsc, GFP_KERNEL);
	if (!smsc)
		return -ENOMEM;

	smsc->dev                 = &pdev->dev;
	smsc->otg.dev             = smsc->dev;
	smsc->otg.label           = "smsc43340";
	smsc->otg.set_host        = smsc43340_set_host;
	smsc->otg.set_peripheral  = smsc43340_set_peripheral;
	smsc->otg.set_suspend     = smsc43340_set_suspend;
	smsc->otg.init		  = smsc43340_phy_init;
	smsc->otg.shutdown	  = smsc43340_phy_shutdown;
	smsc->otg.set_clk	  = smsc43340_set_phy_clk;
	smsc->otg.set_vbus	  = smsc43340_set_vbus;
	smsc->asleep              = 1;
	smsc->gpio_reset          = pdata->gpio_reset;
	smsc->gpio_overcurrent    = pdata->gpio_overcurrent;

	if (!gpio_is_valid(smsc->gpio_reset)) {
		kfree(smsc);
		return -EINVAL;
	}

	// Init IRQ
	if (gpio_is_valid(smsc->gpio_overcurrent)) {
		// Get IRQ
		smsc->irq = OMAP_GPIO_IRQ(smsc->gpio_overcurrent);

		if (gpio_request(smsc->gpio_overcurrent, "smsc43340_usb_irq") < 0) {
			printk(KERN_ERR "Failed to request GPIO%d for smsc43340 IRQ\n",
				smsc->gpio_overcurrent);
			return -EIO;
		}
		gpio_direction_input(smsc->gpio_overcurrent);
	}

	smsc43340_phy_init(&smsc->otg);

	otg_set_transceiver(&smsc->otg);

	platform_set_drvdata(pdev, smsc);

        status = request_irq(smsc->irq, smsc43340_usb_irq,
			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
			"smsc43340_usb", smsc);
	if (status < 0) {
		dev_dbg(&pdev->dev, "can't get IRQ %d, err %d\n",
			smsc->irq, status);
		kfree(smsc);
		return status;
	}

        INIT_WORK(&smsc->irq_work, smsc43340_irq_work_handler);

        /* Generate first IRQ */
        smsc43340_usb_irq(smsc->irq, (void *) smsc );

	dev_info(&pdev->dev, "Initialized SMSC 43340 USB module for OMAP 3630 USB OTG\n");
	BLOCKING_INIT_NOTIFIER_HEAD(&smsc->otg.notifier);
	return 0;
}
开发者ID:CunningLogic,项目名称:asteroid_smart_kernel,代码行数:72,代码来源:dummy-smsc-usb43340.c


示例11: defined

	/*SMSC 9220 chipset*/
	case 0x92200000:
	default:
		omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
	}
}

#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
static struct resource omap3evm_smsc911x_resources[] = {
	[0] =	{
		.start	= OMAP3EVM_ETHR_START,
		.end	= (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
		.flags	= IORESOURCE_MEM,
	},
	[1] =	{
		.start	= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
		.end	= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
		.flags	= (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
	},
};

static struct smsc911x_platform_config smsc911x_config = {
	.phy_interface  = PHY_INTERFACE_MODE_MII,
	.irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
	.irq_type       = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
	.flags          = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
};

static struct platform_device omap3evm_smsc911x_device = {
	.name		= "smsc911x",
	.id		= -1,
开发者ID:AdiPat,项目名称:i9003_Kernel,代码行数:31,代码来源:board-omap3evm.c


示例12: uWire

}
#else
#define palmte_get_power_status	NULL
#endif

static struct omap_board_config_kernel palmte_config[] __initdata = {
	{ OMAP_TAG_LCD,		&palmte_lcd_config },
	{ OMAP_TAG_UART,	&palmte_uart_config },
};

static struct spi_board_info palmte_spi_info[] __initdata = {
	{
		.modalias	= "tsc2102",
		.bus_num	= 2,	/* uWire (officially) */
		.chip_select	= 0,	/* As opposed to 3 */
		.irq		= OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO),
		.max_speed_hz	= 8000000,
	},
};

static void palmte_headphones_detect(void *data, int state)
{
	if (state) {
		/* Headphones connected, disable speaker */
		gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
		printk(KERN_INFO "PM: speaker off\n");
	} else {
		/* Headphones unplugged, re-enable speaker */
		gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
		printk(KERN_INFO "PM: speaker on\n");
	}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:31,代码来源:board-palmte.c


示例13: EXPORT_SYMBOL

}
#ifndef CONFIG_WIFI_CONTROL_FUNC
EXPORT_SYMBOL(sdp4430_wifi_reset);
#endif

struct wifi_platform_data sdp4430_wifi_control = {
	.set_power	= sdp4430_wifi_power,
	.set_reset	= sdp4430_wifi_reset,
	.set_carddetect	= sdp4430_wifi_set_carddetect,
};

#ifdef CONFIG_WIFI_CONTROL_FUNC
static struct resource sdp4430_wifi_resources[] = {
	[0] = {
		.name		= "device_wifi_irq",
		.start		= OMAP_GPIO_IRQ(SDP4430_WIFI_IRQ_GPIO),
		.end		= OMAP_GPIO_IRQ(SDP4430_WIFI_IRQ_GPIO),
		.flags          = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
	},
};

static struct platform_device sdp4430_wifi_device = {
	.name           = "device_wifi",
	.id             = 1,
	.num_resources  = ARRAY_SIZE(sdp4430_wifi_resources),
	.resource       = sdp4430_wifi_resources,
	.dev            = {
		.platform_data = &sdp4430_wifi_control,
	},
};
#endif
开发者ID:CelticWebSolutions,项目名称:Android-Kernel-2.6.35-Nook-Tablet,代码行数:31,代码来源:board-4430sdp-wifi.c


示例14: I2C_BOARD_INFO

}

static struct synaptics_i2c_rmi_platform_data synaptics_platform_data[] = {
	{
		.version        = 0x0,
		.power          = &synaptics_power,
		.flags          = SYNAPTICS_SWAP_XY,
		.irqflags       = IRQF_TRIGGER_LOW,
	}
};

static struct i2c_board_info __initdata zoom2_i2c_bus2_info[] = {
	{
		I2C_BOARD_INFO(SYNAPTICS_I2C_RMI_NAME,  0x20),
		.platform_data = &synaptics_platform_data,
		.irq = OMAP_GPIO_IRQ(OMAP_SYNAPTICS_GPIO),
	},
#if (defined(CONFIG_VIDEO_IMX046) || defined(CONFIG_VIDEO_IMX046_MODULE)) && \
	defined(CONFIG_VIDEO_OMAP3)
	{
		I2C_BOARD_INFO(IMX046_NAME, IMX046_I2C_ADDR),
		.platform_data = &zoom2_imx046_platform_data,
	},
#endif
#if (defined(CONFIG_VIDEO_LV8093) || defined(CONFIG_VIDEO_LV8093_MODULE)) && \
	defined(CONFIG_VIDEO_OMAP3)
	{
		I2C_BOARD_INFO(LV8093_NAME,  LV8093_AF_I2C_ADDR),
		.platform_data = &zoom2_lv8093_platform_data,
	},
#endif
开发者ID:AdiPat,项目名称:i9003_Kernel,代码行数:31,代码来源:board-zoom-peripherals.c


示例15: defined

		.platform_data = &twl6040_vddhf,
	},
};

/* i2c_2_info */
static struct i2c_board_info i2c_2_info[] __initdata = {
#if defined(CONFIG_TOUCHSCREEN_P940_GENERAL)
	{
		I2C_BOARD_INFO(LGE_TOUCH_NAME, LGE_TOUCH_ADDR),
		.platform_data = &u2_ts_data,
	},
#endif
#if defined(CONFIG_TOUCHSCREEN_COMMON_SYNAPTICS)
	{
		I2C_BOARD_INFO(LGE_TOUCH_NAME, 0x20),
		.irq = OMAP_GPIO_IRQ(52),
		.platform_data = &synaptics_pdata,
	},
#endif
#if defined(CONFIG_MACH_LGE_U2_P769)
	{
		I2C_BOARD_INFO(LM3530_I2C_NAME, LM3530_I2C_ADDR),
		.platform_data = &lm3530_pdata,
	},
#else
	{
		I2C_BOARD_INFO(LM3533_I2C_NAME, LM3533_I2C_ADDR),
		.platform_data = &lm3533_pdata,
	},
#endif
#if defined(CONFIG_LG_FW_MAX17048_FUEL_GAUGE_I2C)
开发者ID:Pesach85,项目名称:lge-kernel-omap4,代码行数:31,代码来源:u2_i2c.c


示例16: OMAP_GPIO_IRQ

	.id		= 0,
	.dev		= {
		.platform_data	= &osk_flash_data,
	},
	.num_resources	= 1,
	.resource	= &osk_flash_resource,
};

static struct resource osk5912_smc91x_resources[] = {
	[0] = {
		.start	= OMAP_OSK_ETHR_START,		/* Physical */
		.end	= OMAP_OSK_ETHR_START + 0xf,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= OMAP_GPIO_IRQ(0),
		.end	= OMAP_GPIO_IRQ(0),
		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
	},
};

static struct platform_device osk5912_smc91x_device = {
	.name		= "smc91x",
	.id		= -1,
	.num_resources	= ARRAY_SIZE(osk5912_smc91x_resources),
	.resource	= osk5912_smc91x_resources,
};

static struct resource osk5912_cf_resources[] = {
	[0] = {
		.start	= OMAP_GPIO_IRQ(62),
开发者ID:ForayJones,项目名称:iods,代码行数:31,代码来源:board-osk.c


示例17: OMAP_GPIO_IRQ

	.startup_delay		= 70000, /* 70ms */
	.enable_high		= 1,
	.enabled_at_boot	= 0,
	.init_data		= &omap3evm_vmmc2,
};

static struct platform_device omap3evm_wlan_regulator = {
	.name		= "reg-fixed-voltage",
	.id		= 1,
	.dev = {
		.platform_data	= &omap3evm_vwlan,
	},
};

struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
	.irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
	.board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
};
#endif

static struct twl4030_platform_data omap3evm_twldata = {
	.irq_base	= TWL4030_IRQ_BASE,
	.irq_end	= TWL4030_IRQ_END,

	/* platform_data for children goes here */
	.keypad		= &omap3evm_kp_data,
	.madc		= &omap3evm_madc_data,
	.usb		= &omap3evm_usb_data,
	.gpio		= &omap3evm_gpio_data,
	.codec		= &omap3evm_codec_data,
	.vdac		= &omap3_evm_vdac,
开发者ID:PivotalBigData,项目名称:PivotalHD,代码行数:31,代码来源:board-omap3evm.c


示例18: OMAP_GPIO_IRQ

}

static const struct ads7846_platform_data palmtt_ts_info = {
	.model			= 7846,
	.vref_delay_usecs	= 100,	/* internal, no capacitor */
	.x_plate_ohms		= 419,
	.y_plate_ohms		= 486,
	.get_pendown_state	= palmtt_get_pendown_state,
};

static struct spi_board_info __initdata palmtt_boardinfo[] = {
	{
		/* MicroWire (bus 2) CS0 has an ads7846e */
		.modalias	= "ads7846",
		.platform_data	= &palmtt_ts_info,
		.irq		= OMAP_GPIO_IRQ(6),
		.max_speed_hz	= 120000	/* max sample rate at 3V */
					* 26	/* command + data + overhead */,
		.bus_num	= 2,
		.chip_select	= 0,
	}
};

static void __init omap_palmtt_init_irq(void)
{
	omap1_init_common_hw();
	omap_init_irq();
}

static struct omap_usb_config palmtt_usb_config __initdata = {
	.register_dev	= 1,
开发者ID:guihaizi528,项目名称:linux-davinci-2.6,代码行数:31,代码来源:board-palmtt.c


示例19: microusbic_fast_exit

void microusbic_fast_exit(void)
{
	printk(" Microusbic exit\n");
	free_irq(OMAP_GPIO_IRQ(OMAP_GPIO_USBSW_NINT), (void *)dev_id);
}
开发者ID:macroliu,项目名称:samsung_kernel_nowplus,代码行数:5,代码来源:microusbic_core.c


示例20: osk_mistral_init

static void __init osk_mistral_init(void)
{
	/* NOTE:  we could actually tell if there's a Mistral board
	 * attached, e.g. by trying to read something from the ads7846.
	 * But this arch_init() code is too early for that, since we
	 * can't talk to the ads or even the i2c eeprom.
	 */

	/* parallel camera interface */
	omap_cfg_reg(J15_1610_CAM_LCLK);
	omap_cfg_reg(J18_1610_CAM_D7);
	omap_cfg_reg(J19_1610_CAM_D6);
	omap_cfg_reg(J14_1610_CAM_D5);
	omap_cfg_reg(K18_1610_CAM_D4);
	omap_cfg_reg(K19_1610_CAM_D3);
	omap_cfg_reg(K15_1610_CAM_D2);
	omap_cfg_reg(K14_1610_CAM_D1);
	omap_cfg_reg(L19_1610_CAM_D0);
	omap_cfg_reg(L18_1610_CAM_VS);
	omap_cfg_reg(L15_1610_CAM_HS);
	omap_cfg_reg(M19_1610_CAM_RSTZ);
	omap_cfg_reg(Y15_1610_CAM_OUTCLK);

	/* serial camera interface */
	omap_cfg_reg(H19_1610_CAM_EXCLK);
	omap_cfg_reg(W13_1610_CCP_CLKM);
	omap_cfg_reg(Y12_1610_CCP_CLKP);
	/* CCP_DATAM CONFLICTS WITH UART1.TX (and serial console) */
	/* omap_cfg_reg(Y14_1610_CCP_DATAM); */
	omap_cfg_reg(W14_1610_CCP_DATAP);

	/* CAM_PWDN */
	if (omap_request_gpio(11) == 0) {
		omap_cfg_reg(N20_1610_GPIO11);
		omap_set_gpio_direction(11, 0 /* out */);
		omap_set_gpio_dataout(11, 0 /* off */);
	} else
		pr_debug("OSK+Mistral: CAM_PWDN is awol\n");


	/* omap_cfg_reg(P19_1610_GPIO6); */	/* BUSY */
	omap_cfg_reg(P20_1610_GPIO4);	/* PENIRQ */
	set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING);
	spi_register_board_info(mistral_boardinfo,
			ARRAY_SIZE(mistral_boardinfo));

	/* the sideways button (SW1) is for use as a "wakeup" button */
	omap_cfg_reg(N15_1610_MPUIO2);
	if (omap_request_gpio(OMAP_MPUIO(2)) == 0) {
		int ret = 0;
		omap_set_gpio_direction(OMAP_MPUIO(2), 1);
		set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQT_RISING);
#ifdef	CONFIG_PM
		/* share the IRQ in case someone wants to use the
		 * button for more than wakeup from system sleep.
		 */
		ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)),
				&osk_mistral_wake_interrupt,
				IRQF_SHARED, "mistral_wakeup",
				&osk_mistral_wake_interrupt);
		if (ret != 0) {
			omap_free_gpio(OMAP_MPUIO(2));
			printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n",
				ret);
		} else
			enable_irq_wake(OMAP_GPIO_IRQ(OMAP_MPUIO(2)));
#endif
	} else
		printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");

	/* LCD:  backlight, and power; power controls other devices on the
	 * board, like the touchscreen, EEPROM, and wakeup (!) switch.
	 */
	omap_cfg_reg(PWL);
	if (omap_request_gpio(2) == 0) {
		omap_set_gpio_direction(2, 0 /* out */);
		omap_set_gpio_dataout(2, 1 /* on */);
	}

	platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
}
开发者ID:ForayJones,项目名称:iods,代码行数:81,代码来源:board-osk.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OMAP_MMC_READ函数代码示例发布时间:2022-05-30
下一篇:
C++ OMAP3_MUX函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap