本文整理汇总了C++中set_touchkey_debug函数的典型用法代码示例。如果您正苦于以下问题:C++ set_touchkey_debug函数的具体用法?C++ set_touchkey_debug怎么用?C++ set_touchkey_debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_touchkey_debug函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sec_touchkey_early_suspend
static int sec_touchkey_early_suspend(struct early_suspend *h)
{
struct touchkey_i2c *tkey_i2c =
container_of(h, struct touchkey_i2c, early_suspend);
int ret;
int i;
#if defined(CONFIG_S2VE_TOUCHKEY_REV05)
set_touchkey_debug('S');
printk(KERN_DEBUG "[TouchKey] sec_touchkey_early_suspend\n");
touchkey_suspended = 1;
printk(KERN_ERR"sec_touchkey_early_suspend++\n");
touchkey_led_on(tkey_i2c, 0);
disable_irq(tkey_i2c->irq);
gpio_set_value(TOUCHKEY_SDA, 1);
gpio_set_value(TOUCHKEY_SCL, 1);
Touchkey_PowerOnOff(0);
msleep(10);
enable_irq(tkey_i2c->irq);
#else
gpio_set_value(TOUCHKEY_SDA, 1);
gpio_set_value(TOUCHKEY_SCL, 1);
disable_irq(tkey_i2c->irq);
ret = cancel_work_sync(&tkey_i2c->update_work);
if (ret) {
printk(KERN_DEBUG "[Touchkey] enable_irq ret=%d\n", ret);
enable_irq(tkey_i2c->irq);
}
/* release keys */
for (i = 1; i < touchkey_count; ++i) {
input_report_key(tkey_i2c->input_dev,
touchkey_keycode[i], 0);
}
input_sync(tkey_i2c->input_dev);
touchkey_enable = 0;
set_touchkey_debug('S');
printk(KERN_DEBUG "[TouchKey] sec_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
#endif
return 0;
}
开发者ID:CVlaspoel,项目名称:VSMC-i9105p,代码行数:56,代码来源:cypress-touchkey.c
示例2: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
#ifdef CONFIG_GENERIC_BLN
if(0) {
#else
if(1) {
#endif
touchkey_enable = 0;
}
set_touchkey_debug('S');
printk(KERN_DEBUG "melfas_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
disable_irq(IRQ_TOUCH_INT);
touchkey_power_off();
}
static void melfas_touchkey_early_resume(struct early_suspend *h)
{
set_touchkey_debug('R');
printk(KERN_DEBUG "melfas_touchkey_early_resume\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
#ifndef CONFIG_S5PC110_DEMPSEY_BOARD
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
#endif
#if !(defined(CONFIG_ARIES_NTT) || defined(CONFIG_S5PC110_DEMPSEY_BOARD))
gpio_direction_output(_3_GPIO_TOUCH_CE, 1);
#endif
init_hw();
msleep(50);
//clear interrupt
if (readl(gpio_pend_mask_mem) & (0x1 << 1))
writel(readl(gpio_pend_mask_mem) | (0x1 << 1),
gpio_pend_mask_mem);
enable_irq(IRQ_TOUCH_INT);
touchkey_enable = 1;
}
开发者ID:LinuxBozo,项目名称:Defuse-Kernel,代码行数:48,代码来源:cypress-touchkey.c
示例3: melfas_touchkey_early_resume
static void melfas_touchkey_early_resume(struct early_suspend *h)
{
set_touchkey_debug('R');
printk(KERN_DEBUG "melfas_touchkey_early_resume\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
#ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
touchkey_power_on();
#else
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
#if !defined(CONFIG_ARIES_NTT)
gpio_direction_output(_3_GPIO_TOUCH_CE, 1);
#endif
#endif
msleep(50);
//clear interrupt
if (readl(gpio_pend_mask_mem) & (0x1 << 1))
writel(readl(gpio_pend_mask_mem) | (0x1 << 1),
gpio_pend_mask_mem);
enable_irq(IRQ_TOUCH_INT);
touchkey_enable = 1;
}
开发者ID:developerfromAplerOS,项目名称:universal_lagfix_kernel,代码行数:28,代码来源:cypress-touchkey.c
示例4: melfas_touchkey_early_resume
static void melfas_touchkey_early_resume(struct early_suspend *h)
{
set_touchkey_debug('R');
printk(KERN_DEBUG "[TKEY] melfas_touchkey_early_resume\n");
if (touchkey_enable < 0) {
printk("[TKEY] %s touchkey_enable: %d\n", __FUNCTION__, touchkey_enable);
return;
}
tkey_vdd_enable(1);
gpio_request(GPIO_TOUCHKEY_SCL, "TKEY_SCL");
gpio_direction_input(GPIO_TOUCHKEY_SCL);
gpio_request(GPIO_TOUCHKEY_SDA, "TKEY_SDA");
gpio_direction_input(GPIO_TOUCHKEY_SDA);
init_hw();
if(touchled_cmd_reversed) {
touchled_cmd_reversed = 0;
msleep(100);
if(!touchkey_enable )
touchkey_enable = 1;
i2c_touchkey_write(&touchkey_led_status, 1);
printk("[TKEY] LED RESERVED !! LED returned on touchkey_led_status = %d\n", touchkey_led_status);
}
if (get_hw_rev() >=0x02){
tkey_led_vdd_enable(1);
}
enable_irq(IRQ_TOUCHKEY_INT);
touchkey_enable = 1;
msleep(50);
touchkey_auto_calibration(1/*on*/);
}
开发者ID:CL0SeY,项目名称:kernel_P7320T_ICS,代码行数:35,代码来源:cypress-touchkey_q1_skt.c
示例5: melfas_touchkey_early_resume
static void melfas_touchkey_early_resume(struct early_suspend *h)
{
set_touchkey_debug('R');
printk(KERN_DEBUG "melfas_touchkey_early_resume\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
#if !(defined(CONFIG_ARIES_NTT) || defined(CONFIG_S5PC110_CELOX_BOARD))
gpio_direction_output(_3_GPIO_TOUCH_CE, 1);
#endif
msleep(50);
//clear interrupt
#if defined(CONFIG_S5PC110_CELOX_BOARD)
if (readl(gpio_pend_mask_mem) & (0x1 << 5))
writel(readl(gpio_pend_mask_mem) | (0x1 << 5),
gpio_pend_mask_mem);
#else
if (readl(gpio_pend_mask_mem) & (0x1 << 1))
writel(readl(gpio_pend_mask_mem) | (0x1 << 1),
gpio_pend_mask_mem);
#endif
enable_irq(IRQ_TOUCH_INT);
touchkey_enable = 1;
}
开发者ID:AustinBleax,项目名称:Bali_SK4G,代码行数:30,代码来源:melfas-touchkey.c
示例6: melfas_touchkey_early_suspend
static int melfas_touchkey_early_suspend(struct early_suspend *h)
{
touchkey_enable = 0;
set_touchkey_debug('S');
printk(KERN_DEBUG "[TouchKey] melfas_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n", __func__, touchkey_enable);
return 0;
}
disable_irq(IRQ_TOUCH_INT);
gpio_direction_input(_3_GPIO_TOUCH_INT);
#if 0
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
gpio_direction_output(_3_TOUCH_SDA_28V, 0);
gpio_direction_output(_3_TOUCH_SCL_28V, 0);
s3c_gpio_setpull(_3_GPIO_TOUCH_INT, S3C_GPIO_PULL_DOWN);
#endif
/* disable ldo18 */
touchkey_led_ldo_on(0);
/* disable ldo11 */
touchkey_ldo_on(0);
screen_on = 0;
return 0;
}
开发者ID:myfluxi,项目名称:xxKernel,代码行数:29,代码来源:cypress-touchkey.c
示例7: melfas_touchkey_early_resume
static void melfas_touchkey_early_resume(struct early_suspend *h)
{
set_touchkey_debug('R');
printk(KERN_DEBUG "melfas_touchkey_early_resume : %x\n", touchkey_enable);
if (touchkey_enable == 1)
return;
mutex_lock(&melfas_touchkey_use);
if(touchkey_enable < 0)
{
printk(KERN_DEBUG "---%s---touchkey_enable: %d\n",__FUNCTION__, touchkey_enable);
mutex_unlock(&melfas_touchkey_use);
return;
}
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
gpio_direction_output(_3_GPIO_TOUCH_CE, 1);
msleep(50);
//clear interrupt
if (readl(gpio_pend_mask_mem) & (0x1 << 1))
writel(readl(gpio_pend_mask_mem)|(0x1<<1), gpio_pend_mask_mem);
enable_irq(IRQ_TOUCH_INT);
touchkey_enable = 1;
mutex_unlock(&melfas_touchkey_use);
}
开发者ID:ptlgf,项目名称:android_samsung_ariesctc,代码行数:31,代码来源:melfas-touchkey-aries.c
示例8: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
set_touchkey_debug('S');
printk(KERN_DEBUG "melfas_touchkey_early_suspend : %x\n", touchkey_enable);
if (touchkey_enable == 0)
return;
mutex_lock(&melfas_touchkey_use);
if(touchkey_enable < 0)
{
printk(KERN_DEBUG "---%s---touchkey_enable: %d\n",__FUNCTION__, touchkey_enable);
mutex_unlock(&melfas_touchkey_use);
return;
}
disable_irq(IRQ_TOUCH_INT);
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
gpio_direction_output(_3_GPIO_TOUCH_CE, 0);
gpio_direction_output(_3_TOUCH_SDA_28V, 0);
gpio_direction_output(_3_TOUCH_SCL_28V, 0);
touchkey_enable = 0;
mutex_unlock(&melfas_touchkey_use);
}
开发者ID:ptlgf,项目名称:android_samsung_ariesctc,代码行数:26,代码来源:melfas-touchkey-aries.c
示例9: touchkey_interrupt
static irqreturn_t touchkey_interrupt(int irq, void *dummy)
{
set_touchkey_debug('I');
disable_irq_nosync(IRQ_TOUCH_INT);
queue_work(touchkey_wq, &touchkey_work);
return IRQ_HANDLED;
}
开发者ID:AustinBleax,项目名称:Bali_SK4G,代码行数:8,代码来源:melfas-touchkey.c
示例10: melfas_touchkey_late_resume
static int melfas_touchkey_late_resume(struct early_suspend *h)
{
#ifdef TEST_JIG_MODE
unsigned char get_touch = 0x40;
#endif
set_touchkey_debug('R');
printk(KERN_DEBUG "[TouchKey] melfas_touchkey_late_resume\n");
/* enable ldo11 */
touchkey_ldo_on(1);
if (touchkey_enable < 0) {
printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
gpio_direction_output(_3_TOUCH_SDA_28V, 1);
gpio_direction_output(_3_TOUCH_SCL_28V, 1);
gpio_direction_output(_3_GPIO_TOUCH_INT, 1);
set_irq_type(IRQ_TOUCH_INT, IRQF_TRIGGER_FALLING);
s3c_gpio_cfgpin(_3_GPIO_TOUCH_INT, _3_GPIO_TOUCH_INT_AF);
s3c_gpio_setpull(_3_GPIO_TOUCH_INT, S3C_GPIO_PULL_NONE);
msleep(50);
touchkey_led_ldo_on(1);
#ifdef WHY_DO_WE_NEED_THIS
/* clear interrupt */
if (readl(gpio_pend_mask_mem) & (0x1 << 1)) {
writel(readl(gpio_pend_mask_mem) | (0x1 << 1),
gpio_pend_mask_mem);
}
#endif
enable_irq(IRQ_TOUCH_INT);
touchkey_enable = 1;
if (touchled_cmd_reversed) {
touchled_cmd_reversed = 0;
i2c_touchkey_write(&touchkey_led_status, 1);
printk("LED returned on\n");
}
#ifdef TEST_JIG_MODE
i2c_touchkey_write(&get_touch, 1);
#endif
return 0;
}
开发者ID:FrozenData,项目名称:SGS2-Kernel-Update2,代码行数:52,代码来源:cypress-touchkey.c
示例11: touchkey_enable_disable
static ssize_t touchkey_enable_disable(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
#if 0
printk("touchkey_enable_disable %c \n", *buf);
if (*buf == '0') {
set_touchkey_debug('d');
disable_irq(IRQ_TOUCH_INT);
#ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
touchkey_power_off();
#else
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
#if !defined(CONFIG_ARIES_NTT)
gpio_direction_output(_3_GPIO_TOUCH_CE, 0);
#endif
#endif
touchkey_enable = -2;
} else if (*buf == '1') {
if (touchkey_enable == -2) {
set_touchkey_debug('e');
#ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
touchkey_power_on();
#else
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
#if !defined(CONFIG_ARIES_NTT)
gpio_direction_output(_3_GPIO_TOUCH_CE, 1);
#endif
#endif
touchkey_enable = 1;
enable_irq(IRQ_TOUCH_INT);
}
} else {
printk("touchkey_enable_disable: unknown command %c \n", *buf);
}
#endif
return size;
}
开发者ID:developerfromAplerOS,项目名称:universal_lagfix_kernel,代码行数:38,代码来源:cypress-touchkey.c
示例12: sec_touchkey_late_resume
static int sec_touchkey_late_resume(struct early_suspend *h)
{
struct touchkey_i2c *tkey_i2c =
container_of(h, struct touchkey_i2c, early_suspend);
#ifdef TEST_JIG_MODE
unsigned char get_touch = 0x40;
#endif
set_touchkey_debug('R');
printk(KERN_DEBUG "[TouchKey] sec_touchkey_late_resume\n");
#if defined(CONFIG_S2VE_TOUCHKEY_REV05)
printk(KERN_ERR"sec_touchkey_late_resume++\n");
Touchkey_PowerOnOff(1);
gpio_set_value(TOUCHKEY_SDA, 0);
gpio_set_value(TOUCHKEY_SCL, 0);
touchkey_led_on(tkey_i2c, 1);
touchkey_suspended = 0;
#else
if (touchkey_enable < 0) {
printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
msleep(50);
touchkey_enable = 1;
#if defined(TK_HAS_AUTOCAL)
touchkey_autocalibration(tkey_i2c);
#endif
if (touchled_cmd_reversed) {
touchled_cmd_reversed = 0;
i2c_touchkey_write(tkey_i2c->client,
(u8 *) &touchkey_led_status, 1);
printk(KERN_DEBUG "[Touchkey] LED returned on\n");
}
#ifdef TEST_JIG_MODE
i2c_touchkey_write(tkey_i2c->client, &get_touch, 1);
#endif
enable_irq(tkey_i2c->irq);
#endif
return 0;
}
开发者ID:CVlaspoel,项目名称:VSMC-i9105p,代码行数:50,代码来源:cypress-touchkey.c
示例13: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
set_touchkey_debug('S');
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
touchkey_enable = 0;
disable_irq(IRQ_TOUCH_INT);
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
gpio_direction_output(_3_GPIO_TOUCH_CE, 0);
gpio_direction_output(_3_TOUCH_SDA_28V, 0);
gpio_direction_output(_3_TOUCH_SCL_28V, 0);
}
开发者ID:AustinBleax,项目名称:Bali_SK4G,代码行数:15,代码来源:melfas-touchkey-aries.c
示例14: touchkey_enable_disable
static ssize_t touchkey_enable_disable(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
#if 0
printk("touchkey_enable_disable %c \n", *buf);
if (*buf == '0') {
set_touchkey_debug('d');
disable_irq(IRQ_TOUCH_INT);
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
touchkey_enable = -2;
} else if (*buf == '1') {
if (touchkey_enable == -2) {
set_touchkey_debug('e');
gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
touchkey_enable = 1;
enable_irq(IRQ_TOUCH_INT);
}
} else {
printk("touchkey_enable_disable: unknown command %c \n", *buf);
}
#endif
return size;
}
开发者ID:AntonX,项目名称:android_kernel_gb_sgs4g,代码行数:24,代码来源:cypress-touchkey.c
示例15: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
touchkey_enable = 0;
set_touchkey_debug('S');
printk(KERN_DEBUG "melfas_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return ;
}
disable_irq(IRQ_TOUCH_INT);
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
#if !(defined(CONFIG_ARIES_NTT) || defined(CONFIG_S5PC110_CELOX_BOARD))
gpio_direction_output(_3_GPIO_TOUCH_CE, 0);
#endif
gpio_direction_output(_3_TOUCH_SDA_28V, 0);
gpio_direction_output(_3_TOUCH_SCL_28V, 0);
}
开发者ID:AustinBleax,项目名称:Bali_SK4G,代码行数:19,代码来源:melfas-touchkey.c
示例16: sec_touchkey_late_resume
static int sec_touchkey_late_resume(struct early_suspend *h)
{
struct touchkey_i2c *tkey_i2c =
container_of(h, struct touchkey_i2c, early_suspend);
#ifdef TEST_JIG_MODE
unsigned char get_touch = 0x40;
#endif
set_touchkey_debug('R');
pr_debug("[TouchKey] sec_touchkey_late_resume\n");
/* enable ldo11 */
tkey_i2c->pdata->power_on(1);
if (touchkey_enable < 0) {
pr_debug("[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
msleep(50);
tkey_i2c->pdata->led_power_on(1);
touchkey_enable = 1;
#if defined(TK_HAS_AUTOCAL)
touchkey_autocalibration(tkey_i2c);
#endif
if (touchled_cmd_reversed) {
touchled_cmd_reversed = 0;
i2c_touchkey_write(tkey_i2c->client,
(u8 *) &touchkey_led_status, 1);
pr_debug("[Touchkey] LED returned on\n");
}
#ifdef TEST_JIG_MODE
i2c_touchkey_write(tkey_i2c->client, &get_touch, 1);
#endif
enable_irq(tkey_i2c->irq);
return 0;
}
开发者ID:android-armv7a-belalang-tempur,项目名称:android_kernel_samsung_smdk4210-1,代码行数:42,代码来源:cypress-touchkey.c
示例17: sec_touchkey_early_suspend
static int sec_touchkey_early_suspend(struct early_suspend *h)
{
struct touchkey_i2c *tkey_i2c =
container_of(h, struct touchkey_i2c, early_suspend);
int ret;
int i;
disable_irq(tkey_i2c->irq);
ret = cancel_work_sync(&tkey_i2c->update_work);
if (ret) {
pr_debug("[Touchkey] enable_irq ret=%d\n", ret);
enable_irq(tkey_i2c->irq);
}
/* release keys */
for (i = 1; i < touchkey_count; ++i) {
input_report_key(tkey_i2c->input_dev,
touchkey_keycode[i], 0);
}
input_sync(tkey_i2c->input_dev);
touchkey_enable = 0;
set_touchkey_debug('S');
pr_debug("[TouchKey] sec_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
pr_debug("[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
/* disable ldo18 */
tkey_i2c->pdata->led_power_on(0);
/* disable ldo11 */
tkey_i2c->pdata->power_on(0);
return 0;
}
开发者ID:android-armv7a-belalang-tempur,项目名称:android_kernel_samsung_smdk4210-1,代码行数:38,代码来源:cypress-touchkey.c
示例18: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
touchkey_enable = 0;
set_touchkey_debug('S');
printk(KERN_DEBUG "melfas_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__,
touchkey_enable);
return;
}
disable_irq(IRQ_TOUCH_INT);
#ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
touchkey_power_off_with_i2c();
#else
gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
#if !defined(CONFIG_ARIES_NTT)
gpio_direction_output(_3_GPIO_TOUCH_CE, 0);
#endif
gpio_direction_output(_3_TOUCH_SDA_28V, 0);
gpio_direction_output(_3_TOUCH_SCL_28V, 0);
#endif
}
开发者ID:developerfromAplerOS,项目名称:universal_lagfix_kernel,代码行数:23,代码来源:cypress-touchkey.c
示例19: melfas_touchkey_early_suspend
static void melfas_touchkey_early_suspend(struct early_suspend *h)
{
int index =0;
int ret = 0;
signed char int_data[] ={0x80};
touchkey_enable = 0;
set_touchkey_debug('S');
printk(KERN_DEBUG "melfas_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
printk("---%s---touchkey_enable: %d\n", __FUNCTION__, touchkey_enable);
return;
}
disable_irq(IRQ_TOUCHKEY_INT);
tkey_vdd_enable(0);
gpio_direction_output(GPIO_TOUCHKEY_SCL, 0);
gpio_free(GPIO_TOUCHKEY_SCL);
gpio_direction_output(GPIO_TOUCHKEY_SDA, 0);
gpio_free(GPIO_TOUCHKEY_SDA);
for (index = 1; index< sizeof(touchkey_keycode)/sizeof(*touchkey_keycode); index++)
{
if(touchkey_pressed & (1<<index))
{
input_report_key(touchkey_driver->input_dev, touchkey_keycode[index], 0);
input_sync(touchkey_driver->input_dev);
printk ("[TEKY] suspend: release unreleased keycode: [%d]\n", touchkey_keycode[index]);
}
}
touchkey_pressed = 0;
touchkey_enable = 0;
press_check = 0;
}
开发者ID:CL0SeY,项目名称:kernel_P7320T_ICS,代码行数:36,代码来源:cypress-touchkey_q1_skt.c
示例20: touchkey_interrupt
static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
{
struct touchkey_i2c *tkey_i2c = dev_id;
u8 data[18];
int ret;
int retry = 10;
int keycode_type = 0;
int pressed;
printk("[TouchKey] %s", __func__);
set_touchkey_debug('a');
retry = 3;
while (retry--) {
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 18);
if (!ret)
break;
else {
printk(KERN_DEBUG
"[TouchKey] i2c read failed, ret:%d, retry: %d\n",
ret, retry);
continue;
}
}
if (ret < 0)
return IRQ_HANDLED;
menu_sensitivity = data[13];
back_sensitivity = data[11];
set_touchkey_debug(data[0]);
keycode_type = (data[0] & TK_BIT_KEYCODE);
pressed = !(data[0] & TK_BIT_PRESS_EV);
if (keycode_type <= 0 || keycode_type >= touchkey_count) {
printk(KERN_DEBUG "[Touchkey] keycode_type err\n");
return IRQ_HANDLED;
}
if (pressed)
set_touchkey_debug('P');
if (get_tsp_status() && pressed)
printk(KERN_DEBUG "[TouchKey] touchkey pressed"
" but don't send event because touch is pressed.\n");
else {
input_report_key(touchkey_driver->input_dev,
touchkey_keycode[keycode_type], pressed);
input_sync(touchkey_driver->input_dev);
/* printk(KERN_DEBUG "[TouchKey] keycode:%d pressed:%d\n",
touchkey_keycode[keycode_index], pressed); */
}
if (keycode_type == 2)
printk(KERN_DEBUG "back key sensitivity = %d\n",
back_sensitivity);
if (keycode_type == 4)
printk(KERN_DEBUG "menu key sensitivity = %d\n",
menu_sensitivity);
set_touchkey_debug('A');
return IRQ_HANDLED;
}
开发者ID:CVlaspoel,项目名称:VSMC-i9105p,代码行数:66,代码来源:cypress-touchkey.c
注:本文中的set_touchkey_debug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论