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

C++ MSM_GPIO_TO_INT函数代码示例

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

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



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

示例1: gpio_direction_output

	gpio_direction_output(MAHIMAHI_GPIO_DS2482_SLP_N, n);
}

static struct tpa2018d1_platform_data tpa2018_data = {
	.gpio_tpa2018_spk_en = MAHIMAHI_CDMA_GPIO_AUD_SPK_AMP_EN,
};

static struct i2c_board_info base_i2c_devices[] = {
	{
		I2C_BOARD_INFO("ds2482", 0x30 >> 1),
		.platform_data = ds2482_set_slp_n,
	},
	{
		I2C_BOARD_INFO("cy8c-tmg-ts", 0x34),
		.platform_data = &mahimahi_cy8c_ts_data,
		.irq = MSM_GPIO_TO_INT(MAHIMAHI_GPIO_TP_INT_N),
	},
	{
		I2C_BOARD_INFO(SYNAPTICS_I2C_RMI_NAME, 0x40),
		.platform_data = mahimahi_synaptics_ts_data,
		.irq = MSM_GPIO_TO_INT(MAHIMAHI_GPIO_TP_INT_N)
	},
	{
		I2C_BOARD_INFO("mahimahi-microp", 0x66),
		.irq = MSM_GPIO_TO_INT(MAHIMAHI_GPIO_UP_INT_N)
	},
	{
		I2C_BOARD_INFO("s5k3e2fx", 0x20 >> 1),
	},
	{
		I2C_BOARD_INFO("tps65023", 0x48),
开发者ID:mnlk2-custom,项目名称:kernel_msm,代码行数:31,代码来源:board-mahimahi.c


示例2: I2C_BOARD_INFO

static struct touch_platform_data j1_ts_data = {
	.int_pin	= SYNAPTICS_TS_I2C_INT_GPIO,
	.reset_pin	= TOUCH_RESET,
	.maker		= "Synaptics",
	.fw_version	= "E129",
	.caps		= &touch_caps,
	.role		= &touch_role,
	.pwr		= &touch_pwr,
};

static struct i2c_board_info synaptics_ts_info[] = {
	[0] = {
		I2C_BOARD_INFO(LGE_TOUCH_NAME, 0x20),
		.platform_data = &j1_ts_data,
		.irq = MSM_GPIO_TO_INT(SYNAPTICS_TS_I2C_INT_GPIO),
	},
};
#endif





#if defined(CONFIG_RMI4_I2C)
struct syna_gpio_data {
	u16 gpio_number;
	char *gpio_name;
};

static int synaptics_touchpad_gpio_setup(void *gpio_data, bool configure)
开发者ID:AmperificSuperKANG,项目名称:lge-kernel-d802,代码行数:30,代码来源:board-vu3evb-input.c


示例3: MSM_GPIO_TO_INT

    SEC_BATTERY_FULL_CONDITION_VCELL,
    .full_condition_soc = 97,
    .full_condition_vcell = 4300,

    .recharge_check_count = 2,
    .recharge_condition_type =
    SEC_BATTERY_RECHARGE_CONDITION_VCELL,
    .recharge_condition_soc = 98,
    .recharge_condition_vcell = 4300,

    .charging_total_time = 6 * 60 * 60,
    .recharging_total_time = 90 * 60,
    .charging_reset_time = 0,

    /* Fuel Gauge */
    .fg_irq = MSM_GPIO_TO_INT(GPIO_FUEL_INT),
    .fg_irq_attr =
    IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
    .fuel_alert_soc = 4,
    .repeated_fuelalert = false,
    .capacity_calculation_type =
    SEC_FUELGAUGE_CAPACITY_TYPE_RAW |
    SEC_FUELGAUGE_CAPACITY_TYPE_SCALE |
    SEC_FUELGAUGE_CAPACITY_TYPE_DYNAMIC_SCALE,
    /* SEC_FUELGAUGE_CAPACITY_TYPE_ATOMIC, */
#if defined(CONFIG_MACH_MELIUS_SKT) || defined(CONFIG_MACH_MELIUS_KTT) || \
	defined(CONFIG_MACH_MELIUS_LGT)
    .capacity_max = 970,
#else
    .capacity_max = 1000,
#endif
开发者ID:dario97818,项目名称:Imperium_Kernel_TW_5.0.1,代码行数:31,代码来源:board-melius-battery.c


示例4: ARRAY_SIZE

#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
static unsigned int sdc4_sup_clk_rates[] = {
	400000, 24000000, 48000000
};

static struct mmc_platform_data msm8960_sdc4_data = {
	.ocr_mask       = MMC_VDD_165_195,
	.mmc_bus_width  = MMC_CAP_4_BIT_DATA,
	.sup_clk_table  = sdc4_sup_clk_rates,
	.sup_clk_cnt    = ARRAY_SIZE(sdc4_sup_clk_rates),
	.pclk_src_dfab  = 1,
	.vreg_data      = &mmc_slot_vreg_data[SDCC4],
	.pin_data       = &mmc_slot_pin_data[SDCC4],
	.sdiowakeup_irq = MSM_GPIO_TO_INT(85),
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
#endif

void __init fighter_init_mmc(void)
{
#ifdef CONFIG_MMC_MSM_SDC1_SUPPORT
	
	msm_add_sdcc(1, &msm8960_sdc1_data);
#endif
#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	
	msm_add_sdcc(2, &msm8960_sdc2_data);
#endif
#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
开发者ID:DennisBold,项目名称:android_kernel_htc_pyramid,代码行数:31,代码来源:board-fighter-storage.c


示例5: htcleo_init

static void __init htcleo_init(void)
{
#ifdef CONFIG_HTCLEO_BLINK_AT_BOOT
	volatile unsigned *bank6_in, *bank6_out;
#endif
	printk("htcleo_init()\n");

	msm_hw_reset_hook = htcleo_reset;

#ifdef CONFIG_PERFLOCK
	perflock_init(&htcleo_perflock_data);
#endif

	msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1,
			      &msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(139));

//	config_gpio_table(misc_gpio_table, ARRAY_SIZE(misc_gpio_table));

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

		gpio_request(HTCLEO_GPIO_TP_LS_EN, "tp_ls_en");
	gpio_direction_output(HTCLEO_GPIO_TP_LS_EN, 0);
	gpio_request(HTCLEO_GPIO_TP_EN, "tp_en");
	gpio_direction_output(HTCLEO_GPIO_TP_EN, 0);
//	gpio_request(HTCLEO_GPIO_PROXIMITY_EN, "proximity_en");
//	gpio_direction_output(HTCLEO_GPIO_PROXIMITY_EN, 1);
	gpio_request(HTCLEO_GPIO_LS_EN_N, "ls_en");
	gpio_request(HTCLEO_GPIO_COMPASS_RST_N, "compass_rst");
	gpio_direction_output(HTCLEO_GPIO_COMPASS_RST_N, 1);
	gpio_request(HTCLEO_GPIO_COMPASS_INT_N, "compass_int");
	gpio_direction_input(HTCLEO_GPIO_COMPASS_INT_N);

	gpio_request(HTCLEO_GPIO_DS2482_SLP_N, "ds2482_slp_n");

	/* set the gpu power rail to manual mode so clk en/dis will not
	 * turn off gpu power, and hang it on resume */
	htcleo_kgsl_power_rail_mode(0);
	htcleo_kgsl_power(true);

	msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;

	platform_add_devices(devices, ARRAY_SIZE(devices));

	i2c_register_board_info(0, base_i2c_devices,
		ARRAY_SIZE(base_i2c_devices));

	if (htcleo_init_mmc(system_rev, debug_uart) != 0)
		pr_crit("%s: Unable to initialize MMC\n", __func__);

	htcleo_audio_init();
	htcleo_headset_init();

	platform_device_register(&htcleo_timed_gpios);

	ds2784_battery_init();

	msm_acpu_clock_init(&htcleo_clock_data);



//}   what's this??


#ifdef CONFIG_SERIAL_MSM_HS
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
	msm_device_uart_dm1.name = "msm_serial_hs"; /* for bcm */
	msm_device_uart_dm1.resource[3].end = 6;
#endif

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

//	bt_export_bd_address();

	htcleo_audio_init();

//	msm_device_i2c_init();

	/* set the gpu power rail to manual mode so clk en/dis will not
	* turn off gpu power, and hang it on resume */

	htcleo_kgsl_power_rail_mode(0);
	htcleo_kgsl_power(false);
	mdelay(100);
	htcleo_kgsl_power(true);

	platform_add_devices(devices, ARRAY_SIZE(devices));

	htcleo_init_panel();


	i2c_register_board_info(0, base_i2c_devices, ARRAY_SIZE(base_i2c_devices));

#ifdef CONFIG_USB_ANDROID
//	htcleo_add_usb_devices();
#endif

//	htcleo_init_mmc(0);
	platform_device_register(&htcleo_timed_gpios);

//.........这里部分代码省略.........
开发者ID:charansingh,项目名称:cm-kernel,代码行数:101,代码来源:board-htcleo.c


示例6: dev_alloc_skb

		else
			wlan_static_skb[i] = dev_alloc_skb(8192);
	}
	for (i = 0; (i < PREALLOC_WLAN_NUMBER_OF_SECTIONS); i++) {
		wifi_mem_array[i].mem_ptr = kmalloc(wifi_mem_array[i].size,
							GFP_KERNEL);
		if (wifi_mem_array[i].mem_ptr == NULL)
			return -ENOMEM;
	}
	return 0;
}

static struct resource pyramid_wifi_resources[] = {
	[0] = {
		.name		= "bcm4329_wlan_irq",
		.start		= MSM_GPIO_TO_INT(PYRAMID_GPIO_WIFI_IRQ),
		.end		= MSM_GPIO_TO_INT(PYRAMID_GPIO_WIFI_IRQ),
#ifdef HW_OOB
		.flags          = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE,
#else
		.flags          = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
#endif
	},
};

static struct wifi_platform_data pyramid_wifi_control = {
	.set_power      = pyramid_wifi_power,
	.set_reset      = pyramid_wifi_reset,
	.set_carddetect = pyramid_wifi_set_carddetect,
	.mem_prealloc   = pyramid_wifi_mem_prealloc,
	.get_mac_addr	= pyramid_wifi_get_mac_addr,
开发者ID:freak007,项目名称:androsens4,代码行数:31,代码来源:board-pyramid-wifi.c


示例7: MSM_GPIO_TO_INT

		.settings = {
			[GPIOMUX_ACTIVE]    = &cam_settings[3],
			[GPIOMUX_SUSPENDED] = &cam_settings[0],
		},
	},
};

#define VFE_CAMIF_TIMER1_GPIO 2
#define VFE_CAMIF_TIMER2_GPIO 3
#define VFE_CAMIF_TIMER3_GPIO_INT 4
static struct msm_camera_sensor_strobe_flash_data strobe_flash_xenon = {
	.flash_trigger = VFE_CAMIF_TIMER2_GPIO,
	.flash_charge = VFE_CAMIF_TIMER1_GPIO,
	.flash_charge_done = VFE_CAMIF_TIMER3_GPIO_INT,
	.flash_recharge_duration = 50000,
	.irq = MSM_GPIO_TO_INT(VFE_CAMIF_TIMER3_GPIO_INT),
};

/*
 * QCT Original
 *
 * NOT USED!
 *
 */
#if !defined(CONFIG_MACH_LGE)
#ifdef CONFIG_MSM_CAMERA_FLASH
static struct msm_camera_sensor_flash_src msm_flash_src = {
	.flash_sr_type = MSM_CAMERA_FLASH_SRC_EXT,
	._fsrc.ext_driver_src.led_en = VFE_CAMIF_TIMER1_GPIO,
	._fsrc.ext_driver_src.led_flash_en = VFE_CAMIF_TIMER2_GPIO,
	._fsrc.ext_driver_src.flash_id = MAM_CAMERA_EXT_LED_FLASH_SC628A,
开发者ID:DrewC4,项目名称:Optimus-F7-fx1s,代码行数:31,代码来源:board-lx-camera.c


示例8: marvelc_sdslot_status

static unsigned int marvelc_sdslot_status(struct device *dev)
{
	unsigned int status;

	status = (unsigned int) gpio_get_value(MARVELC_GPIO_SDMC_CD_N);
	return (!status);
}

#define MARVELC_MMC_VDD		(MMC_VDD_28_29 | MMC_VDD_29_30)

static unsigned int marvelc_sdslot_type = MMC_TYPE_SD;

static struct mmc_platform_data marvelc_sdslot_data = {
	.ocr_mask	= MARVELC_MMC_VDD,
	.status_irq	= MSM_GPIO_TO_INT(MARVELC_GPIO_SDMC_CD_N),
	.status		= marvelc_sdslot_status,
	.translate_vdd	= marvelc_sdslot_switchvdd,
	.slot_type	= &marvelc_sdslot_type,
};

/* ---- WIFI ---- */

static uint32_t wifi_on_gpio_table[] = {
	PCOM_GPIO_CFG(51, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT3 */
	PCOM_GPIO_CFG(52, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT2 */
	PCOM_GPIO_CFG(53, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT1 */
	PCOM_GPIO_CFG(54, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT0 */
	PCOM_GPIO_CFG(55, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */
	PCOM_GPIO_CFG(56, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_16MA), /* CLK */
	PCOM_GPIO_CFG(29, 0, GPIO_INPUT, GPIO_NO_PULL, GPIO_4MA),  /* WLAN IRQ */
开发者ID:AOKP-Marvel,项目名称:OWL-Predator-KERNEL,代码行数:30,代码来源:board-marvelc-mmc.c


示例9: PM8921_GPIO_PM_TO_SYS

#ifndef MSM8930_PHASE_2
	.wpswitch_gpio	= PM8921_GPIO_PM_TO_SYS(16),
#else
	.wpswitch_gpio	= 66,
	.wpswitch_polarity = 1,
#endif
#endif
	.vreg_data	= &mmc_slot_vreg_data[SDCC3],
	.pin_data	= &mmc_slot_pin_data[SDCC3],
#ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION
#ifndef MSM8930_PHASE_2
	.status_gpio	= PM8921_GPIO_PM_TO_SYS(SD_CDETz),
	.status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, SD_CDETz),
#else
	.status_gpio	= SD_CDETz,
	.status_irq	= MSM_GPIO_TO_INT(SD_CDETz),
#endif
	.irq_flags	= IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
	.is_status_gpio_active_low = true,
#endif
#if 0
	.xpc_cap	= 1,
	.uhs_caps	= (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
			MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 |
			MMC_CAP_UHS_SDR104 | MMC_CAP_MAX_CURRENT_800),
#endif
	.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
#endif

void __init msm8930_init_mmc(void)
开发者ID:n-l-v,项目名称:android_kernel_htc_totemc2,代码行数:31,代码来源:board-tc2-storage.c


示例10: mmc_wimax_get_hostwakeup_IRQ_ID

int mmc_wimax_get_hostwakeup_IRQ_ID(void)
{
	return MSM_GPIO_TO_INT(mmc_wimax_get_hostwakeup_gpio());
}
开发者ID:RoyFerry,项目名称:mecha-2.6.35-gb-mr,代码行数:4,代码来源:board-speedy-mmc.c


示例11: gpio_direction_output

		gpio_direction_output(132, 1);
}

static void charm_ap2mdm_kpdpwr_off(void)
{
	if (machine_is_msm8x60_charm_surf())
		gpio_direction_output(132, 1);
	else
		gpio_direction_output(132, 0);

}

static struct resource charm_resources[] = {
	/* MDM2AP_ERRFATAL */
	{
		.start	= MSM_GPIO_TO_INT(133),
		.end	= MSM_GPIO_TO_INT(133),
		.flags = IORESOURCE_IRQ,
	},
	/* MDM2AP_STATUS */
	{
		.start	= MSM_GPIO_TO_INT(134),
		.end	= MSM_GPIO_TO_INT(134),
		.flags = IORESOURCE_IRQ,
	}
};

static struct charm_platform_data mdm_platform_data = {
	.charm_modem_on		= charm_ap2mdm_kpdpwr_on,
	.charm_modem_off	= charm_ap2mdm_kpdpwr_off,
};
开发者ID:Bengineered,项目名称:kernel-lge-msm7x30,代码行数:31,代码来源:devices-msm8x60.c


示例12: DMA_BIT_MASK

		.end   = DMOV_HSUART1_RX_CHAN,
		.name  = "uartdm_channels",
		.flags = IORESOURCE_DMA,
	},
	{
		.start = DMOV_HSUART1_TX_CRCI,
		.end   = DMOV_HSUART1_RX_CRCI,
		.name  = "uartdm_crci",
		.flags = IORESOURCE_DMA,
	},
};

static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32);

static struct msm_serial_hs_platform_data bt_uart_platform_data = {
	.wakeup_irq = MSM_GPIO_TO_INT(44),
	.wakeup_edge = IRQF_TRIGGER_RISING,
};

struct platform_device msm_device_uart_dm1 = {
	.name = "msm_serial_hs",
	.id = 0,
	.num_resources = ARRAY_SIZE(msm_uart1_dm_resources),
	.resource = msm_uart1_dm_resources,
	.dev		= {
		.dma_mask = &msm_uart_dm1_dma_mask,
		.coherent_dma_mask = DMA_BIT_MASK(32),
		.platform_data = &bt_uart_platform_data,
	},
};
开发者ID:10x-Amin,项目名称:nAa-kernel,代码行数:30,代码来源:devices.c


示例13: mahimahi_init

static void __init mahimahi_init(void)
{
	int ret;
	struct kobject *properties_kobj;

	printk("mahimahi_init() revision=%d\n", system_rev);

	if (is_cdma_version(system_rev))
		smd_set_channel_list(smd_cdma_default_channels,
					ARRAY_SIZE(smd_cdma_default_channels));

	msm_hw_reset_hook = mahimahi_reset;

	if (is_cdma_version(system_rev))
		msm_acpu_clock_init(&mahimahi_cdma_clock_data);
	else
		msm_acpu_clock_init(&mahimahi_clock_data);

	msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1,
			      &msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(139));

	config_gpio_table(misc_gpio_table, ARRAY_SIZE(misc_gpio_table));

	if (is_cdma_version(system_rev)) {
		bcm_bt_lpm_pdata.gpio_wake = MAHIMAHI_CDMA_GPIO_BT_WAKE;
		mahimahi_flashlight_data.torch = MAHIMAHI_CDMA_GPIO_FLASHLIGHT_TORCH;
		config_gpio_table(bt_gpio_table_rev_CX, ARRAY_SIZE(bt_gpio_table_rev_CX));
	} else {
		config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));
	}

	gpio_request(MAHIMAHI_GPIO_TP_LS_EN, "tp_ls_en");
	gpio_direction_output(MAHIMAHI_GPIO_TP_LS_EN, 0);
	gpio_request(MAHIMAHI_GPIO_TP_EN, "tp_en");
	gpio_direction_output(MAHIMAHI_GPIO_TP_EN, 0);
	gpio_request(MAHIMAHI_GPIO_PROXIMITY_EN, "proximity_en");
	gpio_direction_output(MAHIMAHI_GPIO_PROXIMITY_EN, 1);
	gpio_request(MAHIMAHI_GPIO_COMPASS_RST_N, "compass_rst");
	gpio_direction_output(MAHIMAHI_GPIO_COMPASS_RST_N, 1);
	gpio_request(MAHIMAHI_GPIO_COMPASS_INT_N, "compass_int");
	gpio_direction_input(MAHIMAHI_GPIO_COMPASS_INT_N);

	gpio_request(MAHIMAHI_GPIO_DS2482_SLP_N, "ds2482_slp_n");

	/* set the gpu power rail to manual mode so clk en/dis will not
	 * turn off gpu power, and hang it on resume */
	mahimahi_kgsl_power_rail_mode(0);
	mahimahi_kgsl_power(true);

	msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;

	platform_add_devices(devices, ARRAY_SIZE(devices));

	i2c_register_board_info(0, base_i2c_devices,
		ARRAY_SIZE(base_i2c_devices));

	if (system_rev == 0) {
		/* Only board after XB with Audience A1026 */
		i2c_register_board_info(0, rev0_i2c_devices,
			ARRAY_SIZE(rev0_i2c_devices));
	}

	if (system_rev > 0) {
		/* Only board after XB with Audience A1026 */
		i2c_register_board_info(0, rev1_i2c_devices,
			ARRAY_SIZE(rev1_i2c_devices));
	}

	if (is_cdma_version(system_rev)) {
		/* Only CDMA version with TI TPA2018D1 Speaker Amp. */
		i2c_register_board_info(0, rev_CX_i2c_devices,
			ARRAY_SIZE(rev_CX_i2c_devices));
		if ((system_rev & 0x0F) == 0x00) {
			a1026_data.gpio_a1026_clk = MAHIMAHI_CDMA_XA_AUD_A1026_CLK;
		} else if ((system_rev & 0x0F) >= 0x01) {
			a1026_data.gpio_a1026_wakeup = MAHIMAHI_CDMA_XB_AUD_A1026_WAKEUP;
			a1026_data.gpio_a1026_reset = MAHIMAHI_CDMA_XB_AUD_A1026_RESET;
			a1026_data.gpio_a1026_clk = MAHIMAHI_CDMA_XB_AUD_A1026_CLK;
		}
	}

	ret = mahimahi_init_mmc(system_rev, debug_uart);
	if (ret != 0)
		pr_crit("%s: Unable to initialize MMC\n", __func__);

	properties_kobj = kobject_create_and_add("board_properties", NULL);
	if (properties_kobj)
		ret = sysfs_create_group(properties_kobj,
					 &mahimahi_properties_attr_group);
	if (!properties_kobj || ret)
		pr_err("failed to create board_properties\n");

	mahimahi_audio_init();
	mahimahi_headset_init();

	if (system_rev > 0)
		platform_device_register(&mahimahi_timed_gpios);
	else
		msm_init_pmic_vibrator();
//.........这里部分代码省略.........
开发者ID:mnlk2-custom,项目名称:kernel_msm,代码行数:101,代码来源:board-mahimahi.c


示例14: MSM_GPIO_TO_INT

		.platform_data = htcleo_synaptics_ts_data,
		.irq = MSM_GPIO_TO_INT(HTCLEO_GPIO_TP_INT_N)
	},
	{
		I2C_BOARD_INFO("htcleo-microp", 0xCC >> 1),
		.platform_data = &microp_data,
		.irq = MSM_GPIO_TO_INT(HTCLEO_GPIO_UP_INT_N)
	},
	{
		I2C_BOARD_INFO("ds2482", 0x30 >> 1),
		.platform_data = ds2482_set_slp_n,
	},
	{
		I2C_BOARD_INFO(AKM8973_I2C_NAME, 0x1C),
		.platform_data = &compass_platform_data,
		.irq = MSM_GPIO_TO_INT(HTCLEO_GPIO_COMPASS_INT_N),
	},
	{
		I2C_BOARD_INFO("s5k3e2fx", 0x20 >> 1),
	},
	{
		I2C_BOARD_INFO("tps65023", 0x48),
		.platform_data = tps65023_data,
	},
};

static struct i2c_board_info rev_CX_i2c_devices[] = {
	{
		I2C_BOARD_INFO("tpa2018d1", 0x58),
		.platform_data = &tpa2018_data,
	},
开发者ID:charansingh,项目名称:cm-kernel,代码行数:31,代码来源:board-htcleo.c


示例15: Q7x27_kybd_hookswitch_irqsetup

int Q7x27_kybd_hookswitch_irqsetup(bool activate_irq)
{
	int rc = 0;
    bool  hook_sw_val;

	suspend_state_t SuspendState = PM_SUSPEND_ON;//FIH, KarenLiao, @20090731: [F0X.FC-41]: The action of Inserting headset is the wake up action.

	
    //printk(KERN_INFO "Q7x27_kybd_hookswitch_irqsetup \n"); 
    fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Q7x27_kybd_hookswitch_irqsetup\n");

//+++ FIH, KarenLiao, @20090731: [F0X.FC-41]: The action of Inserting headset is the wake up action.
	SuspendState = get_suspend_state();
	if(SuspendState == PM_SUSPEND_MEM)//3
	{
		if(kpdev)
		{
			input_report_key(kpdev, KEY_RINGSWITCH, KBD_IN_KEYPRESS);
			//printk(KERN_INFO "FIH: keypress KEY_RINGSWITCH = %d\n", KEY_LEFTSHIFT);
			fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keypress KEY_RINGSWITCH = %d\n",KEY_LEFTSHIFT);
			
			input_report_key(kpdev, KEY_RINGSWITCH, KBD_IN_KEYRELEASE);
			//printk(KERN_INFO "FIH: keyrelease KEY_RINGSWITCH = %d\n", KEY_LEFTSHIFT);
			fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keyrelease KEY_RINGSWITCH = %d\n",KEY_LEFTSHIFT);
			input_sync(kpdev);
		}
	}
//--- FIH, KarenLiao, @20090731: [F0X.FC-41]: The action of Inserting headset is the wake up action.

	if (activate_irq && (gpio_get_value(rd->hook_sw_pin) == 1)) {

/* FIH, PeterKCTseng, @20090603 { */
/* clear pending interrupt        */
        gpio_clear_detect_status(rd->hook_sw_pin);
   	    hook_sw_val = (bool)gpio_get_value(rd->hook_sw_pin);
  	    //printk(KERN_INFO "Read back hook switch eky <%d>\n", hook_sw_val);
  	    fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Read back hook switch key <%d>\n", hook_sw_val);
        mdelay(250);
/* } FIH, PeterKCTseng, @20090603 */

    	rc = request_irq(MSM_GPIO_TO_INT(rd->hook_sw_pin), &Q7x27_kybd_irqhandler,
			        (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING), 
			        Q7x27_kybd_name, rd);
	    if (rc < 0) {
    		//printk(KERN_ERR
		    //    "Could not register for  %s interrupt "
		    //    "(rc = %d)\n", Q7x27_kybd_name, rc);
		    fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Could not register for  %s interrupt(rc = %d) \n",Q7x27_kybd_name, rc);
		    rc = -EIO;
	    }
        fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Hook Switch IRQ Enable!\n");
        //printk(KERN_INFO "Hook Switch IRQ Enable! \n");
		rd->bHookSWIRQEnabled = true;
	} else {
		if (rd->bHookSWIRQEnabled)  {
			//printk(KERN_INFO "Free IRQ\n");
    		free_irq(MSM_GPIO_TO_INT(rd->hook_sw_pin), rd);
             fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Hook Switch IRQ disable\n");
            //printk(KERN_INFO "Hook Switch IRQ disable! \n");
			rd->bHookSWIRQEnabled = false;
		}
	}
	
	return rc;

}
开发者ID:Zesters,项目名称:Kernel_spicekey,代码行数:66,代码来源:7x27_kybd_fm6.c


示例16: dev_alloc_skb

		else
			wlan_static_skb[i] = dev_alloc_skb(8192);
	}
	for(i=0;( i < PREALLOC_WLAN_NUMBER_OF_SECTIONS );i++) {
		wifi_mem_array[i].mem_ptr = kmalloc(wifi_mem_array[i].size,
							GFP_KERNEL);
		if (wifi_mem_array[i].mem_ptr == NULL)
			return -ENOMEM;
	}
	return 0;
}

static struct resource htcleo_wifi_resources[] = {
	[0] = {
		.name		= "bcm4329_wlan_irq",
		.start		= MSM_GPIO_TO_INT(HTCLEO_GPIO_WIFI_IRQ),
		.end		= MSM_GPIO_TO_INT(HTCLEO_GPIO_WIFI_IRQ),
		.flags          = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
	},
};

static struct wifi_platform_data htcleo_wifi_control = {
	.set_power      = htcleo_wifi_power,
	.set_reset      = htcleo_wifi_reset,
	.set_carddetect = htcleo_wifi_set_carddetect,
	.mem_prealloc   = htcleo_wifi_mem_prealloc,
};

static struct platform_device htcleo_wifi_device = {
        .name           = "bcm4329_wlan",
        .id             = 1,
开发者ID:charansingh,项目名称:raiderx_htcleo,代码行数:31,代码来源:board-htcleo-wifi.c


示例17: Q7x27_kybd_volkey2

static void Q7x27_kybd_volkey2(struct work_struct *work)
{
	struct Q7x27_kybd_record *kbdrec= container_of(work, struct Q7x27_kybd_record, kybd_volkey2);
	struct input_dev *idev		= kbdrec->Q7x27_kybd_idev;
	bool debounceDelay		= false;
	
	bool voldn_val			= (bool)gpio_get_value(kbdrec->voldn_pin);
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++misty
	suspend_state_t SuspendState = PM_SUSPEND_ON;//0
	//-----------------------------------------------------------------misty
/* FIH, PeterKCTseng, @20090520 { */
/* The active type of input pin   */
#if ACTIVE_MODE_ENABLE // Peter, Debug
	bool state;
#endif
/* } FIH, PeterKCTseng, @20090520 */
    //fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"[Misty]VOL DN <%d>\n", voldn_val);
	//printk(KERN_INFO "VOL DN <%d>\n", voldn_val);

	disable_irq(MSM_GPIO_TO_INT(kbdrec->voldn_pin));
//+++++++++++++++++++++++++++++++FIH_F0X_misty
    if(EnableKeyInt)
    {
        SuspendState = get_suspend_state();
        if(SuspendState == PM_SUSPEND_MEM)
        {
            if(idev)
            {
            	input_report_key(idev, KEY_VOLUMEDOWN, KBD_IN_KEYPRESS);
            		//printk(KERN_INFO "FIH: keypress KEY_VOLUMEDOWN\n");
            		fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keypress KEY_VOLUMEDOWNP\n");
            	input_report_key(idev, KEY_VOLUMEDOWN, KBD_IN_KEYRELEASE);
            		//printk(KERN_INFO "FIH: keyrelease KEY_VOLUMEDOWN\n");
            		fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keyrelease KEY_VOLUMEDOWN\n");
            	input_sync(idev);
            }
        }
        //-------------------------------FIH_F0X_misty
        else
        {
        /* FIH, PeterKCTseng, @20090520 { */
        /* The active type of input pin   */
        #if ACTIVE_MODE_ENABLE // Peter, Debug
            state = (kbdrec->active.voldn_pin_actype == ACTIVE_HIGH) ? voldn_val : !voldn_val;
        	//printk(KERN_INFO "active type= %d \n", state);
        #endif
        /* } FIH, PeterKCTseng, @20090520 */
            if(idev)
            {
            	if (state) {
            		input_report_key(idev, KEY_VOLUMEDOWN, KBD_IN_KEYPRESS);
            		//printk(KERN_INFO "FIH: keypress KEY_VOLUMEDOWN\n");
            		fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keypress KEY_VOLUMEDOWN\n");
        // FIH, WillChen, 2009/08/14 ++
        //Press VolumeUp+VolumeDown+End key to force panic and dump log
        #ifdef CONFIG_FIH_FXX_FORCEPANIC
            		VDN_Key = true;
            		if (VUP_Key && VDN_Key && END_key)
            		{
            			printk(KERN_ERR "KPD: Three key panic!!\n");
            			flag = 1;
        				wake_up(&wq);
        				msleep(5000);
        				panic("Three key panic");
        			}
        #endif
        // FIH, WillChen, 2009/08/14 --
            	} else {
            		input_report_key(idev, KEY_VOLUMEDOWN, KBD_IN_KEYRELEASE);
            		//printk(KERN_INFO "FIH: keyrelease KEY_VOLUMEDOWN\n");		
            		fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keyrelease KEY_VOLUMEDOWN\n");
            		debounceDelay = true;
        // FIH, WillChen, 2009/08/14 ++
        //Press VolumeUp+VolumeDown+End key to force panic and dump log
        #ifdef CONFIG_FIH_FXX_FORCEPANIC
            		VDN_Key = false;
        #endif
        // FIH, WillChen, 2009/08/14 --
            	}
            
            	input_sync(idev);
            			//printk(KERN_INFO "FIH: keypress KEY_VOLUMEDOWN\n");	
            			fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: keypress KEY_VOLUMEDOWN\n");
            }	
        
        	if (debounceDelay) {
        		mdelay(KBD_DEBOUNCE_TIME); //Debounce
        	}
         }
    }//if(EnableKeyInt)
	enable_irq(MSM_GPIO_TO_INT(kbdrec->voldn_pin));
}
开发者ID:Zesters,项目名称:Kernel_spicekey,代码行数:92,代码来源:7x27_kybd_fm6.c


示例18: I2C_BOARD_INFO

    .disp_minx		= 0,
    .disp_maxx		= 479,
    .disp_miny		= 0,
    .disp_maxy		= 799,
    .irqflags		= IRQF_TRIGGER_LOW,
    .i2c_pull_up		= true,
    .reset_gpio		= MXT_TS_RESET_GPIO,
    .irq_gpio		= MXT_TS_IRQ_GPIO,
    .key_codes		= mxt_key_codes,
};

static struct i2c_board_info mxt_device_info[] __initdata = {
    {
        I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
        .platform_data = &mxt_platform_data,
        .irq = MSM_GPIO_TO_INT(MXT_TS_IRQ_GPIO),
    },
};

static int synaptics_touchpad_setup(void);

static struct msm_gpio clearpad3000_cfg_data[] = {
    {   GPIO_CFG(CLEARPAD3000_ATTEN_GPIO, 0, GPIO_CFG_INPUT,
        GPIO_CFG_NO_PULL, GPIO_CFG_6MA), "rmi4_attn"
    },
    {   GPIO_CFG(CLEARPAD3000_RESET_GPIO, 0, GPIO_CFG_OUTPUT,
        GPIO_CFG_PULL_DOWN, GPIO_CFG_8MA), "rmi4_reset"
    },
};

static struct rmi_XY_pair rmi_offset = {.x = 0, .y = 0};
开发者ID:juniskane,项目名称:android_kernel_nokia_msm8x25,代码行数:31,代码来源:board-msm7627a-io.c


示例19: Q7x27_kybd_probe


//.........这里部分代码省略.........
#if VOLUME_KEY_ENABLE // Peter, Debug
	INIT_WORK(&rd->kybd_volkey1, Q7x27_kybd_volkey1);
    INIT_WORK(&rd->kybd_volkey2, Q7x27_kybd_volkey2);
#endif


#if SWITCH_KEY_ENABLE // Peter, Debug
	INIT_WORK(&rd->hook_switchkey, Q7x27_hook_switchkey);


//  msm_mic_en_proc(true);

#endif

    KeySetup();

    /* FIH, Debbie, 2010/01/05 { */
    /* modify for key definition of OTA update*/
    if(fih_read_kpd_from_smem())
    {
    	   EnableKeyInt = 1;
    }
    /* FIH, Debbie, 2010/01/05 } */
#if 0//misty +++
    printk(KERN_INFO "FIH: enter 7\n");    
	rc = Q7x27_kybd_irqsetup(rd);
    printk(KERN_INFO "FIH: enter 8\n");        
	if (rc)
		goto failexit2;

	rc = testfor_keybd();
    printk(KERN_INFO "FIH: enter 9\n");    
	if (rc)
		goto failexit2;
	
	rd->kybd_connected = 1;
#endif//misty ---
/* FIH, SimonSSChang, 2009/09/04 { */
/* [FXX_CR], change keypad suspend/resume function
to earlysuspend */
#ifdef CONFIG_FIH_FXX
#ifdef CONFIG_HAS_EARLYSUSPEND
    rd->Q7x27_kybd_early_suspend_desc.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 10;
	rd->Q7x27_kybd_early_suspend_desc.suspend = Q7x27_kybd_early_suspend;
	rd->Q7x27_kybd_early_suspend_desc.resume = Q7x27_kybd_late_resume;
    //printk(KERN_INFO "Keypad register_early_suspend()\n");
    fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Keypad register_early_suspend()\n");
	register_early_suspend(&rd->Q7x27_kybd_early_suspend_desc);
    rd->pdev = pdev;
#endif
#endif
/* } FIH, SimonSSChang, 2009/09/04 */

    //FIH_debug_log
    //printk(KERN_INFO "FIH: out Q7x27_kybd_probe()\n");
    return 0;
#if 0//misty+++
 failexit2:
    //FIH_debug_log#if CAMERA_KEY_ENABLE // Peter, Debug

    printk(KERN_INFO "FIH: error out failexit2\n");
    
	free_irq(MSM_GPIO_TO_INT(rd->key_1_pin), rd);
	free_irq(MSM_GPIO_TO_INT(rd->key_2_pin), rd);

#if VOLUME_KEY_ENABLE // Peter, Debug
	free_irq(MSM_GPIO_TO_INT(rd->volup_pin), rd);
	free_irq(MSM_GPIO_TO_INT(rd->voldn_pin), rd);
#endif

#if CAMERA_KEY_ENABLE // Peter, Debug
	free_irq(MSM_GPIO_TO_INT(rd->cam_sw_t_pin), rd);
	free_irq(MSM_GPIO_TO_INT(rd->cam_sw_f_pin), rd);
#endif

#if SWITCH_KEY_ENABLE // Peter, Debug
	free_irq(MSM_GPIO_TO_INT(rd->hook_sw_pin), rd);
#endif

/* FIH, PeterKCTseng, @20090527 { */
/* add center key                 */
#if CENTER_KEY_ENABLE // Peter, Debug
	free_irq(MSM_GPIO_TO_INT(rd->center_pin), rd);
#endif
/* } FIH, PeterKCTseng, @20090527 */

#endif//misty----
 failexit1:
    //FIH_debug_log
    //printk(KERN_INFO "FIH: error out failexit1\n");
    fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"FIH: error out failexit1\n");
	Q7x27_kybd_release_gpio(rd);
	kfree(rd);

    //FIH_debug_log
    //printk(KERN_INFO "FIH: error out Q7x27_kybd_probe()\n");
    return 0;
    
	return rc;
}
开发者ID:Zesters,项目名称:Kernel_spicekey,代码行数:101,代码来源:7x27_kybd_fm6.c


示例20: heroc_sdslot_status

static unsigned int heroc_sdslot_status(struct device *dev)
{
	unsigned int status;

	status = (unsigned int) gpio_get_value(HEROC_GPIO_SDMC_CD_N);
	return (!status);
}

#define HEROC_MMC_VDD	MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30

static unsigned int heroc_sdslot_type = MMC_TYPE_SD;

static struct mmc_platform_data heroc_sdslot_data = {
	.ocr_mask	= HEROC_MMC_VDD,
	.status_irq	= MSM_GPIO_TO_INT(HEROC_GPIO_SDMC_CD_N),
	.status		= heroc_sdslot_status,
	.translate_vdd	= heroc_sdslot_switchvdd,
	.slot_type	= &heroc_sdslot_type,
};



/* ---- WIFI ---- */

static uint32_t wifi_on_gpio_table[] = {
	PCOM_GPIO_CFG(51, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT3 */
	PCOM_GPIO_CFG(52, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT2 */
	PCOM_GPIO_CFG(53, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT1 */
	PCOM_GPIO_CFG(54, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT0 */
	PCOM_GPIO_CFG(55, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */
开发者ID:adq,项目名称:kernel-hero,代码行数:30,代码来源:board-heroc-mmc.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MSQ_CHKERR函数代码示例发布时间:2022-05-30
下一篇:
C++ MSM_FB_INFO函数代码示例发布时间: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