Hi,
Paul Fertser wrote:
On Fri, Jun 05, 2009 at 10:17:13AM +0200, Michael Trimarchi wrote:
Paul Fertser wrote:
After suspending with GPS powered on power_on sysfs node reports 0 and GPS
is actually unpowered but "echo 1 > power_on" has no effect. This patch
fixes it.
[snip]
- if (!neo1973_gps.power_was_on)
+ if
(!regulator_is_enabled(neo1973_gps.regulator[GTA02_GPS_REG_RF_3V]))
Ok this force the power on, but why you don't force the power off? I
must take a look
to the code.
Michael, the reason is simple: during suspend we disable GPS power but we
want to re-enable it after resume. For that we use power_was_on variable.
So a case when power_was_on is 1 and we need to actually turn on the power
is perfectly reasonable while power_was_on can be set to 0 only after
turning of the power,
Ok
so it's consistent and no need to check if regulator
is enabled.
If it's desired i can resend the patch with this clarification added to
commit message.
Thank's for the clarification, no need to resend for me.
We must go ahead to fix the remains BUG.
Regards
Michael