linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] HSI: ssi-protocol: export modem info via sysfs
Date: Sun, 31 Jan 2016 19:34:10 +0100	[thread overview]
Message-ID: <20160131183410.GC18175@earth> (raw)
In-Reply-To: <20160131173605.GD3721@amd>

[-- Attachment #1: Type: text/plain, Size: 2525 bytes --]

Hi Pavel,

On Sun, Jan 31, 2016 at 06:36:05PM +0100, Pavel Machek wrote:
> On Sun 2016-01-31 02:19:45, Sebastian Reichel wrote:
> > Currently userspace knows about the rapuyama version by
> > checking, which gpios have been exported. This does no
> > longer work with kernel based power management, so export
> > a sysfs file, which provides the rapuyama generation. Also
> 
> Umm. So patches 1-2 make it impossible for existing userspace to
> detect modem version?
> 
> Even if we re-add the capability with this patch, that makes it bad
> idea, no?

Thanks for having a look at the patches :) Looks like my commit
messages are not verbose enough to show the whole thing. Let me
try a more verbose explanation:

The N900 and the N950 have more or less the same modem, but with
different GPIOs. That basically means, that the powerup/down
sequence works differently. OFono has code for supporting power
management of both modems by detecting, that some gpios have not
been exported. (So if, for some reason, you have not exported
some of the GPIOs it will also think, that you have an N950 modem)

For kernel based PM there won't be any GPIOs exported, so OFono
cannot derive modem generation information from them. OTOH it
no longer needs to, since the kernel will take care of the
difference between the power up/down sequence. OFono only uses
the derived modem generation information for the different power
sequence.

Unfortunately there is another difference between the N900 and N950
modem, that is not yet covered by OFono at all: The N950 has a
broken CBS interface. So the current OFono code base is broken for
the N950, even though it can power it up. The broken N950 CBS
interface is currently not handled by either ofono, fso-gsmd or
sscd. Thus using an explicit new interface is not a problem IMHO.

Anyways, after this patchset you have the following methods for
using the modem:

1. The existing way using pm=1, which is still the default for now.
2. The existing way using pm=1 + rapuyama_version to check if all
   GPIOs are there.
3. The new way using pm=2. You can use rapuyama_version for avoiding
   the CBS interface on N950.

I don't think we can easily remove pm=1 support, since it will be
needed by existing userspace software. I do think though, that we
can change the default from pm=1 to pm=2 when support for the new
interface has been integrated into userspace software for some time
(e.g. 1 year after it has been merged).

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-31 18:34 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 [this message]
2016-01-31  1:19 ` [PATCH 4/5] HSI: nokia-modem: drop support for disabled pm Sebastian Reichel
2016-01-31 11:24   ` 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=20160131183410.GC18175@earth \
    --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).