aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-12-07 05:36:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 00:52:23 -0500
commit6f538fe31c1d453b7e7fc4f6e7c6a9bdead4a6f2 (patch)
treeb8655469788e0961782706761c1628c80a957860 /include
parentfdbc7353e45d78ea8ee4a0cdc9e2700035a3a77d (diff)
tty: serial core: decouple pm states from ACPI
The serial core is using power states lifted from ACPI for no good reason. Remove this reference from the documentation and alter all users to use an enum specific to the serial core instead, and define it in <linux/serial_core.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alan Cox <alan@linux.intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_core.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index c6690a2a27fb..a116daa13113 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -208,13 +208,25 @@ static inline void serial_port_out(struct uart_port *up, int offset, int value)
208 up->serial_out(up, offset, value); 208 up->serial_out(up, offset, value);
209} 209}
210 210
211/**
212 * enum uart_pm_state - power states for UARTs
213 * @UART_PM_STATE_ON: UART is powered, up and operational
214 * @UART_PM_STATE_OFF: UART is powered off
215 * @UART_PM_STATE_UNDEFINED: sentinel
216 */
217enum uart_pm_state {
218 UART_PM_STATE_ON = 0,
219 UART_PM_STATE_OFF = 3, /* number taken from ACPI */
220 UART_PM_STATE_UNDEFINED,
221};
222
211/* 223/*
212 * This is the state information which is persistent across opens. 224 * This is the state information which is persistent across opens.
213 */ 225 */
214struct uart_state { 226struct uart_state {
215 struct tty_port port; 227 struct tty_port port;
216 228
217 int pm_state; 229 enum uart_pm_state pm_state;
218 struct circ_buf xmit; 230 struct circ_buf xmit;
219 231
220 struct uart_port *uart_port; 232 struct uart_port *uart_port;