From: chenzhen Date: Thu, 23 Feb 2017 02:02:37 +0000 (+0800) Subject: Revert "Revert "MALI: midgard: support sharing regulator with other devices"" X-Git-Tag: firefly_0821_release~332 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30e2eaaf4bdb6c31d07d3b27b885b7acc2cf2377;p=firefly-linux-kernel-4.4.55.git Revert "Revert "MALI: midgard: support sharing regulator with other devices"" This reverts commit eb6c2ed7207f4dd086548dd58589ed4ea042504f. Change-Id: I09424d08bfac3457da24b10fe2b97d2856399e63 Signed-off-by: chenzhen --- diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c index 22f67916b549..0bf5fcd21c03 100644 --- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c +++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c @@ -77,7 +77,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags) #ifdef CONFIG_REGULATOR if (kbdev->current_voltage == voltage) return 0; - err = regulator_set_voltage(kbdev->regulator, voltage, voltage); + err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX); if (err) { dev_err(dev, "Failed to set voltage (%d)\n", err); return err; @@ -90,7 +90,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags) #ifdef CONFIG_REGULATOR if (kbdev->regulator && kbdev->current_voltage != voltage && old_freq < freq) { - err = regulator_set_voltage(kbdev->regulator, voltage, voltage); + err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX); if (err) { dev_err(dev, "Failed to increase voltage (%d)\n", err); return err; @@ -110,7 +110,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags) #ifdef CONFIG_REGULATOR if (kbdev->regulator && kbdev->current_voltage != voltage && old_freq > freq) { - err = regulator_set_voltage(kbdev->regulator, voltage, voltage); + err = regulator_set_voltage(kbdev->regulator, voltage, INT_MAX); if (err) { dev_err(dev, "Failed to decrease voltage (%d)\n", err); return err;