struct hrtimer tune_timer;
ktime_t tune_delay;
+ ktime_t tune_ramp;
u8 tune_out_last;
struct timer_list calibration_timer;
if ((cld->tune_out_last == cld->num_voltages) &&
(out_last >= cld->tune_high_out_min) &&
(out_min >= cld->tune_high_out_min)) {
- ktime_t ramp_delay =
- ktime_set(0, CL_DVFS_OUTPUT_RAMP_DELAY * 1000);
set_tune_state(cld, TEGRA_CL_DVFS_TUNE_HIGH_REQUEST_2);
- hrtimer_start(&cld->tune_timer, ramp_delay,
+ hrtimer_start(&cld->tune_timer, cld->tune_ramp,
HRTIMER_MODE_REL);
} else {
hrtimer_start(&cld->tune_timer, cld->tune_delay,
hrtimer_init(&cld->tune_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
cld->tune_timer.function = tune_timer_cb;
cld->tune_delay = ktime_set(0, CL_DVFS_TUNE_HIGH_DELAY * 1000);
+ if (!cld->p_data->tune_ramp_delay)
+ cld->p_data->tune_ramp_delay = CL_DVFS_OUTPUT_RAMP_DELAY;
+ cld->tune_ramp = ktime_set(0, cld->p_data->tune_ramp_delay * 1000);
+
+ /* init forced output resume delay */
+ if (!cld->p_data->resume_ramp_delay)
+ cld->p_data->resume_ramp_delay = CL_DVFS_OUTPUT_RAMP_DELAY;
/* init calibration timer */
init_timer_deferrable(&cld->calibration_timer);
!cld->safe_dvfs->dfll_data.is_bypass_down()) {
cl_dvfs_wmb(cld);
output_enable(cld);
- udelay(CL_DVFS_OUTPUT_RAMP_DELAY);
+ udelay(cld->p_data->resume_ramp_delay);
}
}
}
p_data->flags = flags;
dev_dbg(&pdev->dev, "DT: flags: 0x%x\n", p_data->flags);
+ OF_READ_U32_OPT(dn, tune-ramp-delay, p_data->tune_ramp_delay);
+ OF_READ_U32_OPT(dn, resume-ramp-delay, p_data->resume_ramp_delay);
+
/* pmic integration */
i2c_dn = of_parse_phandle(dn, "i2c-pmic-integration", 0);
pwm_dn = of_get_child_by_name(dn, "pwm-pmic-integration");