コード例 #1
0
static void cypress_touchkey_enable_led_notification(void){
	/* is_powering_on signals whether touchkey lights are used for touchmode */
	if (blndevdata->is_powering_on){
		/* reconfigure gpio for sleep mode */
		blndevdata->pdata->touchkey_sleep_onoff(TOUCHKEY_ON);

		/*
		 * power on the touchkey controller
		 * This is actually not needed, but it is intentionally
		 * left for the case that the early_resume() function
		 * did not power on the touchkey controller for some reasons
		 */
		blndevdata->pdata->touchkey_onoff(TOUCHKEY_ON);

		/* write to i2cbus, enable backlights */
		enable_touchkey_backlights();
	}
	else
#ifdef CONFIG_TOUCH_WAKE
	    {
		enable_touchkey_backlights();
	    }
#else
	    pr_info("%s: cannot set notification led, touchkeys are enabled\n",__FUNCTION__);
#endif
}
コード例 #2
0
static ssize_t blink_control_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
{
	unsigned int data;

	if (sscanf(buf, "%u\n", &data) == 1) {
		if(data == 0 || data == 1) {
			if (bln_notification_ongoing) {
				pr_devel("%s: %u \n", __FUNCTION__, data);
				if (data == 1) {
					bln_blink_enabled = true;
					_pr_info("%s: disabling bln\n", __FUNCTION__); // remove me
					disable_touchkey_backlights();
				}

				if(data == 0){
					bln_blink_enabled = false;
					_pr_info("%s: enabling bln\n", __FUNCTION__); // remove me
					enable_touchkey_backlights();
				}
			}

		} else
			_pr_info3("%s: wrong input %u\n", __FUNCTION__, data);
	} else
		_pr_info("%s: input error\n", __FUNCTION__);

	return size;
}
コード例 #3
0
static void enable_led_notification(void){
	if (bln_enabled){
		/* is_powering_on signals whether touchkey lights are used for touchmode */
		pr_info("%s: bln interface enabled\n", __FUNCTION__); //remove me
		
		if (bln_devdata->is_powering_on){
		pr_info("%s: not in touchmode\n", __FUNCTION__); //remove me
			/* signal ongoing led notification */
			bln_notification_ongoing = true;

			/*
			 * power on the touchkey controller
			 * This is actually not needed, but it is intentionally
			 * left for the case that the early_resume() function
			 * did not power on the touchkey controller for some reasons
			 */
			pr_info("%s: enable vdd\n", __FUNCTION__); //remove me
			bln_devdata->pdata->touchkey_onoff(TOUCHKEY_ON);

			/* write to i2cbus, enable backlights */
			pr_info("%s: enable lights\n", __FUNCTION__); //remove me
			enable_touchkey_backlights();

			pr_info("%s: notification led enabled\n", __FUNCTION__);
		}
		else
			pr_info("%s: cannot set notification led, touchkeys are enabled\n",__FUNCTION__);
	}
}
コード例 #4
0
ファイル: leds-msm-pmic.c プロジェクト: mb-14/gt-s7500_kernel
static void enable_led_notification(void){
	if (bln_enabled){
		/* signal ongoing led notification */
		bln_notification_ongoing = true;
		enable_touchkey_backlights();
		printk("%s: notification led enabled\n", __FUNCTION__);
	}
}
コード例 #5
0
static void enable_led_notification(void){

        if( bln_enabled ){
            if( touchkey_enable != 1 ){
                if( bln_suspended ){
                    touchkey_activate();
                }
            }
            if( touchkey_enable == 1 ){
                printk(KERN_DEBUG "[TouchKey] BLN_ongoing set to true\n");
                BLN_ongoing = true;
                enable_touchkey_backlights();
            }
        }

}
コード例 #6
0
static ssize_t blink_control_write( struct device *dev, struct device_attribute *attr, const char *buf, size_t size ){
        unsigned int data;

        if( sscanf(buf, "%u\n", &data ) == 1 ){
            if( data == 0 || data == 1 ){
                if (data == 1){
                    bln_blink_enabled = true;
                    disable_touchkey_backlights();
                }

                if(data == 0){
                    bln_blink_enabled = false;
                    enable_touchkey_backlights();
                }
            }
        }

        return size;
}