linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: "Sebastian Reichel" <sre@kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm
Date: Sun, 31 Jan 2016 02:19:46 +0100	[thread overview]
Message-ID: <1454203187-688-5-git-send-email-sre@kernel.org> (raw)
In-Reply-To: <1454203187-688-1-git-send-email-sre@kernel.org>

Disabled power management means, that the driver can only be
used together with further out-of-tree kernel patches. There
is no reason to support this in the mainline kernel and not
having support for it means, that userspace can automatically
detect if we are running kernel based power management.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/hsi/clients/nokia-modem.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c
index 1b4a250cf113..5e333eb82912 100644
--- a/drivers/hsi/clients/nokia-modem.c
+++ b/drivers/hsi/clients/nokia-modem.c
@@ -33,7 +33,7 @@
 static unsigned int pm = 1;
 module_param(pm, int, 0400);
 MODULE_PARM_DESC(pm,
-	"Enable power management (0=disabled, 1=userland based [default], 2=kernel based)");
+	"Enable power management (1=userland based [default], 2=kernel based)");
 
 struct nokia_modem_device {
 	struct tasklet_struct	nokia_modem_rst_ind_tasklet;
@@ -198,6 +198,11 @@ static int nokia_modem_gpio_probe(struct device *dev)
 	struct nokia_modem_device *modem = dev_get_drvdata(dev);
 	int gpio_count, gpio_name_count, i, err;
 
+	if (pm != 1 && pm != 2) {
+		dev_err(dev, "invalid pm configuration!");
+		return -EINVAL;
+	}
+
 	gpio_count = of_gpio_count(np);
 
 	if (gpio_count < 0) {
-- 
2.7.0.rc3

  parent reply	other threads:[~2016-01-31  1:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-31  1:19 [PATCH 0/5] nokia-modem: kernel based PM Sebastian Reichel
2016-01-31  1:19 ` [PATCH 1/5] HSI: nokia-modem: simplify kernel access to gpios Sebastian Reichel
2016-01-31  1:19 ` [PATCH 2/5] HSI: nokia-modem: kernel based PM Sebastian Reichel
2016-01-31 17:29   ` Pavel Machek
2016-01-31 18:00     ` Sebastian Reichel
2016-02-07 21:39       ` Pavel Machek
2016-01-31  1:19 ` [PATCH 3/5] HSI: ssi-protocol: export modem info via sysfs Sebastian Reichel
2016-01-31 17:36   ` Pavel Machek
2016-01-31 18:34     ` Sebastian Reichel
2016-01-31  1:19 ` Sebastian Reichel [this message]
2016-01-31 11:24   ` [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Pali Rohár
2016-01-31 16:10     ` Sebastian Reichel
2016-02-08  8:50       ` Pali Rohár
2016-01-31  1:19 ` [PATCH 5/5] HSI: ssi-protocol: clear carrier flag on open Sebastian Reichel

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=1454203187-688-5-git-send-email-sre@kernel.org \
    --to=sre@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=bcousson@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.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).