Linux bluetooth development
 help / color / mirror / Atom feed
From: Frederic Danis <frederic.danis@linux.intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Ilya Faenson <ifaenson@broadcom.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] BlueZ line discipline baud rate setting update
Date: Tue, 16 Jun 2015 18:15:07 +0200	[thread overview]
Message-ID: <55804B8B.1030907@linux.intel.com> (raw)
In-Reply-To: <F66F136D-CF57-471B-8E5B-1050F16DCE4E@holtmann.org>

Hello Marcel,

On 16/06/2015 16:36, Marcel Holtmann wrote:
> Hi Fred,
>
> >>> Bring the tty into a known 8 bits, 1 start bit, 1 stop bit,
> >>> hardware flow control state with a given baud rate.
> >>>
> >>> Signed-off-by: Ilya Faenson <ifaenson@broadcom.com>
> >>> ---
> >>> drivers/bluetooth/hci_ldisc.c | 9 ++++++++-
> >>> 1 file changed, 8 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/bluetooth/hci_ldisc.c 
> b/drivers/bluetooth/hci_ldisc.c
> >>> index ac87346..606cc5a 100644
> >>> --- a/drivers/bluetooth/hci_ldisc.c
> >>> +++ b/drivers/bluetooth/hci_ldisc.c
> >>> @@ -271,9 +271,16 @@ void hci_uart_set_baudrate(struct hci_uart 
> *hu, unsigned int speed)
> >>>     struct tty_struct *tty = hu->tty;
> >>>     struct ktermios ktermios;
> >>>
> >>> +    /* Bring the UART into a known state with a given baud rate */
> >>>     ktermios = tty->termios;
> >>>     ktermios.c_cflag &= ~CBAUD;
> >>> -    ktermios.c_cflag |= BOTHER;
> >>> +    ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR |
> >>> +                IGNCR | ICRNL | IXON);
> >>
> >> I think this one needs to align like this:
> >>
> >>             &= ~(IGNBRK | .. |
> >>                  IGNCR | ..);
> >>
> >> However I can fix that one easily inline. So no worries.
> >>
> >> Fred, can you test this patch so I can add a Tested-by line.
> >
> > OK, I will test it.
> >
> > Btw, I thought that this function should only change the UART speed.
> > For other UART parameters, I thought they should be set by btattach, 
> ACPI or DT part.
>
> do you think we want this split out into one hci_uart_reset_termios or 
> something and one that actually changes the baud rate. That seems fair 
> to me as well so then the individual vendor code can pick and choose 
> what they want to do.

Yes.
Imo, the question is to know who will be responsible to open the serial 
port and configure it:
- from user space using btattach or bluetoothd (as you wrote in a 
previous mail), may be based on uevent giving those info,
- or from kernel space, which will imply to have all info from ACPI or DT

Regards

Fred

  reply	other threads:[~2015-06-16 16:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 16:50 [PATCH] BlueZ line discipline baud rate setting update Ilya Faenson
2015-06-15 16:50 ` Ilya Faenson
2015-06-15 17:35   ` Marcel Holtmann
2015-06-16  8:43     ` Frederic Danis
2015-06-16 12:19       ` Ilya Faenson
2015-06-16 13:34       ` Frederic Danis
2015-06-16 14:36       ` Marcel Holtmann
2015-06-16 16:15         ` Frederic Danis [this message]
2015-06-16 16:28           ` Marcel Holtmann
2015-06-15 21:40   ` Marcel Holtmann
2015-06-15 21:45     ` Ilya Faenson
2015-06-17 13:16   ` Marcel Holtmann
2015-06-17 13:26     ` Ilya Faenson

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=55804B8B.1030907@linux.intel.com \
    --to=frederic.danis@linux.intel.com \
    --cc=ifaenson@broadcom.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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