[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AFCDDB4A3EA003429EEF1E7B211FDBBA33489D2B4F@EXDCVYMBSTM005.EQ1STM.local>
Date: Fri, 17 Dec 2010 13:17:35 +0100
From: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@...ricsson.com>
To: Vitaly Wool <vitalywool@...il.com>
Cc: Pavan Savoy <pavan_savoy@...y.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Samuel Ortiz <sameo@...ux.intel.com>,
Marcel Holtmann <marcel@...tmann.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
Lukasz Rymanowski <Lukasz.Rymanowski@...to.com>,
Linus WALLEIJ <linus.walleij@...ricsson.com>,
Par-Gunnar Hjalmdahl <pghatwork@...il.com>
Subject: RE: [PATCH 07/11] Bluetooth: Add UART API functions to ldisc
Hi Vitaly,
> -----Original Message-----
> From: Vitaly Wool [mailto:vitalywool@...il.com]
> Sent: den 17 december 2010 12:41
> To: Par-Gunnar HJALMDAHL
> Cc: Pavan Savoy; Alan Cox; Arnd Bergmann; Samuel Ortiz; Marcel
> Holtmann; linux-kernel@...r.kernel.org; linux-
> bluetooth@...r.kernel.org; Lukasz Rymanowski; Linus WALLEIJ; Par-Gunnar
> Hjalmdahl
> Subject: Re: [PATCH 07/11] Bluetooth: Add UART API functions to ldisc
>
> Hi Par,
>
> On Fri, Dec 17, 2010 at 12:24 PM, Par-Gunnar Hjalmdahl
> <par-gunnar.p.hjalmdahl@...ricsson.com> wrote:
> > This patch adds new functions to control break and flow
> > as well as changing UART baud rate directly through the ldisc API
> > rather then using the TTY API directly.
>
> What do you need that for?
>
For the break and flow control it is a means for the protocol driver to set break and flow using only the hci_uart structure, i.e. without interfacing directly towards tty. This is of course not 100% necessary to make it work, but it means a clean API where the protocol drivers can perform their tasks without performing different operations on different stack levels. As it was before write was performed using hci_uart structure while flow control was done using tty structure and API, even though you could consider these functions to be similar (not in functionality of course but from a stack level perspective).
For baud rate changes it also simplifies handling a bit, since the new function also implements using the proper mutexes and calling right termios functions. It should work simply (as long as you don't want different baud rates for TX and RX which should be pretty rare).
> > It also adds a boolean parameter so it is optional to register
> > to the Bluetooth stack (for drivers where a separate module
> > registers to the Bluetooth stack instead).
>
> I never liked this idea and I don't like it now as it scatters the
> changes needed to support devices you are aiming to support with your
> changes.
>
OK. Sadly I can't do much about how you feel towards the change. In my opinion this is probably the best reuse we can get of existing protocols and parts. There is so much that is vendor specific if you look at for example cg2900_uart.c that it is not much you could do generic.
> Thanks,
> Vitaly
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists