Exemple #1
0
void rpres_put(struct rpres *obj)
{
	struct rpres_platform_data *pdata = obj->pdev->dev.platform_data;
	mutex_lock(&obj->lock);
	if (obj->state == RPRES_INACTIVE) {
		pr_err("%s:resource already inactive\n", __func__);
	} else {
		pdata->ops->stop(obj->pdev);
		obj->state = RPRES_INACTIVE;
	}
	mutex_unlock(&obj->lock);
	omap4_dpll_cascading_blocker_release(&obj->pdev->dev);
}
int omap_device_scale_gpu(struct device *req_dev, struct device *target_dev,
                          unsigned long rate)
{
    unsigned long freq = 0;

    /* find lowest frequency */
    opp_find_freq_ceil(target_dev, &freq);

    if (rate > freq)
        omap4_dpll_cascading_blocker_hold(target_dev);
    else
        omap4_dpll_cascading_blocker_release(target_dev);

    return omap_device_scale(req_dev, target_dev, rate);
}