Return-Path: From: Ilya Faenson To: Marcel Holtmann CC: "linux-bluetooth@vger.kernel.org" Subject: RE: [RFC 2/2] Broadcom Bluetooth UART device driver Date: Wed, 13 May 2015 21:50:02 +0000 Message-ID: References: <1431030329-22929-1-git-send-email-ifaenson@broadcom.com> <1431030329-22929-3-git-send-email-ifaenson@broadcom.com> <0614715A-D5A9-4AA9-B3D2-FC6E0A79C498@holtmann.org> In-Reply-To: <0614715A-D5A9-4AA9-B3D2-FC6E0A79C498@holtmann.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 List-ID: SGkgTWFyY2VsLA0KDQpJIGFtIGFib3V0IHRvIHByb3ZpZGUgdGhlIG5leHQgcmV2IG9mIHRoZXNl IHBhdGNoZXMuIEkgYmVsaWV2ZSBJJ3ZlIGFjY291bnRlZCBmb3IgYWxsIHlvdXIgY29tbWVudHMg ZXhjZXB0IGZvciB0aGUgVUFSVCBhY3Rpb25zIGN1cnJlbnRseSBkb25lIGluIHRoZSBCcm9hZGNv bSBzcGVjaWZpYyBjb2RlLiBTaW5jZSB5b3UgY2xlYXJseSBwcmVmZXIgSW50ZWwncyBhcHByb2Fj aCBhbmQgaGF2ZSByZWZlcnJlZCBtZSB0byB0aGUgSW50ZWwgY29kZSB0byB0aGF0IGV4dGVudCwg Y291bGQgeW91IHBsZWFzZSBhY2NlcHQgcmVsZXZhbnQgSW50ZWwncyBwYXRjaGVzIHNvIEkgY2Fu IHVzZSB0aGUgZW5oYW5jZWQgbGluZSBkaXNjaXBsaW5lIHdpdGggdGhlIGJhdWQgcmF0ZSBzdXBw b3J0IGFzIG9wcG9zZWQgdG8gY29kaW5nIHRoYXQgZnJvbSBzY3JhdGNoIGFnYWluLiBJIHdpbGwg dGhlbiBpbnRlZ3JhdGUgZXZlcnl0aGluZyBhbmQgaXNzdWUgYW5vdGhlciBzZXJpZXMgb2YgQnJv YWRjb20gQlQgVUFSVCBwYXRjaGVzLg0KDQpQbGVhc2Ugc2VlIG15IHJlc3BvbnNlc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