On Thu, Nov 26, 2009 at 2:40 AM, Michael Trimarchi < [email protected]> wrote:
> Hi, > > Nick Pelly wrote: > > On Wed, Nov 25, 2009 at 5:06 PM, Michael Trimarchi > > <[email protected] <mailto:[email protected]>> wrote: > > > > Hi, > > > > Michael Trimarchi wrote: > > > Hi all, > > > > > > I would like to know how android deal with the problem of data > > buffering > > > during mobile phone suspend. > > > This is a scenario: > > > > > > linux start to suspend and no wakelock are acquired by any > > subsystem and > > > the application that read from > > > the serial device is froozen, but the application does't know > > exaclty > > > when it will go to sleep so it can > > > give this info to the gsm modem (rise up RTS). The modem is > > connected to > > > the serial and try to send data, > > > linux buffer it but doesnt't give any info to the application. > > It can be > > > happen or there is somenthing > > > wrong on this scenario? > > > > > > Michael > > > > > I have seen that the msn kernel serial driver acquire a wake lock > > on rx path > > but it is not clear how it force the gsm to start to buffering during > > suspend. > > If the gsm has hw flow control the driver must block the gsm to > > trasmit > > to the host > > to avoid data lost. Is this correct? > > > > > > If you want to put the apps CPU to sleep (for example, > > power-collapse-from-suspend, which is on the linux suspend path), and > > continue to be ready to receive RX data over a uart, then you'll want > > to keep the uart clocked on and make the uart irq a wakeup irq. > Before deactivate the clock on the suspend path you must stop the gsm to > send info using the control line, so the gsm can start > to buffer, then you can deactivate the clock. When the GSM has data it > can send you and interrupt and wakeup. So using the > wakelock avoid half sms arrive in the tty buffer but control the line > before suspend avoid data lost. Is this the idea? > > I have to admit i'm not sure what the situation is for the GSM. I was involved with the UART for the Bluetooth chip - which has to be able to wake up the Apps CPU with data at any time. Nick -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
