Skip to content

Commit

Permalink
mms_ts: make touch boost level configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhanmoral committed Aug 17, 2012
1 parent 7e218f0 commit 8d201f5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions drivers/input/touchscreen/mms_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,18 @@ static void set_dvfs_off(struct work_struct *work)
mutex_unlock(&info->dvfs_lock);
}

int touch_boost_level = 10;
static void set_dvfs_lock(struct mms_ts_info *info, uint32_t on)
{
int ret;

mutex_lock(&info->dvfs_lock);
if (info->cpufreq_level <= 0) {
ret = exynos_cpufreq_get_level(800000, &info->cpufreq_level);
if (ret < 0)
pr_err("[TSP] exynos_cpufreq_get_level error");
goto out;
}
// if (info->cpufreq_level <= 0) {
// ret = exynos_cpufreq_get_level(800000, &info->cpufreq_level);
// if (ret < 0)
// pr_err("[TSP] exynos_cpufreq_get_level error");
// goto out;
// }
if (on == 0) {
if (info->dvfs_lock_status) {
cancel_delayed_work(&info->work_dvfs_chg);
Expand All @@ -468,15 +469,15 @@ static void set_dvfs_lock(struct mms_ts_info *info, uint32_t on)

} else if (on == 1) {
cancel_delayed_work(&info->work_dvfs_off);
if (!info->dvfs_lock_status) {
if (!info->dvfs_lock_status && touch_boost_level >= 0) {
ret = dev_lock(bus_dev, sec_touchscreen, 400200);
if (ret < 0) {
pr_err("%s: dev lock failed(%d)\n",\
__func__, __LINE__);
}

ret = exynos_cpufreq_lock(DVFS_LOCK_ID_TSP,
info->cpufreq_level);
touch_boost_level);
if (ret < 0)
pr_err("%s: cpu lock failed(%d)\n",\
__func__, __LINE__);
Expand All @@ -485,7 +486,7 @@ static void set_dvfs_lock(struct mms_ts_info *info, uint32_t on)
msecs_to_jiffies(TOUCH_BOOSTER_CHG_TIME));

info->dvfs_lock_status = true;
pr_debug("[TSP] DVFS On![%d]", info->cpufreq_level);
pr_debug("[TSP] DVFS On![%d]", touch_boost_level);
}
} else if (on == 2) {
cancel_delayed_work(&info->work_dvfs_off);
Expand Down

0 comments on commit 8d201f5

Please sign in to comment.