static void input_booster_change_dvfs_wacom_work(struct work_struct *work)
{
	int retval = 0;
	struct input_booster *booster =
		container_of(work,
				struct input_booster, work_dvfs_chg.work);

	mutex_lock(&booster->dvfs_lock);

	switch (booster->dvfs_boost_mode) {
	case DVFS_STAGE_SINGLE:
	case DVFS_STAGE_TRIPLE:
		retval = set_freq_limit(DVFS_TOUCH_ID, -1);
		booster->dvfs_freq = -1;
		break;
	case DVFS_STAGE_DUAL:
		retval = set_freq_limit(DVFS_TOUCH_ID,
				MIN_TOUCH_LIMIT_SECOND);
		booster->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
		break;
	}

	if (retval < 0)
		pr_info("%s: booster change failed(%d).\n",
			__func__, retval);

	mutex_unlock(&booster->dvfs_lock);
}
static void wacom_change_dvfs_lock(struct work_struct *work)
{
	struct wacom_i2c *wac_i2c =
		container_of(work,
			struct wacom_i2c, work_dvfs_chg.work);
	int retval = 0;

	mutex_lock(&wac_i2c->dvfs_lock);

	if (wac_i2c->dvfs_boost_mode == DVFS_STAGE_DUAL) {
		retval = set_freq_limit(DVFS_TOUCH_ID,
			MIN_TOUCH_LIMIT_SECOND);
		wac_i2c->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
	} else if (wac_i2c->dvfs_boost_mode == DVFS_STAGE_SINGLE ||
		wac_i2c->dvfs_boost_mode == DVFS_STAGE_TRIPLE) {
		retval = set_freq_limit(DVFS_TOUCH_ID, -1);
		wac_i2c->dvfs_freq = -1;
	}

	if (retval < 0)
		dev_info(&wac_i2c->client->dev,
			"%s: booster change failed(%d).\n",
			__func__, retval);
	mutex_unlock(&wac_i2c->dvfs_lock);
}
void wacom_set_dvfs_lock(struct wacom_i2c *wac_i2c, int on)
{
	int ret = 0;

	if (wac_i2c->dvfs_boost_mode == DVFS_STAGE_NONE) {
		dev_dbg(&wac_i2c->client->dev,
				"%s: DVFS stage is none(%d)\n",
				__func__, wac_i2c->dvfs_boost_mode);
		return;
	}

	mutex_lock(&wac_i2c->dvfs_lock);
	if (on == 0) {
		if (wac_i2c->dvfs_lock_status) {
			schedule_delayed_work(&wac_i2c->work_dvfs_off,
				msecs_to_jiffies(TOUCH_BOOSTER_OFF_TIME));
		}
	} else if (on > 0) {
		cancel_delayed_work(&wac_i2c->work_dvfs_off);

		if (!wac_i2c->dvfs_lock_status || wac_i2c->dvfs_old_stauts < on) {
			cancel_delayed_work(&wac_i2c->work_dvfs_chg);
			if (wac_i2c->dvfs_freq != MIN_TOUCH_LIMIT) {
				if (wac_i2c->dvfs_boost_mode == DVFS_STAGE_TRIPLE)
					ret = set_freq_limit(DVFS_TOUCH_ID,
						MIN_TOUCH_LIMIT_SECOND);
				else
					ret = set_freq_limit(DVFS_TOUCH_ID,
						MIN_TOUCH_LIMIT);
				wac_i2c->dvfs_freq = MIN_TOUCH_LIMIT;
				if (ret < 0)
					dev_info(&wac_i2c->client->dev,
						"%s: cpu first lock failed(%d)\n",
						__func__, ret);
			}
			schedule_delayed_work(&wac_i2c->work_dvfs_chg,
				msecs_to_jiffies(TOUCH_BOOSTER_CHG_TIME));

			wac_i2c->dvfs_lock_status = true;
		}
	} else if (on < 0) {
		if (wac_i2c->dvfs_lock_status) {
			cancel_delayed_work(&wac_i2c->work_dvfs_off);
			cancel_delayed_work(&wac_i2c->work_dvfs_chg);
			schedule_work(&wac_i2c->work_dvfs_off.work);
		}
	}
	wac_i2c->dvfs_old_stauts = on;
	mutex_unlock(&wac_i2c->dvfs_lock);
}
static int input_booster_set_dvfs_off(struct input_booster *booster)
{
	int retval;

	mutex_lock(&booster->dvfs_lock);

	retval = set_freq_limit(DVFS_TOUCH_ID, -1);
	if (retval < 0)
		pr_err("%s: booster stop failed(%d).\n",
					__func__, retval);

	if (booster->dvfs_id == INPUT_BOOSTER_ID_TKEY) {
		if (retval < 0)
			booster->dvfs_lock_status = false;
		else
			booster->dvfs_lock_status = true;
	} else {
		booster->dvfs_freq = -1;
		booster->dvfs_lock_status = false;
	}

	mutex_unlock(&booster->dvfs_lock);

	return retval;
}
static ssize_t boost_level_store(struct device *dev,
				   struct device_attribute *attr,
				   const char *buf, size_t count)
{
	struct wacom_i2c *wac_i2c = dev_get_drvdata(dev);
	int val, retval;

	dev_info(&wac_i2c->client->dev, "%s\n", __func__);
	sscanf(buf, "%d", &val);

	if (val != 1 && val != 2 && val != 3 && val != 0) {
		dev_info(&wac_i2c->client->dev,
			"%s: wrong cmd %d\n", __func__, val);
		return count;
	}
	wac_i2c->dvfs_boost_mode = val;
	dev_info(&wac_i2c->client->dev,
			"%s: dvfs_boost_mode = %d\n",
			__func__, wac_i2c->dvfs_boost_mode);

	if (wac_i2c->dvfs_boost_mode != DVFS_STAGE_TRIPLE) {
		wac_i2c->dvfs_freq = -1;
	} else if (wac_i2c->dvfs_boost_mode == DVFS_STAGE_NONE) {
		retval = set_freq_limit(DVFS_TOUCH_ID, -1);
		if (retval < 0) {
			dev_err(&wac_i2c->client->dev,
					"%s: booster stop failed(%d).\n",
					__func__, retval);
			wac_i2c->dvfs_lock_status = false;
		}
	}
	return count;
}
static void gpio_key_set_dvfs_lock(struct gpio_button_data *bdata,
					uint32_t on)
{
	int ret = 0;
	mutex_lock(&bdata->dvfs_lock);
	if (on == 0) {
		if (bdata->dvfs_lock_status) {
			schedule_delayed_work(&bdata->work_dvfs_off,
				msecs_to_jiffies(KEY_BOOSTER_OFF_TIME));
		}
	} else if (on == 1) {
		cancel_delayed_work(&bdata->work_dvfs_off);
		if (!bdata->dvfs_lock_status) {
			ret = set_freq_limit(DVFS_TOUCH_ID,
					MIN_TOUCH_LIMIT);
			if (ret < 0)
				printk(KERN_ERR
					"%s: cpu first lock failed(%d)\n",
					__func__, ret);

			schedule_delayed_work(&bdata->work_dvfs_chg,
				msecs_to_jiffies(KEY_BOOSTER_CHG_TIME));
			bdata->dvfs_lock_status = true;
		}
	}
	mutex_unlock(&bdata->dvfs_lock);
}
static void change_dvfs_lock(struct work_struct *work)
{
	struct cyttsp4_mt_data *md = container_of(work,struct cyttsp4_mt_data, work_dvfs_chg.work);
	int ret = 0;
	mutex_lock(&md->dvfs_lock);

	if (md->boost_level == DVFS_STAGE_DUAL) {
		ret = set_freq_limit(DVFS_TOUCH_ID, MIN_TOUCH_LIMIT_SECOND);
		md->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
	} else if (md->boost_level == DVFS_STAGE_SINGLE) {
		ret = set_freq_limit(DVFS_TOUCH_ID, -1);
		md->dvfs_freq = -1;
	}
	if (ret < 0)
		printk(KERN_ERR "[TSP] %s: booster stop failed(%d)\n",\
					__func__, __LINE__);

	mutex_unlock(&md->dvfs_lock);
}
static void set_dvfs_off(struct work_struct *work)
{
	struct cyttsp4_mt_data *md = container_of(work,struct cyttsp4_mt_data, work_dvfs_off.work);
	int ret;
	mutex_lock(&md->dvfs_lock);
	ret = set_freq_limit(DVFS_TOUCH_ID, -1);
	if (ret < 0)
		printk(KERN_ERR "[TSP] %s: booster stop failed(%d)\n",\
					__func__, __LINE__);
	md->dvfs_freq = -1;
	md->dvfs_lock_status = false;
	mutex_unlock(&md->dvfs_lock);
}
static void gpio_key_set_dvfs_off(struct work_struct *work)
{
	struct gpio_button_data *bdata =
		container_of(work,
			struct gpio_button_data, work_dvfs_off.work);
	int retval;
	mutex_lock(&bdata->dvfs_lock);
	retval = set_freq_limit(DVFS_TOUCH_ID, -1);
	if (retval < 0)
		printk(KERN_ERR
			"%s: booster stop failed(%d).\n",
			__func__, retval);
	bdata->dvfs_lock_status = false;
	mutex_unlock(&bdata->dvfs_lock);
}
static void gpio_key_change_dvfs_lock(struct work_struct *work)
{
	struct gpio_button_data *bdata =
		container_of(work,
			struct gpio_button_data, work_dvfs_chg.work);
	int retval;
	mutex_lock(&bdata->dvfs_lock);
	retval = set_freq_limit(DVFS_TOUCH_ID,
			MIN_TOUCH_LIMIT_SECOND);
	if (retval < 0)
		printk(KERN_ERR
			"%s: booster change failed(%d).\n",
			__func__, retval);
	mutex_unlock(&bdata->dvfs_lock);
}
static void set_dvfs_lock(struct cyttsp4_mt_data *md, int32_t on, bool mode)
{

	int ret = 0;

	if (md->boost_level == DVFS_STAGE_NONE) {
		printk(KERN_INFO "%s: DVFS stage is none(%d)\n", __func__, md->boost_level);
		return;
	}

	mutex_lock(&md->dvfs_lock);
	if (on == 0) {
		if (md->dvfs_lock_status) {
			schedule_delayed_work(&md->work_dvfs_off,msecs_to_jiffies(TOUCH_BOOSTER_OFF_TIME));
		}
	} else if (on == 1) {
		cancel_delayed_work(&md->work_dvfs_off);
		if (!md->dvfs_lock_status || mode) {
			if (md->dvfs_old_status != on) {
				cancel_delayed_work(&md->work_dvfs_chg);
					if (md->dvfs_freq != MIN_TOUCH_LIMIT) {
						ret = set_freq_limit(DVFS_TOUCH_ID,
								MIN_TOUCH_LIMIT);
						md->dvfs_freq = MIN_TOUCH_LIMIT;

						if (ret < 0)
							printk(KERN_ERR
								"%s: cpu first lock failed(%d)\n",
								__func__, ret);

				schedule_delayed_work(&md->work_dvfs_chg,
					msecs_to_jiffies(TOUCH_BOOSTER_CHG_TIME));

					md->dvfs_lock_status = true;
				}
			}
		}
	} else if (on == 2) {
		if (md->dvfs_lock_status) {
			cancel_delayed_work(&md->work_dvfs_off);
			cancel_delayed_work(&md->work_dvfs_chg);
			schedule_work(&md->work_dvfs_off.work);
		}
	}
	md->dvfs_old_status = on;
	mutex_unlock(&md->dvfs_lock);
}
static void wacom_set_dvfs_off(struct work_struct *work)
{
	struct wacom_i2c *wac_i2c =
		container_of(work,
			struct wacom_i2c, work_dvfs_off.work);
	int retval;

	mutex_lock(&wac_i2c->dvfs_lock);
	retval = set_freq_limit(DVFS_TOUCH_ID, -1);
	if (retval < 0)
		dev_info(&wac_i2c->client->dev,
			"%s: booster stop failed(%d).\n",
			__func__, retval);

	wac_i2c->dvfs_lock_status = false;
	mutex_unlock(&wac_i2c->dvfs_lock);
}
static void input_booster_change_dvfs_tkey_work(struct work_struct *work)
{
	int retval = 0;
	struct input_booster *booster =
		container_of(work,
				struct input_booster, work_dvfs_chg.work);

	mutex_lock(&booster->dvfs_lock);

	retval = set_freq_limit(DVFS_TOUCH_ID, booster->dvfs_freq);
	if (retval < 0)
		pr_info("%s: booster change failed(%d).\n",
			__func__, retval);

	booster->dvfs_lock_status = false;
	mutex_unlock(&booster->dvfs_lock);
}
Ejemplo n.º 14
0
static void gpio_key_change_dvfs_lock(struct work_struct *work)
{
    struct gpio_button_data *bdata =
        container_of(work,
                     struct gpio_button_data, work_dvfs_chg.work);
    int retval;
    unsigned int limit_second;
    mutex_lock(&bdata->dvfs_lock);
    limit_second = min_touch_limit_second;
    if (limit_second < CPU_MIN_FREQ)
        limit_second = CPU_MIN_FREQ;
    else if (limit_second > CPU_MAX_FREQ)
        limit_second = CPU_MAX_FREQ;
    retval = set_freq_limit(DVFS_TOUCH_ID,
                            limit_second);
    if (retval < 0)
        printk(KERN_ERR
               "%s: booster change failed(%d).\n",
               __func__, retval);
    mutex_unlock(&bdata->dvfs_lock);
}
Ejemplo n.º 15
0
static void gpio_key_set_dvfs_lock(struct gpio_button_data *bdata,
                                   uint32_t on)
{
    int ret = 0;
    unsigned int limit;
    unsigned int delay;

    if (dvfs_boost_mode == 0)
        return;

    mutex_lock(&bdata->dvfs_lock);
    if (on == 0) {
        if (bdata->dvfs_lock_status) {
            delay = booster_off_time;
            schedule_delayed_work(&bdata->work_dvfs_off,
                                  msecs_to_jiffies(delay));
        }
    } else if (on == 1) {
        cancel_delayed_work(&bdata->work_dvfs_off);
        if (!bdata->dvfs_lock_status) {
            limit = min_touch_limit;
            if (limit < CPU_MIN_FREQ)
                limit = CPU_MIN_FREQ;
            else if (limit > CPU_MAX_FREQ)
                limit = CPU_MAX_FREQ;
            ret = set_freq_limit(DVFS_TOUCH_ID,
                                 limit);
            if (ret < 0)
                printk(KERN_ERR
                       "%s: cpu first lock failed(%d)\n",
                       __func__, ret);

            delay = booster_chg_time;
            schedule_delayed_work(&bdata->work_dvfs_chg,
                                  msecs_to_jiffies(delay));
            bdata->dvfs_lock_status = true;
        }
    }
    mutex_unlock(&bdata->dvfs_lock);
}
static void input_booster_set_dvfs_tkey_lock(struct input_booster *booster, int on)
{
	int retval = 0;
	if (booster->dvfs_boost_mode == DVFS_STAGE_NONE) {
		pr_debug("%s: DVFS stage is none(%d)\n",
				__func__, booster->dvfs_boost_mode);
		return;
	}

	mutex_lock(&booster->dvfs_lock);
	if (on == 0) {
		cancel_delayed_work(&booster->work_dvfs_chg);

		if (booster->dvfs_lock_status) {
			retval = set_freq_limit(DVFS_TOUCH_ID, booster->dvfs_freq);

			if (retval < 0)
				pr_info("%s: cpu first lock failed(%d)\n", __func__, retval);
			booster->dvfs_lock_status = false;
		}

		schedule_delayed_work(&booster->work_dvfs_off,
			msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TKEY));

	} else if (on == 1) {
		cancel_delayed_work(&booster->work_dvfs_off);
		schedule_delayed_work(&booster->work_dvfs_chg,
			msecs_to_jiffies(INPUT_BOOSTER_OFF_TIME_TKEY));

	} else if (on == 2) {
		if (booster->dvfs_lock_status) {
			cancel_delayed_work(&booster->work_dvfs_off);
			cancel_delayed_work(&booster->work_dvfs_chg);
			schedule_work(&booster->work_dvfs_off.work);
		}
	}
	mutex_unlock(&booster->dvfs_lock);
}
static void input_booster_change_dvfs_tsp_work(struct work_struct *work)
{
	int retval = 0;
	struct input_booster *booster =
		container_of(work,
				struct input_booster, work_dvfs_chg.work);

	mutex_lock(&booster->dvfs_lock);

	switch (booster->dvfs_boost_mode) {
	case DVFS_STAGE_SINGLE:
	case DVFS_STAGE_TRIPLE:
	case DVFS_STAGE_PENTA:
		retval = set_freq_limit(DVFS_TOUCH_ID, -1);
#if INPUT_BIMC_MINLOCK
		pr_info("%s: bimc clk set: 0\n", __func__);
		request_bimc_clk(0);
#endif
		booster->dvfs_freq = -1;
		break;
	case DVFS_STAGE_DUAL:
#ifdef CONFIG_CPUFREQ_HARDLIMIT
		retval = set_freq_limit(DVFS_TOUCH_ID,
				check_cpufreq_hardlimit(touchboost_lo_freq));
#else
		retval = set_freq_limit(DVFS_TOUCH_ID,
				MIN_TOUCH_LIMIT_SECOND);
#endif
#if INPUT_BIMC_MINLOCK
		pr_info("%s: bimc clk set: %d\n",
				__func__, INPUT_BIMC_SECOND_LIMIT);
		request_bimc_clk(INPUT_BIMC_SECOND_LIMIT);
#endif
#ifdef CONFIG_CPUFREQ_HARDLIMIT
		booster->dvfs_freq = check_cpufreq_hardlimit(touchboost_lo_freq);
#else
		booster->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
#endif
		break;
	case DVFS_STAGE_NINTH:
#ifdef CONFIG_CPUFREQ_HARDLIMIT
        retval = set_freq_limit(DVFS_TOUCH_ID,
                check_cpufreq_hardlimit(touchboost_hi_freq));
#else
		retval = set_freq_limit(DVFS_TOUCH_ID,
				MIN_TOUCH_LIMIT);
#endif
#if INPUT_BIMC_MINLOCK
		pr_info("%s: bimc clk set: %d\n",
				__func__, INPUT_BIMC_LIMIT);
		request_bimc_clk(INPUT_BIMC_LIMIT);
#endif
#ifdef CONFIG_CPUFREQ_HARDLIMIT
        booster->dvfs_freq = check_cpufreq_hardlimit(touchboost_hi_freq);
#else
		booster->dvfs_freq = MIN_TOUCH_LIMIT;
#endif
		break;
	}

	if (retval < 0)
		pr_err("%s: booster change failed(%d).\n",
				__func__, retval);
	mutex_unlock(&booster->dvfs_lock);
}
static void input_booster_set_dvfs_tsp_lock(struct input_booster *booster, int on)
{
	int retval = 0;

	if (booster->dvfs_boost_mode == DVFS_STAGE_NONE) {
		pr_debug("%s: DVFS stage is none(%d)\n",
				__func__, booster->dvfs_boost_mode);
		return;
	}

	mutex_lock(&booster->dvfs_lock);

	if (on == 0) {
		if (booster->dvfs_lock_status) {
			switch (booster->dvfs_boost_mode) {
			case DVFS_STAGE_SINGLE:
			case DVFS_STAGE_DUAL:
			case DVFS_STAGE_TRIPLE:
			case DVFS_STAGE_PENTA:
				schedule_delayed_work(&booster->work_dvfs_off,
					msecs_to_jiffies(INPUT_BOOSTER_OFF_TIME_TSP));
				break;
			case DVFS_STAGE_NINTH:
				schedule_delayed_work(&booster->work_dvfs_off,
					msecs_to_jiffies(INPUT_BOOSTER_HIGH_OFF_TIME_TSP));
				break;
			}
		}
	} else if (on > 0) {
		cancel_delayed_work(&booster->work_dvfs_off);

		if ((!booster->dvfs_lock_status) || (booster->dvfs_old_stauts < on)) {
			cancel_delayed_work(&booster->work_dvfs_chg);

			switch (booster->dvfs_boost_mode) {
			case DVFS_STAGE_SINGLE:
			case DVFS_STAGE_DUAL:
				if (booster->dvfs_freq != MIN_TOUCH_LIMIT) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LIMIT);
					booster->dvfs_freq = MIN_TOUCH_LIMIT;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_TRIPLE:
				if (booster->dvfs_freq != MIN_TOUCH_LIMIT_SECOND) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LIMIT_SECOND);
					booster->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_PENTA:
				if (booster->dvfs_freq != MIN_TOUCH_LOW_LIMIT) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LOW_LIMIT);
					booster->dvfs_freq = MIN_TOUCH_LOW_LIMIT;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_NINTH:
				if (booster->dvfs_freq != MIN_TOUCH_HIGH_LIMIT) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_HIGH_LIMIT);
					booster->dvfs_freq = MIN_TOUCH_HIGH_LIMIT;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_HIGH_CHG_TIME_TSP));
				break;

			}

			if (retval < 0)
				pr_err("%s: cpu first lock failed(%d)\n",
						__func__, retval);

			booster->dvfs_lock_status = true;
		}

	} else if (on < 0) {
		if (booster->dvfs_lock_status) {
			cancel_delayed_work(&booster->work_dvfs_off);
			cancel_delayed_work(&booster->work_dvfs_chg);
			schedule_work(&booster->work_dvfs_off.work);
		}
	}

	booster->dvfs_old_stauts = on;
	mutex_unlock(&booster->dvfs_lock);
}
static void input_booster_set_dvfs_tsp_lock(struct input_booster *booster, int on)
{
	int retval = 0;

	if (booster->dvfs_boost_mode == DVFS_STAGE_NONE) {
		pr_debug("%s: DVFS stage is none(%d)\n",
				__func__, booster->dvfs_boost_mode);
		return;
	}

	mutex_lock(&booster->dvfs_lock);

	if (on == 0) {
		if (booster->dvfs_lock_status) {
			switch (booster->dvfs_boost_mode) {
			case DVFS_STAGE_SINGLE:
			case DVFS_STAGE_DUAL:
			case DVFS_STAGE_TRIPLE:
			case DVFS_STAGE_PENTA:
				schedule_delayed_work(&booster->work_dvfs_off,
					msecs_to_jiffies(INPUT_BOOSTER_OFF_TIME_TSP));
				break;
			case DVFS_STAGE_NINTH:
				schedule_delayed_work(&booster->work_dvfs_off,
					msecs_to_jiffies(INPUT_BOOSTER_HIGH_OFF_TIME_TSP));
				break;
			}
		}
	} else if (on > 0) {
		cancel_delayed_work(&booster->work_dvfs_off);

		if ((!booster->dvfs_lock_status) || (booster->dvfs_old_stauts < on)) {
			cancel_delayed_work(&booster->work_dvfs_chg);

			switch (booster->dvfs_boost_mode) {
			case DVFS_STAGE_SINGLE:
			case DVFS_STAGE_DUAL:
#ifdef CONFIG_CPUFREQ_HARDLIMIT
				if (booster->dvfs_freq != check_cpufreq_hardlimit(touchboost_hi_freq)) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							check_cpufreq_hardlimit(touchboost_hi_freq));
#else
				if (booster->dvfs_freq != MIN_TOUCH_LIMIT) {
                    retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LIMIT);
#endif
#if INPUT_BIMC_MINLOCK
					pr_info("%s: bimc clk set: %d\n",
							__func__, INPUT_BIMC_LIMIT);
					request_bimc_clk(INPUT_BIMC_LIMIT);
#endif
#ifdef CONFIG_CPUFREQ_HARDLIMIT
					booster->dvfs_freq = check_cpufreq_hardlimit(touchboost_hi_freq);
#else
					booster->dvfs_freq = MIN_TOUCH_LIMIT;
#endif
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_TRIPLE:
#ifdef CONFIG_CPUFREQ_HARDLIMIT
				if (booster->dvfs_freq != check_cpufreq_hardlimit(touchboost_lo_freq)) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							check_cpufreq_hardlimit(touchboost_lo_freq));
#else
				if (booster->dvfs_freq != MIN_TOUCH_LIMIT_SECOND) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LIMIT_SECOND);
#endif
#if INPUT_BIMC_MINLOCK
					pr_info("%s: bimc clk set: %d\n",
							__func__, INPUT_BIMC_SECOND_LIMIT);
					request_bimc_clk(INPUT_BIMC_SECOND_LIMIT);
#endif
#ifdef CONFIG_CPUFREQ_HARDLIMIT
					booster->dvfs_freq = check_cpufreq_hardlimit(touchboost_lo_freq);
#else
                    booster->dvfs_freq = MIN_TOUCH_LIMIT_SECOND;
#endif
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_PENTA:
				if (booster->dvfs_freq != MIN_TOUCH_LOW_LIMIT) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_LOW_LIMIT);
#if INPUT_BIMC_MINLOCK
					pr_info("%s: bimc clk set: %d\n",
							__func__, INPUT_BIMC_LOW_LIMIT);
					request_bimc_clk(INPUT_BIMC_LOW_LIMIT);
#endif
					booster->dvfs_freq = MIN_TOUCH_LOW_LIMIT;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_CHG_TIME_TSP));
				break;
			case DVFS_STAGE_NINTH:
				if (booster->dvfs_freq != MIN_TOUCH_HIGH_LIMIT) {
					retval = set_freq_limit(DVFS_TOUCH_ID,
							MIN_TOUCH_HIGH_LIMIT);
#if INPUT_BIMC_MINLOCK
					pr_info("%s: bimc clk set: %d\n",
							__func__, INPUT_BIMC_HIGH_LIMIT);
					request_bimc_clk(INPUT_BIMC_HIGH_LIMIT);
#endif
					booster->dvfs_freq = MIN_TOUCH_HIGH_LIMIT;
				}
				schedule_delayed_work(&booster->work_dvfs_chg,
					msecs_to_jiffies(INPUT_BOOSTER_HIGH_CHG_TIME_TSP));
				break;

			}

			if (retval < 0)
				pr_err("%s: cpu first lock failed(%d)\n",
						__func__, retval);

			booster->dvfs_lock_status = true;
		}

	} else if (on < 0) {