From: Tony Lindgren <tony@atomide.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Rob Herring <robh@kernel.org>, Marcel Partap <mpartap@gmx.net>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
omerlle@gmail.com, Merlijn Wajer <merlijn@wizzup.org>,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
NeKit <nekit1000@gmail.com>,
linux-arm-kernel@lists.infradead.org,
Michael Scott <hashcode0f@gmail.com>,
Sebastian Reichel <sre@kernel.org>,
linux-omap@vger.kernel.org,
Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver
Date: Tue, 18 Dec 2018 07:36:50 -0800 [thread overview]
Message-ID: <20181218153650.GA6707@atomide.com> (raw)
In-Reply-To: <20181218124616.GA10758@amd>
Hi,
* Pavel Machek <pavel@ucw.cz> [181218 12:46]:
> Dunno, I see that you might want const there, but u8 -> unsigned char
> seems like a step in wrong direction.
Well I was just trying to follow what the serdev core is doing
nowadays.. I'll see if I can just constify.
> # commit cd16272060d8100ef0388349cf88f42a1dc667fc (patch)
> # tty: n_gsm: Add support for serdev
>
> Is it worth putting those in separate file? n_gsm_serdev.c?
Yes that's the plan but that needs some refactoring to be done
and I did not want to get into that until I had things working
to prevent regressions.
> # commit 0c1bc81ba976bcd480d6e3c3009a28589f8427c0 (patch)
> # mfd: motmdm: Add Motorola TS 27.010 serdev driver for devices like droid4
>
> Oh, that is a lot of fun. Especially state machine for parsing modem
> responses. I wonder how well it is going to work when modem is
> accessed over USB...
>
> motmdm_read_state(... size_t len)
That's a bit of a layering violation yeah :) But we still need to
do that somewhere for notifiers. And the notifications are separate
from the commands and start with a ~ character so from that point of
view it should not be too bad.
In general, motorola-mdm should just deal with the custom packet
numbering layer and pass data to channel specific serdev drivers
or to the channel specific /dev/motmdm* char devices.
> I applied it over my tree (I still need patches for display,
> right?). I'm getting
>
> /data/fast/l/k/drivers/mfd/motorola-mdm.c:1132:3: error: initializer
> element is not constant
> /data/fast/l/k/drivers/mfd/motorola-mdm.c:1132:3: error: (near
> initialization for 'motmdm_driver.driver.name')
> /data/fast/l/k/scripts/Makefile.build:291: recipe for target
> 'drivers/mfd/motorola-mdm.o' failed
Hmm OK thanks for letting me know. Yes Sebastian has updated
branches for the LCD.
> Oh and that mdelay(3000) is going to hurt... especially because
> console is initialized very late or d4.
It's msleep() not mdelay(). Sorry I have not figured out a better
way so far to get the n_gsm initialized other than spamming the
device with retries for a while on start-up.
> I did a quick test in my config... and it did not break my old setup
> -- voice calls still work when set up over USB and with manual mixer
> setup. That was good surprise.
OK good to hear. Using the n_gsm port instead of USB during idle
has a major PM advantage as the SoC can hit retention during idle
while still connected to the modem and getting notifications.
So looks like during idle we can keep USB in autosuspend mode with
something like the below shell script function.
Regards,
Tony
8< -----------------------
# It's OK to keep to keep ohci device on auto and qmi_wwan and cdc_wd loaded.
# Probably musb and ehci modules need to be currently unloaded for SoC idle.
suspend_usb() {
ohci=$(find /sys/bus/platform/devices -name \*.ohci)
if [ "${ohci}" = "" ]; then
return
fi
devices=$(find "${ohci}/" -type f -name control)
for device in ${devices}; do
echo -n "${device}: "
cat ${device}
done
for device in ${devices}; do
echo -n "auto" > ${device}
done
for device in ${devices}; do
echo -n "${device}: "
cat ${device}
done
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-18 15:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 0:44 WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver Tony Lindgren
2018-12-18 12:46 ` Pavel Machek
2018-12-18 15:36 ` Tony Lindgren [this message]
2018-12-18 20:22 ` Pavel Machek
2018-12-18 21:53 ` Tony Lindgren
2019-01-16 13:48 ` Pavel Machek
2019-01-17 2:54 ` Tony Lindgren
2019-01-17 12:51 ` Pavel Machek
2018-12-22 23:05 ` Pavel Machek
2018-12-23 10:33 ` Pavel Machek
2018-12-23 11:10 ` Pavel Machek
2018-12-23 15:51 ` Tony Lindgren
2018-12-23 19:59 ` Pavel Machek
2018-12-26 21:16 ` Pavel Machek
2018-12-27 10:16 ` Pavel Machek
2018-12-28 19:31 ` Tony Lindgren
2018-12-28 20:46 ` Pavel Machek
2018-12-28 22:28 ` Tony Lindgren
2018-12-28 23:25 ` Pavel Machek
2018-12-28 23:34 ` Tony Lindgren
2018-12-31 22:20 ` Tony Lindgren
2019-01-16 13:58 ` Pavel Machek
2019-01-16 14:59 ` Tony Lindgren
2019-01-16 15:09 ` Tony Lindgren
2019-01-16 23:06 ` Pavel Machek
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=20181218153650.GA6707@atomide.com \
--to=tony@atomide.com \
--cc=hashcode0f@gmail.com \
--cc=jarkko.nikula@bitmer.com \
--cc=johan@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=mpartap@gmx.net \
--cc=nekit1000@gmail.com \
--cc=omerlle@gmail.com \
--cc=pavel@ucw.cz \
--cc=peter.ujfalusi@ti.com \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
/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).