示例#1
0
static void touchwake_early_suspend(struct early_suspend * h)
{
    if (touchwake_enabled)
	{
	    if (touchoff_delay > 0)
		{
		    if (!powerkey_pressed)
			{
			    wake_lock(&touchwake_wake_lock);

			    schedule_delayed_work(&touchoff_work, msecs_to_jiffies(touchoff_delay));
			}
		    else
			{
			    touchwake_disable_touch();
			}  
		}
	    else
		{
		    wake_lock(&touchwake_wake_lock);
		}
	}
    else
	{
	    touchwake_disable_touch();
	}

    device_suspended = true;

    return;
}
static void touchwake_early_suspend(struct early_suspend * h)
{
	#ifdef DEBUG_PRINT
	pr_info("[TOUCHWAKE] Enter early suspend\n");
	#endif

	if (touchwake_enabled) {
		if ((charge_info_cable_type != POWER_SUPPLY_TYPE_BATTERY) && charger_mode)	{
			if (timed_out && !prox_near) {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Charger plug mode - keep touch enabled indefinately\n");
				#endif
				wake_lock(&touchwake_wake_lock);
			}
		}
		else if (likely(touchoff_delay > 0))	{
			if (timed_out && !prox_near) {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - enable touch delay\n");
				#endif
				wake_lock(&touchwake_wake_lock);

				schedule_delayed_work(&touchoff_work, msecs_to_jiffies(touchoff_delay));
			} else {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - disable touch immediately\n");
				#endif
				touchwake_disable_touch();
			}
		} else {
			if (timed_out && !prox_near) {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - keep touch enabled indefinately\n");
				#endif
				wake_lock(&touchwake_wake_lock);
			} else {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (indefinate mode)\n");
				#endif
				touchwake_disable_touch();
			}
		}
	} else {
		#ifdef DEBUG_PRINT
		pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (TouchWake disabled)\n");
		#endif
		touchwake_disable_touch();
	}

	device_suspended = true;

	return;
}
示例#3
0
static void touchwake_touchoff(struct work_struct * touchoff_work)
{
	touchwake_disable_touch();
	wake_unlock(&touchwake_wake_lock);

	return;
}
static void touchwake_touchoff(struct work_struct *touchoff_work)
{
	touchwake_disable_touch();
	wake_unlock(&touchwake_wake_lock);
	led_trigger_event(&touchwake_led_trigger, LED_OFF);
    
	return;
}
示例#5
0
static void touchwake_touchoff(struct work_struct * touchoff_work)
{
    pr_info("%s: %s +\n", __func__, "sys_sync");
    sys_sync();
    pr_info("%s: %s -\n", __func__, "sys_sync");
    touchwake_disable_touch();
    wake_unlock(&touchwake_wake_lock);

    return;
}
示例#6
0
static void touchwake_touchoff(struct work_struct * touchoff_work)
{
	touchwake_disable_touch();
	wake_unlock(&touchwake_wake_lock);
#ifdef CONFIG_KERNEL_LED_ALERTS
	disable_led_alert(&touchwake_led_trigger);
#endif

	return;
}
示例#7
0
static void touchwake_early_suspend(struct early_suspend * h)
{
	#ifdef DEBUG_PRINT
	pr_info("[TOUCHWAKE] Enter early suspend\n");
	#endif

	if (touchwake_enabled) {
		if (likely(touchoff_delay > 0))	{
			if (timed_out && !prox_near) {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - enable touch delay\n");
				#endif
				
#ifdef CONFIG_KERNEL_LED_ALERTS
				enable_led_alert(&touchwake_led_trigger, LED_FULL);
#endif
				wake_lock(&touchwake_wake_lock);

				schedule_delayed_work(&touchoff_work, msecs_to_jiffies(touchoff_delay));
			} else {
				#ifdef DEBUG_PRINT
				pr_info("[TOUCHWAKE] Early suspend - disable touch immediately\n");
				#endif
				touchwake_disable_touch();
			}
		} else {
			#ifdef DEBUG_PRINT
			pr_info("[TOUCHWAKE] Early suspend - keep touch enabled indefinately\n");
			#endif
			wake_lock(&touchwake_wake_lock);
		}
	} else {
		#ifdef DEBUG_PRINT
		pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (TouchWake disabled)\n");
		#endif
		touchwake_disable_touch();
	}

	device_suspended = true;

	return;
}
示例#8
0
static void touchwake_early_suspend(struct early_suspend * h)
{
    if (touchwake_enabled)
	{
	if (!always_wake_enabled) {
		    if (touchoff_delay > 0)
			{
			    if (timed_out)
				    schedule_delayed_work(&touchoff_work, msecs_to_jiffies(touchoff_delay));
			    else
				    touchwake_disable_touch();
			}
		}
	}
    else
	{
	    touchwake_disable_touch();
	}

    device_suspended = true;
    return;
}
示例#9
0
static void touchwake_early_suspend(struct early_suspend *h)
{
	if (!touchwake_enabled)
		goto out;
    
	if (timed_out) {
		wake_lock(&touchwake_wake_lock);
		led_trigger_event(&touchwake_led_trigger, LED_FULL);
		schedule_delayed_work(&touchoff_work,
                              msecs_to_jiffies(touchoff_delay));
	} else
		touchwake_disable_touch();
    
out:
	device_suspended = true;
}
示例#10
0
static void touchwake_early_suspend(struct early_suspend * h)
{
#ifdef DEBUG_PRINT
    pr_info("[TOUCHWAKE] Enter early suspend\n");
#endif

    if (touchwake_enabled) {
        if (is_cable_attached) {
            if (likely(charging_touchoff_delay > 0)) {
                if (timed_out && !prox_near) {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - enable touch delay\n");
#endif
                    wake_lock(&touchwake_wake_lock);

                    schedule_delayed_work(&touchoff_work, msecs_to_jiffies(charging_touchoff_delay));
                } else {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - disable touch immediately\n");
#endif
                    touchwake_disable_touch();
                }
            } else {
                if (timed_out && !prox_near) {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - keep touch enabled indefinately\n");
#endif
                    wake_lock(&touchwake_wake_lock);
                } else {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (indefinate mode)\n");
#endif
                    touchwake_disable_touch();
                }
            }
        } else if (!charging_mode) {
            if (likely(touchoff_delay > 0))	{
                if (timed_out && !prox_near) {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - enable touch delay\n");
#endif
                    wake_lock(&touchwake_wake_lock);

                    schedule_delayed_work(&touchoff_work, msecs_to_jiffies(touchoff_delay));
                } else {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - disable touch immediately\n");
#endif
                    touchwake_disable_touch();
                }
            } else {
                if (timed_out && !prox_near) {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - keep touch enabled indefinately\n");
#endif
                    wake_lock(&touchwake_wake_lock);
                } else {
#ifdef DEBUG_PRINT
                    pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (indefinate mode)\n");
#endif
                    touchwake_disable_touch();
                }
            }
        } else {
#ifdef DEBUG_PRINT
            pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (TouchWake disabled when not charging)\n");
#endif
            touchwake_disable_touch();
        }
    } else {
#ifdef DEBUG_PRINT
        pr_info("[TOUCHWAKE] Early suspend - disable touch immediately (TouchWake disabled)\n");
#endif
        touchwake_disable_touch();
    }

    device_suspended = true;

    return;
}
示例#11
0
static void touchwake_touchoff(struct work_struct * touchoff_work)
{
    touchwake_disable_touch();
    return;
}