[RFC 2/3] include/linux: Add header file for modem power control.

From: sjur . brandeland
Date: Mon Sep 03 2012 - 09:50:13 EST


From: Sjur BrÃndeland <sjur.brandeland@xxxxxxxxxxxxxx>

Add a API for modem power control.

Signed-off-by: Sjur BrÃndeland <sjur.brandeland@xxxxxxxxxxxxxx>
cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
cc: Arun Murthy <arun.murthy@xxxxxxxxxxxxxx>
---
include/linux/modem_ctrl.h | 61 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
create mode 100644 include/linux/modem_ctrl.h

diff --git a/include/linux/modem_ctrl.h b/include/linux/modem_ctrl.h
new file mode 100644
index 0000000..f6c537d
--- /dev/null
+++ b/include/linux/modem_ctrl.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) ST-Ericsson AB 2012
+ * Author: Sjur Brendeland / sjur.brandeland@xxxxxxxxxxxxxx
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#ifndef __INC_MODEM_CTRL_H
+#define __INC_MODEM_CTRL_H
+#include <linux/types.h>
+
+struct modem_ctrl;
+
+/**
+ * modem_ctrl_get- Get the handle for the modem power control API.
+ * @modem_name: Name of the modem.
+ *
+ * Get a handle to the modem power control API providing
+ * functionality to for powering up and down the modem.
+ *
+ * This function may block.
+ * Returns zero on success, and negative upon error.
+ */
+struct modem_ctrl *modem_ctrl_get(const char *modem_name);
+
+/**
+ * modem_ctrl_put - Release the instance of the modem ctrl API.
+ *
+ * ctrl: The API handle return by modem_ctrl_get().
+ *
+ * Releases the modem_ctrl API instance.
+ * This function may block.
+ * Returns zero on success, and negative upon error.
+ */
+void modem_ctrl_put(struct modem_ctrl *ctrl);
+
+/**
+ * modem_start() - Start the modem.
+ *
+ * @ctrl: The API handle return by modem_ctrl_get().
+ *
+ * This function is used to start the modem.
+ *
+ * This function may block.
+ * Returns zero on success, and negative upon error.
+ */
+int modem_start(struct modem_ctrl *ctrl);
+
+/**
+ * modem_stop() - Stop the modem.
+ *
+ * @ctrl: The API handle return by modem_ctrl_get().
+ *
+ * This function is used to stop the modem.
+ *
+ * This function may block.
+ * Returns zero on success, and negative upon error.
+ */
+int modem_stop(struct modem_ctrl *ctrl);
+
+#endif /*INC_MODEM_CTRL_H*/
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/