Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver
From: Pavel Machek
Date: Tue Dec 18 2018 - 07:46:23 EST
Hi!
> So the little elves have been slowly working to get voice calls
> working on droid 4 with the mainline kernel. And just in time for the
> upcoming holidays, it might be possible to call friends and relatives.
>
> I've pushed out an experimental branch containing serdev ts 27.010
> UART multiplexing support. That contains a serdev core driver for the
> mdm6600 modem (that also now idles the modem for PM), support for Alsa
> ASoC voice codec and mixer, and a GNSS driver for the GPS.
Thanks for doing the work.
I'm quite busy these days, but...
# commit 64cf2bf6b7614da35028a11974acb5a445dcc535 (patch)
# n_gsm: Use const unsigned char * and size_t
# We can use const unsigned char * and size_t. This makes things
# a bit easier for adding serdev support.
#
# Note that gsm_control_modem() gsm_control_rls() read the data
# for tty control characters and then call gsm_control_reply()
# that allocates a new reply and copies the data.
#
# REVISIT: Check size_t usage vs int
#
# Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
Dunno, I see that you might want const there, but u8 -> unsigned char
seems like a step in wrong direction.
# commit cd16272060d8100ef0388349cf88f42a1dc667fc (patch)
# tty: n_gsm: Add support for serdev
Is it worth putting those in separate file? n_gsm_serdev.c?
# 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)
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
Oh and that mdelay(3000) is going to hurt... especially because
console is initialized very late or d4.
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.
Thanks,
Pavel
diff --git a/drivers/mfd/motorola-mdm.c b/drivers/mfd/motorola-mdm.c
index eea754d..2b7c324 100644
--- a/drivers/mfd/motorola-mdm.c
+++ b/drivers/mfd/motorola-mdm.c
@@ -1129,7 +1129,7 @@ static void motmdm_remove(struct serdev_device *serdev)
static struct serdev_device_driver motmdm_driver = {
.driver = {
- .name = motmdm_driver_name,
+ .name = "motmdm",
.of_match_table = of_match_ptr(motmdm_id_table),
.pm = &motmdm_pm_ops,
},
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature