From: Arnd Bergmann <arnd@arndb.de>
To: "Par-Gunnar Hjalmdahl" <pghatwork@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linus.walleij@stericsson.com, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, Lukasz.Rymanowski@tieto.com
Subject: Re: [PATCH 5/9] mfd: Add UART support for the ST-Ericsson CG2900.
Date: Thu, 11 Nov 2010 16:12:30 +0100 [thread overview]
Message-ID: <201011111612.30515.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTi=J_K0sEwyfr4PoFBzEYp4yqYVm3NCRLv6mfLBx@mail.gmail.com>
On Thursday 11 November 2010, Par-Gunnar Hjalmdahl wrote:
> > One option would of course be to modify the existing hci_ldisc.c but I
> > feel that be rather dangerous and which could create a lot of
> > problems.
>
> After looking again at the code I see that I was wrong.
> For the receiving path the data will go ldics->protocol->stack. It's
> actually the TX path (to the chip) that is a bit strange where
> Bluetooth data is going to stack->ldisc->protocol->ldisc->uart. Here
> we would have a separate path for FM and GPS.
Ok, but is that a problem? You really should not be afraid of
touching existing code in order to make it more generic or removing
strange code paths like the one you just described. Cleaning up
code is usually better than duplicating it when you notice something
wrong with the existing implementation.
Simply calling the underlying ldisc module from the FM and GPS modules
should not even require changes, right?
> I still don't like the idea of making a tty/ldisc for the SPI
> transport. I definitely would prefer instead a new ldisc which doesn't
> register to any stack on top.
Yes, agreed. You had already convinced me in the previous reply, sorry
if that wasn't clear.
> My preference would be to keep the
> solutions independent, where we use tty/ldisc for UART and a direct
> transport protocol driver for SPI (i.e. registering using
> spi_register_driver).
Yes. However, you can probably share substantial parts of the code
between the spi_driver and the hci_uart_proto implementations.
You can do this either by making them a single module that registers
to both hci_ldisc and spi_bus, or having a common cg2900 base module
that does the common parts and add separate modules for spi and
hci_uart that register a small wrapper to the respective subsystems.
Arnd
next prev parent reply other threads:[~2010-11-11 15:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 10:38 [PATCH 5/9] mfd: Add UART support for the ST-Ericsson CG2900 Par-Gunnar Hjalmdahl
2010-10-22 12:51 ` Alan Cox
2010-10-22 14:54 ` Par-Gunnar Hjalmdahl
2010-10-22 15:33 ` Alan Cox
2010-10-28 10:37 ` Par-Gunnar Hjalmdahl
2010-10-28 12:22 ` Arnd Bergmann
2010-10-29 11:58 ` Par-Gunnar Hjalmdahl
2010-10-29 12:08 ` Par-Gunnar Hjalmdahl
2010-10-30 0:09 ` Arnd Bergmann
2010-10-29 16:22 ` Alan Cox
2010-10-30 0:01 ` Arnd Bergmann
2010-10-31 12:04 ` Alan Cox
2010-11-05 17:02 ` Par-Gunnar Hjalmdahl
2010-11-05 17:19 ` Alan Cox
2010-11-08 5:24 ` Arnd Bergmann
2010-11-11 14:28 ` Par-Gunnar Hjalmdahl
2010-11-11 14:40 ` Par-Gunnar Hjalmdahl
2010-11-11 15:12 ` Arnd Bergmann [this message]
2010-10-29 11:53 ` Par-Gunnar Hjalmdahl
2010-10-29 16:24 ` Alan Cox
2010-12-03 9:16 ` Par-Gunnar Hjalmdahl
2010-12-03 11:42 ` Vitaly Wool
2010-12-06 9:06 ` Par-Gunnar Hjalmdahl
2010-12-06 9:46 ` Vitaly Wool
2010-12-06 12:01 ` Par-Gunnar Hjalmdahl
2010-12-06 12:25 ` Vitaly Wool
2010-12-06 14:49 ` Arnd Bergmann
2010-12-06 14:57 ` Vitaly Wool
2010-12-06 14:06 ` Arnd Bergmann
2010-12-06 14:54 ` Vitaly Wool
2010-12-06 15:15 ` Arnd Bergmann
2010-12-06 15:28 ` Vitaly Wool
2010-12-06 16:54 ` Arnd Bergmann
2010-12-06 21:24 ` Vitaly Wool
2010-12-06 23:07 ` Arnd Bergmann
2010-12-08 7:41 ` Pavan Savoy
2010-12-08 12:21 ` Par-Gunnar Hjalmdahl
2010-12-08 12:51 ` Arnd Bergmann
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=201011111612.30515.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Lukasz.Rymanowski@tieto.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linus.walleij@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pghatwork@gmail.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).