lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] regulator: s2mps11: Add set_suspend_disable for S2MPS14
On Wed, Mar 05, 2014 at 10:22:52AM +0100, Krzysztof Kozlowski wrote:

> + ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &data);
> + if (ret < 0)
> + return ret;
> +
> + /*
> + * Don't enable suspend mode if regulator is already disabled because
> + * this would effectively for a short time turn on the regulator after
> + * resuming.
> + */
> + if (!(data & rdev->desc->enable_mask))
> + return 0;
> +
> + return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
> + rdev->desc->enable_mask, S2MPS14_ENABLE_SUSPEND);
> +}

What happens if the regulator gets enabled between this being called
and the device suspending? I'd expect this to be storing the state and
then changing what gets written during enable and disable operations (if
the hardware does what I think it does).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-03-09 17:01    [W:0.117 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site