Skip to contentSkip to conversation

atmel_serial: update the powersave handler to match serial core

PATCH Michael Trimarchi 2 participants 2 messages Sep 19, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hi,

(I'll change my mailer soon ...), sorry if I break the thread.

----- Messaggio originale -----

Quoted 12 lines

Da: Haavard Skinnemoen <[email protected]>
A: Michael Trimarchi <[email protected]>
Cc: [email protected]; [email protected]; Andrew Victor <[email protected]>; Anti Sullin <[email protected]>
Inviato: Venerdì 19 settembre 2008, 17:46:15
Oggetto: Re: [PATCH] atmel_serial: update the powersave handler to match serial core

Quoted 5 lines · Michael Trimarchi
Quoted 5 lines
(quoted diff) +5 -0
+    /* we can not wake up if we're running on slow clock */
+    atmel_port->may_wakeup = device_may_wakeup(&pdev->dev);
+    if (atmel_serial_clk_will_stop())
+        device_set_wakeup_enable(&pdev->dev, 0);
+  
Quoted 6 lines
Quoted 3 lines

This is not true, the wakeup in the slow clock is possible, configure the input pin of the serial device as a gpio, and wake up on gpio. Then you must reconfigure as a serial pin, and you can wake up on slow clock.

Yes, but the current driver doesn't actually support that, does it?

Yes I know, but we can think about it and support when is possible
to wake-up the serial device. Each serial device can change the status of the gpio-pin before suspendig and register and handler on it (I think one interrupt handler for all the serial that can do that), then reset it after resume. I think not all the serial device can do that in the atmel architectures but I suppose that can be very usefull for example in gprs application.

Quoted 5 lines

This patch doesn't really change that assumption anyway -- it just implements it in a way more consistent with the current serial core.

Haavard

Regards Michael

__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 13 lines · Michael Trimarchi
Quoted 6 lines
Quoted 5 lines · Michael Trimarchi
Quoted 5 lines
(quoted diff) +5 -0
+    /* we can not wake up if we're running on slow clock */
+    atmel_port->may_wakeup = device_may_wakeup(&pdev->dev);
+    if (atmel_serial_clk_will_stop())
+        device_set_wakeup_enable(&pdev->dev, 0);
+    
Quoted 6 lines
Quoted 3 lines

This is not true, the wakeup in the slow clock is possible, configure the input pin of the serial device as a gpio, and wake up on gpio. Then you must reconfigure as a serial pin, and you can wake up on slow clock.

Yes, but the current driver doesn't actually support that, does it?

Quoted 6 lines

Yes I know, but we can think about it and support when is possible
to wake-up the serial device. Each serial device can change the status of the gpio-pin before suspendig and register and handler on it (I think one interrupt handler for all the serial that can do that), then reset it after resume. I think not all the serial device can do that in the atmel architectures but I suppose that can be very usefull for example in gprs application.

I agree it would be useful. It would require changing the port mux configuration from the driver though, and there's no standardized interface for doing that. Maybe this is a good motivation to come up with one?

Btw, I assume the first character you receive will be lost when you do this, right?

Haavard