summaryrefslogtreecommitdiff
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-12-07 14:36:08 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 09:52:23 +0400
commit6f538fe31c1d453b7e7fc4f6e7c6a9bdead4a6f2 (patch)
treeb8655469788e0961782706761c1628c80a957860 /include/linux/serial_core.h
parentfdbc7353e45d78ea8ee4a0cdc9e2700035a3a77d (diff)
downloadlinux-6f538fe31c1d453b7e7fc4f6e7c6a9bdead4a6f2.tar.xz
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/linux/serial_core.h')
-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)
up->serial_out(up, offset, value);
}
+/**
+ * enum uart_pm_state - power states for UARTs
+ * @UART_PM_STATE_ON: UART is powered, up and operational
+ * @UART_PM_STATE_OFF: UART is powered off
+ * @UART_PM_STATE_UNDEFINED: sentinel
+ */
+enum uart_pm_state {
+ UART_PM_STATE_ON = 0,
+ UART_PM_STATE_OFF = 3, /* number taken from ACPI */
+ UART_PM_STATE_UNDEFINED,
+};
+
/*
* This is the state information which is persistent across opens.
*/
struct uart_state {
struct tty_port port;
- int pm_state;
+ enum uart_pm_state pm_state;
struct circ_buf xmit;
struct uart_port *uart_port;