linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
	Jiri Slaby <jslaby@suse.cz>, Johan Hovold <johan@kernel.org>,
	Merlijn Wajer <merlijn@wizzup.org>, Pavel Machek <pavel@ucw.cz>,
	Peter Hurley <peter@hurleysoftware.com>,
	Rob Herring <robh@kernel.org>, Sebastian Reichel <sre@kernel.org>,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4
Date: Wed, 26 Feb 2020 11:55:48 +0000	[thread overview]
Message-ID: <20200226115548.GO3494@dell> (raw)
In-Reply-To: <20200220195943.15314-3-tony@atomide.com>

On Thu, 20 Feb 2020, Tony Lindgren wrote:

> Many Motorola phones are controlling the modem using a custom variant
> of TS 27.010 serial line discipline. Devices on these modems have a
> dedicated TS 27.010 channel for features like audio mixer, GNSS, voice
> modem, SIM card reader and so on.
> 
> This driver allows using various devices on the modem. In order to do
> that, we need to take care of the following three things:
> 
> 1. Provide /dev/motmdm* character devices for apps to use for talking
>    to the various devices on the modem
> 
> 2. Handle Motorola custom protocol over TS 27.010 to make the channels
>    usable for userspace
> 
> 3. Coordinate PM runtime with the USB PHY because of shared GPIO pins
>    with the USB PHY
> 
> With this patch, folks with droid4 can place a voice call with just:
> 
> $ printf "ATD%s,0\r" "${phone_number}" > /dev/motmdm1
> D:OK
> ~+CIEV=1,1,0
> ...
> $ printf "ATH\r" > /dev/motmdm1
> H:OK
> 
> Also SMS can be sent with this patch using /dev/motmdm3 for sending,
> and /dev/motmdm9 for receiving messages.
> 
> Note that the audio mixer needs additional patches though. I will be
> sending those as a separate series of patches.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/mfd/Kconfig        |    9 +
>  drivers/mfd/Makefile       |    1 +
>  drivers/mfd/motorola-mdm.c | 1200 ++++++++++++++++++++++++++++++++++++

I'm not even going to start reviewing this as I can see, without even
looking at the code, that this has too much functionality (stuff that
does stuff) contained.

Please move as much functionality out into the subsystems as
possible.  Ideally, MFDs should be responsible for obtaining and
registering shared resources and registering child devices.  Anything
else should be shifted out to an appropriate subsystem.

MFD is not Misc.

>  3 files changed, 1210 insertions(+)
>  create mode 100644 drivers/mfd/motorola-mdm.c

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-02-26 11:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 19:59 [PATCHv4 0/4] n_gsm serdev support and mfd driver for droid4 modem Tony Lindgren
2020-02-20 19:59 ` [PATCH 1/4] tty: n_gsm: Add support for serdev drivers Tony Lindgren
2020-02-20 19:59 ` [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-02-26 11:55   ` Lee Jones [this message]
2020-02-26 14:43     ` Tony Lindgren
2020-03-06 12:34       ` Greg Kroah-Hartman
2020-02-20 19:59 ` [PATCH 3/4] dt-bindings: mfd: motmdm: Add binding for motorola-mdm Tony Lindgren
2020-02-26 16:42   ` Rob Herring
2020-02-20 19:59 ` [PATCH 4/4] ARM: dts: omap4-droid4: Enable basic modem support Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2020-02-10  4:01 [PATCHv2 0/4] n_gsm serdev support and mfd driver for droid4 modem Tony Lindgren
2020-02-10  4:01 ` [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-02-11 16:44   ` Tony Lindgren

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=20200226115548.GO3494@dell \
    --to=lee.jones@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=pavel@ucw.cz \
    --cc=peter@hurleysoftware.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --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).