Girish,

I do have the power management code within the Kernel enabled since my
screen timeout causes the system to go into the suspend state. I can
then hit the Power button to wake up the system nicely.

When I do press the Power button while the system is active, I don't
see any messages related to early_suspend, any ideas on what exactly I
should be looking for??

Regards
-- Ashwin



On Sat, Feb 27, 2010 at 2:53 AM, girish <[email protected]> wrote:
> Ok, I get your point. Mapping the power key is the first thing to do. Rest
> android should take care...
>
> Can you attach your defconfig file, need to check if all the proper power
> flags are enabled..which is
> important for android power frmwork to work.
>
> Also, when you press the power key do you see any early_suspend dumps on the
> terminal? if it
> does and doesn't go any further to suspend to RAM that means someone is
> holding a wake_lock.
>
> -Girish
>>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Ashwin Bihari <[email protected]>
>> Date: Fri, Feb 26, 2010 at 8:41 AM
>> Subject: Re: [android-porting] Power button functionality
>> (sleep/resume/wakeup)
>> To: girish <[email protected]>
>>
>>
>> Girish,
>>
>> No, I don't want the power button to turn the device off, I've already
>> implemented that at the Kernel level through a different scheme. I
>> want to invoke the Linux Power Manage suspend and resume functionality
>> with the power button through Android. If you take any Android phone
>> right now, there's usually a single button (the top button on the
>> Motorola Droid for example) that when pressed will put the device to
>> sleep if it was awake or wake it up if it was asleep. In the sleep
>> mode the LCD is turned off and the touchscreen doesn't respond to
>> anything.
>>
>> It's basically what happens when you let the screen timeout and the
>> device goes to sleep. The power button allows you to put the device to
>> sleep faster, and that's the functionality I'm trying to implement.
>>
>> I have the power button mapped to KeyEvent.KEYCODE_POWER in my Android
>> build, but that doesn't do anything..
>>
>> Regards
>> -- Ashwin
>>
>>
>>
>> On Fri, Feb 26, 2010 at 12:05 AM, girish <[email protected]> wrote:
>> > I guess you intend to power off the device when you hit the power button
>> > right?
>> >
>> > First, the keycode as you mentioned should map Android power key.
>> > Secondly,
>> > you should
>> > have proper hook in baseport level for pm_power_off() for DEVICE OFF.
>> >
>> >
>> > -Girish
>> >
>> > On Wed, Feb 24, 2010 at 9:16 AM, Ashwin Bihari <[email protected]>
>> > wrote:
>> >>
>> >> I've got a custom board designed around the OMAP3530 and we have a
>> >> power button the device that we want to use to cause Android to go to
>> >> sleep or wakeup based on it's current state.
>> >>
>> >> I've done a few searches and have figured out the the function
>> >> goToSleep within the PowerManager handles this functionality. For the
>> >> power button handler, I'm sending the KEY_POWER eventcode into
>> >> Android..this is mapped appropriately into Andriod as
>> >> KeyEvent.KEYCODE_POWER. However, pressing the button doesn't cause
>> >> anything to happen with Android..what am I missing in making my
>> >> connections?
>> >>
>> >> Regards
>> >> -- Ashwin
>> >>
>> >> --
>> >> unsubscribe: [email protected]
>> >> website: http://groups.google.com/group/android-porting
>> >
>> >
>>
>> --
>> unsubscribe: [email protected]
>> website: http://groups.google.com/group/android-porting
>
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to