From: Tony Lindgren <tony@atomide.com>
To: Lee Jones <lee.jones@linaro.org>
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 06:43:08 -0800 [thread overview]
Message-ID: <20200226144308.GM37466@atomide.com> (raw)
In-Reply-To: <20200226115548.GO3494@dell>
* Lee Jones <lee.jones@linaro.org> [200226 11:56]:
> 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
...
> > ---
> > 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.
OK good point. So this is a serdev consumer driver that eventually will
also provide serdev style access to few device drivers too for the
device within the modem after decoding the Motorola specific protocol.
No special need for this driver to be under drivers/mfd though.
How about we add drivers/tty/serdev/protocol or similar directory for
drivers like this?
Naturally the all consumer device drivers should be in their subsystems
like ALSA ASoC, GNSS and so on.
Regards,
Tony
next prev parent reply other threads:[~2020-02-26 14:43 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
2020-02-26 14:43 ` Tony Lindgren [this message]
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=20200226144308.GM37466@atomide.com \
--to=tony@atomide.com \
--cc=devicetree@vger.kernel.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=jslaby@suse.cz \
--cc=lee.jones@linaro.org \
--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 \
/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).