diff options
author | Nishanth Menon <nm@ti.com> | 2011-11-28 16:07:15 -0600 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2011-11-30 15:29:18 -0800 |
commit | ce2832b7cfcb694978bc5b194a7a140ee589358c (patch) | |
tree | 160a2d4d4c34b8f694d352c1f8e7ed294a195f33 /arch/arm/mach-omap2/smartreflex.c | |
parent | c70d0702503f68d34b613f63f1a3d6d6821a95c5 (diff) | |
download | kernel_samsung_tuna-ce2832b7cfcb694978bc5b194a7a140ee589358c.zip kernel_samsung_tuna-ce2832b7cfcb694978bc5b194a7a140ee589358c.tar.gz kernel_samsung_tuna-ce2832b7cfcb694978bc5b194a7a140ee589358c.tar.bz2 |
OMAP4: PM: handle SR disable and reset error
If the smartreflex class disable and reset returns error,
abort the idle/suspend condition accordingly.
Change-Id: I1f912848d54706e63c020eba9b7867b12680760f
Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex.c')
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 1a11b95..05b1e85 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -994,27 +994,29 @@ void omap_sr_disable(struct voltagedomain *voltdm) * into the registered smartreflex class disable API. This API will tell * the smartreflex class disable to reset the VP voltage after * disabling smartreflex. + * + * Returns result of transition request. */ -void omap_sr_disable_reset_volt(struct voltagedomain *voltdm) +int omap_sr_disable_reset_volt(struct voltagedomain *voltdm) { struct omap_sr *sr = _sr_lookup(voltdm); if (IS_ERR(sr)) { pr_warning("%s: omap_sr struct for sr_%s not found\n", __func__, voltdm->name); - return; + return -ENODEV; } if (!sr->autocomp_active) - return; + return 0; if (!sr_class || !(sr_class->disable)) { dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not" "registered\n", __func__); - return; + return -ENODEV; } - sr_class->disable(voltdm, sr->voltdm_cdata, + return sr_class->disable(voltdm, sr->voltdm_cdata, omap_voltage_get_curr_vdata(voltdm), 1); } |