linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sjur.brandeland@stericsson.com
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: "Sjur Brændeland" <sjurbren@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Sjur Brændeland" <sjur.brandeland@stericsson.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Arun Murthy" <arun.murthy@stericsson.com>
Subject: [RFC 2/3] include/linux: Add header file for modem power control.
Date: Mon,  3 Sep 2012 15:49:52 +0200	[thread overview]
Message-ID: <1346680193-5443-2-git-send-email-sjur.brandeland@stericsson.com> (raw)
In-Reply-To: <1346680193-5443-1-git-send-email-sjur.brandeland@stericsson.com>

From: Sjur Brændeland <sjur.brandeland@stericsson.com>

Add a API for modem power control.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
cc: Linus Walleij <linus.walleij@linaro.org>
cc: Arun Murthy <arun.murthy@stericsson.com>
---
 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@stericsson.com
+ *
+ * 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


  reply	other threads:[~2012-09-03 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 13:49 [RFC 1/3] include/linux: Add API for kicking modem sjur.brandeland
2012-09-03 13:49 ` sjur.brandeland [this message]
2012-09-03 13:49 ` [RFC 3/3] remoteproc: Add STE modem driver for remoteproc sjur.brandeland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346680193-5443-2-git-send-email-sjur.brandeland@stericsson.com \
    --to=sjur.brandeland@stericsson.com \
    --cc=arun.murthy@stericsson.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=sjurbren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).