Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3588273ybc; Thu, 14 Nov 2019 11:24:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxr5+wqWVXDkcYWqDXXh1iHnLOrH5ALCplbltzEvuoW6I+WCpd8Wg+w9HvxTSFzyemWQocP X-Received: by 2002:a2e:574d:: with SMTP id r13mr236101ljd.10.1573759460519; Thu, 14 Nov 2019 11:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573759460; cv=none; d=google.com; s=arc-20160816; b=RifFIcwii2T6t+NUEf/G4UFdnF5VHRDo5ZITmBBX9r5JToDdRfrkGq+H5ig0AK9GvX 0M7AkSo5rtct2HHKGdAaytrRJOpNQU2cEkAJuPyp8lCLSp7CYQfrky0+B/COdGe+ZT21 8w29EpOFBLJDcuPmORb0Toxo38fFA2jknBLzRghVW+gzDFS18c44SlOxZ8whHBDPIilr 2YTQodY00tSh/0pSbGzC+ip4y98bFQM0yC7HeK39D0yGWN0O+dXm7mAWFhV1ZJBJ99xt EAvyBItrx5YlBw9rkRMpSUuPn0u/IV4FMbiiR0nZfKY8vJIFRrs6nPMurl7KsJ36pOYt JZBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2+dA9T6MH4sNbOzz4jWY/HUz9UYvTwVEPvgzw5IY25o=; b=ufrHhb83l0sGyAZoKyvn639ie7kkegWgL9R+nCEAtEZLe8GiDnmKl1/Q6zNJaOVhAE y3NinuulPDn7iuCLTJJbsTAisttWZ73avWlc7P7PaY0GwxDTh8jPqO3J74tbbBtivO15 FrqCNxPi0uMVf4NMDS0eFYk7NsI313jMqzmsr6ISD+2s3gIrHBIzFLu9qZ7UK0PWO/Vv Gv21QvvJ5j7ELhquiYvJnHOsmc5PGo13knlFo7gcBxDWxDQYtAXQOjfdzaT1H1E5XhJH p1rC6QbF5LzKbIUMSfuu3q9yqlbMtNHjqaYZXT36gJ5dMqXPVPh51swm7DO2bmLw48qn f/1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JX54imOv; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si4909890edc.426.2019.11.14.11.23.54; Thu, 14 Nov 2019 11:24:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JX54imOv; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbfKNTV5 (ORCPT + 99 others); Thu, 14 Nov 2019 14:21:57 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36123 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbfKNTV4 (ORCPT ); Thu, 14 Nov 2019 14:21:56 -0500 Received: by mail-qk1-f194.google.com with SMTP id d13so6029209qko.3 for ; Thu, 14 Nov 2019 11:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2+dA9T6MH4sNbOzz4jWY/HUz9UYvTwVEPvgzw5IY25o=; b=JX54imOvMkg6TCZIIl7TjVODjvdE3eJWOBIn/TFXI/K3XBbyoUgnyMHp3+jWXwZcpA qC9dQDhc9YTs0ZD5QD1D5sVEP0wVu3UriNJS/O8GlMjey/Yo50i1c5JxHNugoR7fOFse v1ZuqMc/cGqti3BKA5y6oQGs2EJ00KMkWFCU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2+dA9T6MH4sNbOzz4jWY/HUz9UYvTwVEPvgzw5IY25o=; b=H3tak7ap+ICh4+6WkKM7bSb4EorbyUNWyAbSA5MuQMfvmSErtcn90+VTF7A8CG4G9E D9/BBU52jaYD+uo+8ZfCXcGD9H/mVG9dH0HNa1isOxhQLKy7Sa+fx0rDny9k2z+OeF0N Hgbv5Yw0JugL4aWqd5pFQkjzjiq6XX9pwlWFF4UAiXqAMBbdd4RV2+qpREdUMw5scQyM eqK3QLn/aAj57v7Sf6+niGErIIr/7UM6MNPOoD4Sr8rb+f4wLFKE1r1i7ART+zrhkdfn fnwagDvA9GvibvnxuKapD+klZt5hJd1rbq0haS2s9dYC9F4CIqdInzwWg20w7ZIYhtQF x0vA== X-Gm-Message-State: APjAAAWkttjFTVyb8O9GsrOjBz4erXk9MToFr/nlRJEF5lj8df6uZ2IS NtW/bOO4+zf8MbY7yR51kDL0pLfrK6/QPrQNUyb6Tg== X-Received: by 2002:a05:620a:1032:: with SMTP id a18mr7536658qkk.305.1573759313671; Thu, 14 Nov 2019 11:21:53 -0800 (PST) MIME-Version: 1.0 References: <20191112230944.48716-1-abhishekpandit@chromium.org> <20191112230944.48716-5-abhishekpandit@chromium.org> <0642BE4E-D3C7-48B3-9893-11828EAFA7EF@holtmann.org> <20191114175836.GI27773@google.com> In-Reply-To: <20191114175836.GI27773@google.com> From: Abhishek Pandit-Subedi Date: Thu, 14 Nov 2019 11:21:42 -0800 Message-ID: Subject: Re: [PATCH v4 4/4] dt-bindings: net: broadcom-bluetooth: Add pcm config To: Matthias Kaehlcke Cc: Marcel Holtmann , Johan Hedberg , Rob Herring , linux-bluetooth@vger.kernel.org, Douglas Anderson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "David S. Miller" , netdev@vger.kernel.org, LKML , Ondrej Jirman , Mark Rutland , Chen-Yu Tsai Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Thu, Nov 14, 2019 at 9:58 AM Matthias Kaehlcke wrote: > > On Wed, Nov 13, 2019 at 01:21:06AM +0100, Marcel Holtmann wrote: > > Hi Abhishek, > > > > > Add documentation for pcm parameters. > > > > > > Signed-off-by: Abhishek Pandit-Subedi > > > > > > --- > > > > > > Changes in v4: > > > - Fix incorrect function name in hci_bcm > > > > > > Changes in v3: > > > - Change disallow baudrate setting to return -EBUSY if called before > > > ready. bcm_proto is no longer modified and is back to being const. > > > - Changed btbcm_set_pcm_params to btbcm_set_pcm_int_params > > > - Changed brcm,sco-routing to brcm,bt-sco-routing > > > > > > Changes in v2: > > > - Use match data to disallow baudrate setting > > > - Parse pcm parameters by name instead of as a byte string > > > - Fix prefix for dt-bindings commit > > > > > > .../devicetree/bindings/net/broadcom-bluetooth.txt | 11 +++++++++++ > > > 1 file changed, 11 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt > > > index c749dc297624..42fb2fa8143d 100644 > > > --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt > > > +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt > > > @@ -29,6 +29,11 @@ Optional properties: > > > - "lpo": external low power 32.768 kHz clock > > > - vbat-supply: phandle to regulator supply for VBAT > > > - vddio-supply: phandle to regulator supply for VDDIO > > > + - brcm,bt-sco-routing: 0-3 (PCM, Transport, Codec, I2S) > > > + - brcm,pcm-interface-rate: 0-4 (128KBps, 256KBps, 512KBps, 1024KBps, 2048KBps) > > > + - brcm,pcm-frame-type: 0-1 (short, long) > > > + - brcm,pcm-sync-mode: 0-1 (slave, master) > > > + - brcm,pcm-clock-mode: 0-1 (slave, master) > > > > I think that all of them need to start with brcm,bt- prefix since it is rather Bluetooth specific. > > > > > > > > > > > Example: > > > @@ -40,5 +45,11 @@ Example: > > > bluetooth { > > > compatible = "brcm,bcm43438-bt"; > > > max-speed = <921600>; > > > + > > > + brcm,bt-sco-routing = [01]; > > > + brcm,pcm-interface-rate = [02]; > > > + brcm,pcm-frame-type = [00]; > > > + brcm,pcm-sync-mode = [01]; > > > + brcm,pcm-clock-mode = [01]; > > > }; > > > > My personal taste would be to add a comment after each entry that gives the human readable setting. > > I'd suggest to define constants in include/dt-bindings/bluetooth/brcm.h > and use them instead of literals, with this we wouldn't rely on (optional) > comments to make the configuration human readable. :+1: Sounds like a good idea; expect it in next patch revision