本文整理汇总了C++中MSM_GPIO_TO_INT函数的典型用法代码示例。如果您正苦于以下问题:C++ MSM_GPIO_TO_INT函数的具体用法?C++ MSM_GPIO_TO_INT怎么用?C++ MSM_GPIO_TO_INT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MSM_GPIO_TO_INT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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),
示例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)
示例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
示例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
示例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);
//.........这里部分代码省略.........
示例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,
示例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,
示例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 */
示例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)
示例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());
}
示例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,
};
示例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,
},
};
示例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();
//.........这里部分代码省略.........
示例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 = µp_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,
},
示例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;
}