linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
	Lee Jones <lee.jones@linaro.org>, Jiri Slaby <jslaby@suse.cz>,
	Merlijn Wajer <merlijn@wizzup.org>, Pavel Machek <pavel@ucw.cz>,
	Peter Hurley <peter@hurleysoftware.com>,
	Sebastian Reichel <sre@kernel.org>,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCHv6 0/4] n_gsm serdev support and protocol driver for droid4 modem
Date: Sat, 25 Apr 2020 09:58:23 -0700	[thread overview]
Message-ID: <20200425165823.GO37466@atomide.com> (raw)
In-Reply-To: <20200423232722.GG37466@atomide.com>

* Tony Lindgren <tony@atomide.com> [200423 23:28]:
> * Tony Lindgren <tony@atomide.com> [200423 15:38]:
> > * Johan Hovold <johan@kernel.org> [200423 11:44]:
> > > I'd rather see a generic implementation which can be used with other
> > > modems and that continues to expose a /dev/gsmttyN interface to which we
> > > could attach serdev clients instead (and not create a motmdm serdev
> > > replica of sorts).
> > 
> > Yeah this should be doable quite easily actually without really any of
> > the motorola driver code. It's a separate driver though, and not
> > usable for this case because of the custom layer.
> 
> Well here's a first take at the such a generic serdev-ngsm driver
> that depends on patch 1/4 of this series. All this does is configure
> a serial port for TS 27.010 adaption1, and brings up 16 /dev/gsmtty*
> devices. So no custom options for the binding so far, and no support
> for adding channel specific device drivers. But all that can be added
> naturally later on.

Just to clarify the difference between the generic serdev-ngsm case
and this modem..

In the generic case, channel specific Linux device drivers can just
use gsm_serdev_write() directly for things like GNSS driver, SIM
file system, audio and whatever the modems might have on separate
channels.

This Motorola modem needs custom read and write functions because
of the custom Motorola packet format on top of TS 27.010. So for
example, the motmdm_write() function stuffs the packet header, and
then just calls gsm_serdev_write().

So for the generic channel specific drivers, the driver just needs
to be able to do something like:

Configure devicetree for the drivers/tty/serdev/serdev-ngsm.c
to bring up the TS 27.010 port based on the compatible and
whatever port specific properties we may want use.

And then have the channel specific device drivers do something
like this:

gsm_serdev_ngsm_register();	/* TBD to add to serdev-ngsm.c */
gsm_serdev_register_dlci();	/* Already patched for n_gsm.c */
gsm_serdev_write();		/* Already patched for n_gsm.c */
...
gsm_serdev_unregister_dlci();	/* Already patched for n_gsm.c */
gsm_serdev_ngsm_unregister();	/* TBD to add to serdev-ngsm.c */

So I think we can limit the code in the generic serdev-ngsm.c to bring
up the TS 27.010, and then allow whatever channel specific device
drivers to register with it. I guess that should do for the generic
API.

Anybody got better suggestions?

Regards,

Tony

  reply	other threads:[~2020-04-25 16:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 23:27 Tony Lindgren
2020-04-21 23:27 ` [PATCH 1/4] tty: n_gsm: Add support for serdev drivers Tony Lindgren
2020-04-21 23:27 ` [PATCH 2/4] serdev: ngsm-motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-04-21 23:27 ` [PATCH 3/4] dt-bindings: serdev: motmdm: Add binding for motorola-mdm Tony Lindgren
2020-04-21 23:27 ` [PATCH 4/4] ARM: dts: omap4-droid4: Enable basic modem support Tony Lindgren
2020-04-23 11:43 ` [PATCHv6 0/4] n_gsm serdev support and protocol driver for droid4 modem Johan Hovold
2020-04-23 15:37   ` Tony Lindgren
2020-04-23 23:27     ` Tony Lindgren
2020-04-25 16:58       ` Tony Lindgren [this message]
2020-05-28  8:24     ` Johan Hovold
2020-12-20 22:48       ` Pavel Machek
2020-12-24  8:02         ` Tony Lindgren
2020-12-24 14:59           ` Pavel Machek
2021-01-02 16:23           ` Pavel Machek
2020-04-24 21:50   ` Pavel Machek
2020-04-24 22:15     ` Tony Lindgren
2020-04-26  7:27       ` Pavel Machek
2020-04-26 20:07       ` Pavel Machek
2020-04-26 23:25         ` 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=20200425165823.GO37466@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 \
    --subject='Re: [PATCHv6 0/4] n_gsm serdev support and protocol driver for droid4 modem' \
    /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

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).