Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1322547 > unrolled thread

[PATCH 0/5] nokia-modem: kernel based PM

Started bySebastian Reichel <sre@kernel.org>
First post2016-01-31 02:30 +0100
Last post2016-02-07 22:40 +0100
Articles 9 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] nokia-modem: kernel based PM Sebastian Reichel <sre@kernel.org> - 2016-01-31 02:30 +0100
    [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Sebastian Reichel <sre@kernel.org> - 2016-01-31 02:30 +0100
      Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Pali Rohár <pali.rohar@gmail.com> - 2016-01-31 12:30 +0100
        Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Sebastian Reichel <sre@kernel.org> - 2016-01-31 17:20 +0100
          Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Pali Rohár <pali.rohar@gmail.com> - 2016-02-08 10:00 +0100
    [PATCH 2/5] HSI: nokia-modem: kernel based PM Sebastian Reichel <sre@kernel.org> - 2016-01-31 02:30 +0100
      Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM Pavel Machek <pavel@ucw.cz> - 2016-01-31 18:40 +0100
        Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM Sebastian Reichel <sre@kernel.org> - 2016-01-31 19:10 +0100
          Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM Pavel Machek <pavel@ucw.cz> - 2016-02-07 22:40 +0100

#1322547 — [PATCH 0/5] nokia-modem: kernel based PM

FromSebastian Reichel <sre@kernel.org>
Date2016-01-31 02:30 +0100
Subject[PATCH 0/5] nokia-modem: kernel based PM
Message-ID<qWOZY-44I-3@gated-at.bofh.it>
Hi,

Some may remember, that in-kernel modem PM was still on the
TODO list for the N9xx modem driver. This patchset adds this
by hooking to the phonet interface state. In other words:

'ifconfig phonet0 up' will enable the modem and 'ifconfig
phonet0 down' will disable the modem. The actual state is
mapped to the carrier state (which was more or less the
case already).

So using the modem can be done like this now:

0. nokia-modem should be loaded with pm=2
1. ifconfig phonet0 up
2. wait for carrier on phonet0
3. communicate with the modem via isi on phonet0
4. ifconfig phonet0 down

The old pm method (exporting the gpios) is still available
and still the default for now. The plan is to switch the default
pm method in some future kernel release (when support for
the simpler interface has been added to ofono).

-- Sebastian

Sebastian Reichel (5):
  HSI: nokia-modem: simplify kernel access to gpios
  HSI: nokia-modem: kernel based PM
  HSI: ssi-protocol: export modem info via sysfs
  HSI: nokia-modem: drop support for disabled pm
  HSI: ssi-protocol: clear carrier flag on open

 drivers/hsi/clients/nokia-modem.c  | 240 +++++++++++++++++++++++++++++++------
 drivers/hsi/clients/ssi_protocol.c |  56 ++++++++-
 include/linux/hsi/ssi_protocol.h   |  20 ++++
 3 files changed, 277 insertions(+), 39 deletions(-)

-- 
2.7.0.rc3

[toc] | [next] | [standalone]


#1322551 — [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm

FromSebastian Reichel <sre@kernel.org>
Date2016-01-31 02:30 +0100
Subject[PATCH 4/5] HSI: nokia-modem: drop support for disabled pm
Message-ID<qWOZZ-44I-37@gated-at.bofh.it>
In reply to#1322547
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

[toc] | [prev] | [next] | [standalone]


#1322610 — Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm

FromPali Rohár <pali.rohar@gmail.com>
Date2016-01-31 12:30 +0100
SubjectRe: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm
Message-ID<qWYmB-2xi-1@gated-at.bofh.it>
In reply to#1322551

[Multipart message — attachments visible in raw view] — view raw

On Sunday 31 January 2016 02:19:46 Sebastian Reichel wrote:
> 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.

Hi!

I'm against this change. It will break support for (patched) Maemo and 
proprietary Nokia sscd modem daemon.

Also you can export GPIOs manually via sysfs and touch that state. Which 
means that you can do power management with mainline kernel even if you 
set nokia-modem.pm=0. So please drop this patch.

> 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) {

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1322674 — Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm

FromSebastian Reichel <sre@kernel.org>
Date2016-01-31 17:20 +0100
SubjectRe: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm
Message-ID<qX2Tf-5OH-1@gated-at.bofh.it>
In reply to#1322610

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Sun, Jan 31, 2016 at 12:24:34PM +0100, Pali Rohár wrote:
> On Sunday 31 January 2016 02:19:46 Sebastian Reichel wrote:
> > 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.
> 
> I'm against this change. It will break support for (patched) Maemo and 
> proprietary Nokia sscd modem daemon.

Do you have some links for this? So far my assumption was, that sscd
requires /sys/devices/platform/gpio-switch, so you either need to
patch sscd somehow, or patch the kernel to provide gpio-switch, or
provide some kind of userspace wrapper.

> Also you can export GPIOs manually via sysfs and touch that state. Which 
> means that you can do power management with mainline kernel even if you 
> set nokia-modem.pm=0.

Yeah... You export GPIOs manually. Did you actually try this? You
will end up with exactly the same result as nokia-modem.pm=1, just
with a few less symlinks. Also you have to make sure, that you
actually exported the right gpios, since the global gpio number is
dependent on the gpio-controller registration order.

> So please drop this patch.

Please provide facts, that Maemo can use pm=0 without additional
kernel patches and does not work with pm=1.

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#1328829 — Re: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm

FromPali Rohár <pali.rohar@gmail.com>
Date2016-02-08 10:00 +0100
SubjectRe: [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm
Message-ID<qZPPQ-2QD-7@gated-at.bofh.it>
In reply to#1322674
On Sunday 31 January 2016 17:10:52 Sebastian Reichel wrote:
> Hi,
> 
> On Sun, Jan 31, 2016 at 12:24:34PM +0100, Pali Rohár wrote:
> > On Sunday 31 January 2016 02:19:46 Sebastian Reichel wrote:
> > > 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.
> > 
> > I'm against this change. It will break support for (patched) Maemo and 
> > proprietary Nokia sscd modem daemon.
> 
> Do you have some links for this? So far my assumption was, that sscd
> requires /sys/devices/platform/gpio-switch, so you either need to
> patch sscd somehow, or patch the kernel to provide gpio-switch, or
> provide some kind of userspace wrapper.

I can either patch kernel to provide gpio-switch interface or use some
kind of user space hacks to provide this interface (e.g mount bind or
fuse fs mounted to that location).

> > Also you can export GPIOs manually via sysfs and touch that state. Which 
> > means that you can do power management with mainline kernel even if you 
> > set nokia-modem.pm=0.
> 
> Yeah... You export GPIOs manually. Did you actually try this? You

Yes, this is what preinit script is doing.

> will end up with exactly the same result as nokia-modem.pm=1, just
> with a few less symlinks. Also you have to make sure, that you
> actually exported the right gpios, since the global gpio number is
> dependent on the gpio-controller registration order.
> 
> > So please drop this patch.
> 
> Please provide facts, that Maemo can use pm=0 without additional
> kernel patches and does not work with pm=1.

Currently we use simple kernel driver which register gpio-switch
interface. Why to remove something which is 1) working and is 2) useful
for users & developers?

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1322556 — [PATCH 2/5] HSI: nokia-modem: kernel based PM

FromSebastian Reichel <sre@kernel.org>
Date2016-01-31 02:30 +0100
Subject[PATCH 2/5] HSI: nokia-modem: kernel based PM
Message-ID<qWOZZ-44I-51@gated-at.bofh.it>
In reply to#1322547
So far power management had to be done in uerspace using exported GPIOs.
This patch adds kernel based power management, which will bind the
modem's power state to the state of the phonet network interface.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/hsi/clients/nokia-modem.c  | 116 +++++++++++++++++++++++++++++++++++--
 drivers/hsi/clients/ssi_protocol.c |  21 +++++++
 include/linux/hsi/ssi_protocol.h   |   9 +++
 3 files changed, 141 insertions(+), 5 deletions(-)

diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c
index f20ede611593..6485f4c61092 100644
--- a/drivers/hsi/clients/nokia-modem.c
+++ b/drivers/hsi/clients/nokia-modem.c
@@ -28,11 +28,12 @@
 #include <linux/of_irq.h>
 #include <linux/of_gpio.h>
 #include <linux/hsi/ssi_protocol.h>
+#include <linux/delay.h>
 
 static unsigned int pm = 1;
 module_param(pm, int, 0400);
 MODULE_PARM_DESC(pm,
-	"Enable power management (0=disabled, 1=userland based [default])");
+	"Enable power management (0=disabled, 1=userland based [default], 2=kernel based)");
 
 enum nokia_modem_type {
 	RAPUYAMA_V1,
@@ -51,6 +52,7 @@ struct nokia_modem_device {
 	struct gpio_desc	*gpio_cmt_rst_rq;
 	struct gpio_desc	*gpio_cmt_rst;
 	struct gpio_desc	*gpio_cmt_bsi;
+	struct notifier_block	nb;
 };
 
 static void do_nokia_modem_rst_ind_tasklet(unsigned long data)
@@ -75,6 +77,93 @@ static irqreturn_t nokia_modem_rst_ind_isr(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
+static void nokia_modem_power_boot(struct nokia_modem_device *modem)
+{
+	/* skip flash mode */
+	gpiod_set_value(modem->gpio_cmt_apeslpx, 0);
+	/* prevent current drain */
+	gpiod_set_value(modem->gpio_cmt_rst_rq, 0);
+
+	if (modem->type == RAPUYAMA_V1) {
+		gpiod_set_value(modem->gpio_cmt_en, 0);
+		/* toggle BSI visible to modem */
+		gpiod_set_value(modem->gpio_cmt_bsi, 0);
+		/* Assert PURX */
+		gpiod_set_value(modem->gpio_cmt_rst, 0);
+		/* Press "power key" */
+		gpiod_set_value(modem->gpio_cmt_en, 1);
+		/* Release CMT to boot */
+		gpiod_set_value(modem->gpio_cmt_rst, 1);
+	} else if(modem->type == RAPUYAMA_V2) {
+		gpiod_set_value(modem->gpio_cmt_en, 0);
+		/* 15 ms needed for ASIC poweroff */
+		usleep_range(15000, 25000);
+		gpiod_set_value(modem->gpio_cmt_en, 1);
+	}
+
+	gpiod_set_value(modem->gpio_cmt_rst_rq, 1);
+}
+
+static void nokia_modem_power_on(struct nokia_modem_device *modem)
+{
+	gpiod_set_value(modem->gpio_cmt_rst_rq, 0);
+
+	if (modem->type == RAPUYAMA_V1) {
+		/* release "power key" */
+		gpiod_set_value(modem->gpio_cmt_en, 0);
+	}
+}
+
+static void nokia_modem_power_off(struct nokia_modem_device *modem)
+{
+	/* skip flash mode */
+	gpiod_set_value(modem->gpio_cmt_apeslpx, 0);
+	/* prevent current drain */
+	gpiod_set_value(modem->gpio_cmt_rst_rq, 0);
+
+	if (modem->type == RAPUYAMA_V1) {
+		/* release "power key" */
+		gpiod_set_value(modem->gpio_cmt_en, 0);
+		/* force modem to reset state */
+		gpiod_set_value(modem->gpio_cmt_rst, 0);
+		/* release modem to be powered off by bootloader */
+		gpiod_set_value(modem->gpio_cmt_rst, 1);
+	} else if(modem->type == RAPUYAMA_V2) {
+		/* power off */
+		gpiod_set_value(modem->gpio_cmt_en, 0);
+	}
+}
+
+static int ssi_protocol_event(struct notifier_block *nb, unsigned long event,
+			      void *data __maybe_unused)
+{
+	struct nokia_modem_device *modem =
+		container_of(nb, struct nokia_modem_device, nb);
+
+	switch(event) {
+		/* called on interface up */
+		case STATE_BOOT:
+			dev_info(modem->device, "modem power state: boot");
+			nokia_modem_power_boot(modem);
+			break;
+		/* called on link up */
+		case STATE_ON:
+			dev_info(modem->device, "modem power state: enabled");
+			nokia_modem_power_on(modem);
+			break;
+		/* called on interface down */
+		case STATE_OFF:
+			dev_info(modem->device, "modem power state: disabled");
+			nokia_modem_power_off(modem);
+			break;
+		default:
+			dev_warn(modem->device, "unknown ssi-protocol event");
+			break;
+	}
+
+	return NOTIFY_DONE;
+}
+
 static void nokia_modem_gpio_unexport(struct device *dev)
 {
 	struct nokia_modem_device *modem = dev_get_drvdata(dev);
@@ -218,6 +307,9 @@ static int nokia_modem_probe(struct device *dev)
 		modem->type = RAPUYAMA_V2;
 	}
 
+	modem->nb.notifier_call = ssi_protocol_event;
+	modem->nb.priority = INT_MAX;
+
 	irq = irq_of_parse_and_map(np, 0);
 	if (!irq) {
 		dev_err(dev, "Invalid rst_ind interrupt (%d)\n", irq);
@@ -268,6 +360,14 @@ static int nokia_modem_probe(struct device *dev)
 		goto error3;
 	}
 
+	if (pm == 2) {
+		err = ssip_notifier_register(modem->ssi_protocol, &modem->nb);
+		if (err < 0) {
+			dev_err(dev, "Could not register ssi-protocol notifier!");
+			goto error3;
+		}
+	}
+
 	cmtspeech.name = "cmt-speech";
 	cmtspeech.tx_cfg = cl->tx_cfg;
 	cmtspeech.rx_cfg = cl->rx_cfg;
@@ -278,25 +378,28 @@ static int nokia_modem_probe(struct device *dev)
 	if (!modem->cmt_speech) {
 		dev_err(dev, "Could not register cmt-speech device\n");
 		err = -ENOMEM;
-		goto error3;
+		goto error4;
 	}
 
 	err = device_attach(&modem->cmt_speech->device);
 	if (err == 0) {
 		dev_dbg(dev, "Missing cmt-speech driver\n");
 		err = -EPROBE_DEFER;
-		goto error4;
+		goto error5;
 	} else if (err < 0) {
 		dev_err(dev, "Could not load cmt-speech driver (%d)\n", err);
-		goto error4;
+		goto error5;
 	}
 
 	dev_info(dev, "Registered Nokia HSI modem\n");
 
 	return 0;
 
-error4:
+error5:
 	hsi_remove_client(&modem->cmt_speech->device, NULL);
+error4:
+	if (pm == 2)
+		ssip_notifier_unregister(modem->ssi_protocol, &modem->nb);
 error3:
 	hsi_remove_client(&modem->ssi_protocol->device, NULL);
 error2:
@@ -320,6 +423,9 @@ static int nokia_modem_remove(struct device *dev)
 		modem->cmt_speech = NULL;
 	}
 
+	if (pm == 2)
+		ssip_notifier_unregister(modem->ssi_protocol, &modem->nb);
+
 	if (modem->ssi_protocol) {
 		hsi_remove_client(&modem->ssi_protocol->device, NULL);
 		modem->ssi_protocol = NULL;
diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 6595d2091268..cee33cab889e 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -153,6 +153,7 @@ struct ssi_protocol {
 	atomic_t		tx_usecnt;
 	int			channel_id_cmd;
 	int			channel_id_data;
+	struct blocking_notifier_head	modem_state_notifier;
 };
 
 /* List of ssi protocol instances */
@@ -735,6 +736,7 @@ static void ssip_rx_waketest(struct hsi_client *cl, u32 cmd)
 	dev_dbg(&cl->device, "CMT is ONLINE\n");
 	netif_wake_queue(ssi->netdev);
 	netif_carrier_on(ssi->netdev);
+	blocking_notifier_call_chain(&ssi->modem_state_notifier, STATE_ON, NULL);
 }
 
 static void ssip_rx_ready(struct hsi_client *cl)
@@ -924,6 +926,7 @@ static int ssip_pn_open(struct net_device *dev)
 			err);
 		return err;
 	}
+	blocking_notifier_call_chain(&ssi->modem_state_notifier, STATE_BOOT, NULL);
 	dev_dbg(&cl->device, "Configuring SSI port\n");
 	hsi_setup(cl);
 	spin_lock_bh(&ssi->lock);
@@ -942,11 +945,14 @@ static int ssip_pn_open(struct net_device *dev)
 static int ssip_pn_stop(struct net_device *dev)
 {
 	struct hsi_client *cl = to_hsi_client(dev->dev.parent);
+	struct ssi_protocol *ssi = hsi_client_drvdata(cl);
 
 	ssip_reset(cl);
 	hsi_unregister_port_event(cl);
 	hsi_release_port(cl);
 
+	blocking_notifier_call_chain(&ssi->modem_state_notifier, STATE_OFF, NULL);
+
 	return 0;
 }
 
@@ -1037,6 +1043,20 @@ void ssip_reset_event(struct hsi_client *master)
 }
 EXPORT_SYMBOL_GPL(ssip_reset_event);
 
+int ssip_notifier_register(struct hsi_client *master, struct notifier_block *nb)
+{
+	struct ssi_protocol *ssi = hsi_client_drvdata(master);
+	return blocking_notifier_chain_register(&ssi->modem_state_notifier, nb);
+}
+EXPORT_SYMBOL_GPL(ssip_notifier_register);
+
+int ssip_notifier_unregister(struct hsi_client *master, struct notifier_block *nb)
+{
+	struct ssi_protocol *ssi = hsi_client_drvdata(master);
+	return blocking_notifier_chain_unregister(&ssi->modem_state_notifier, nb);
+}
+EXPORT_SYMBOL_GPL(ssip_notifier_unregister);
+
 static const struct net_device_ops ssip_pn_ops = {
 	.ndo_open	= ssip_pn_open,
 	.ndo_stop	= ssip_pn_stop,
@@ -1085,6 +1105,7 @@ static int ssi_protocol_probe(struct device *dev)
 	ssi->keep_alive.function = ssip_keep_alive;
 	INIT_LIST_HEAD(&ssi->txqueue);
 	INIT_LIST_HEAD(&ssi->cmdqueue);
+	BLOCKING_INIT_NOTIFIER_HEAD(&ssi->modem_state_notifier);
 	atomic_set(&ssi->tx_usecnt, 0);
 	hsi_client_set_drvdata(cl, ssi);
 	ssi->cl = cl;
diff --git a/include/linux/hsi/ssi_protocol.h b/include/linux/hsi/ssi_protocol.h
index 1433651be0dc..6b742e9368a7 100644
--- a/include/linux/hsi/ssi_protocol.h
+++ b/include/linux/hsi/ssi_protocol.h
@@ -27,6 +27,12 @@
 
 #include <linux/hsi/hsi.h>
 
+enum nokia_modem_state {
+	STATE_BOOT,
+	STATE_ON,
+	STATE_OFF,
+};
+
 static inline void ssip_slave_put_master(struct hsi_client *master)
 {
 }
@@ -36,6 +42,9 @@ int ssip_slave_start_tx(struct hsi_client *master);
 int ssip_slave_stop_tx(struct hsi_client *master);
 void ssip_reset_event(struct hsi_client *master);
 
+int ssip_notifier_register(struct hsi_client *master, struct notifier_block *nb);
+int ssip_notifier_unregister(struct hsi_client *master, struct notifier_block *nb);
+
 int ssip_slave_running(struct hsi_client *master);
 
 #endif /* __LINUX_SSIP_SLAVE_H__ */
-- 
2.7.0.rc3

[toc] | [prev] | [next] | [standalone]


#1322686 — Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM

FromPavel Machek <pavel@ucw.cz>
Date2016-01-31 18:40 +0100
SubjectRe: [PATCH 2/5] HSI: nokia-modem: kernel based PM
Message-ID<qX48F-6C6-13@gated-at.bofh.it>
In reply to#1322556
Hi!

> So far power management had to be done in uerspace using exported

"userspace"

> This patch adds kernel based power management, which will bind the
> modem's power state to the state of the phonet network interface.

Ok, so I have ofonod that already does power management in
userspace. What happens when power management is done twice?

Best regards,
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [next] | [standalone]


#1322700 — Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM

FromSebastian Reichel <sre@kernel.org>
Date2016-01-31 19:10 +0100
SubjectRe: [PATCH 2/5] HSI: nokia-modem: kernel based PM
Message-ID<qX4BL-76A-61@gated-at.bofh.it>
In reply to#1322686

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Sun, Jan 31, 2016 at 06:29:48PM +0100, Pavel Machek wrote:
> > So far power management had to be done in uerspace using exported
> 
> "userspace"

Right, thanks.

> > This patch adds kernel based power management, which will bind the
> > modem's power state to the state of the phonet network interface.
> 
> Ok, so I have ofonod that already does power management in
> userspace. What happens when power management is done twice?

I have patches for ofono, which add support for the in-kernel
power management. Currently ofono will not start with the new
method, since it wants the GPIOs for userspace based PM.

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#1328594 — Re: [PATCH 2/5] HSI: nokia-modem: kernel based PM

FromPavel Machek <pavel@ucw.cz>
Date2016-02-07 22:40 +0100
SubjectRe: [PATCH 2/5] HSI: nokia-modem: kernel based PM
Message-ID<qZFdM-3BZ-11@gated-at.bofh.it>
In reply to#1322700
On Sun 2016-01-31 19:00:09, Sebastian Reichel wrote:
> Hi,
> 
> On Sun, Jan 31, 2016 at 06:29:48PM +0100, Pavel Machek wrote:
> > > So far power management had to be done in uerspace using exported
> > 
> > "userspace"
> 
> Right, thanks.
> 
> > > This patch adds kernel based power management, which will bind the
> > > modem's power state to the state of the phonet network interface.
> > 
> > Ok, so I have ofonod that already does power management in
> > userspace. What happens when power management is done twice?
> 
> I have patches for ofono, which add support for the in-kernel
> power management. Currently ofono will not start with the new
> method, since it wants the GPIOs for userspace based PM.

Ok, but breaking userspace is a no-no, and stock ofono works well on
N900. So this should not go in as-is...?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web