From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3D10C169C4 for ; Thu, 31 Jan 2019 22:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 952832087F for ; Thu, 31 Jan 2019 22:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbfAaWKi (ORCPT ); Thu, 31 Jan 2019 17:10:38 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38913 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729200AbfAaWKi (ORCPT ); Thu, 31 Jan 2019 17:10:38 -0500 Received: by mail-pf1-f195.google.com with SMTP id r136so2118069pfc.6 for ; Thu, 31 Jan 2019 14:10:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=neu4ijQp4ZwPHccR+4VkX1brGtxFp+6NzRZCUlDIr4A=; b=NJQvVwfUJCEbsb+K3V9hVAiuNaXYx580nAPgbE4YO4o0ip+Bozyckkv7Xq6AAtmb9M mjtXFvWAgdDaM7gm5IYO3SVWg5L3SEfiA61yy/DAgHWOOPDFn7mRyWS4anctGqinXrxT tzKfmDMPnVyUZGrIx03hk5EN4OBJphfTpZ+w2ZKkCHybx9TRACFjwGfmzNYzUgNU4HpF 47iXGdIlG44Rc7XAcaxWEKx63mDeJOosgjukRllK6h4JuFG0lHnxUu86XgaxRDz7Tx1s 3SNpipmCDNJjoeT4skd6Pj10BxMZ3xCTOxajbqp1fttnYoKzb5ckwlG2wxh8qhwHkbXF PLLg== X-Gm-Message-State: AJcUukegXZ85D2dIPV3HQ1oHdbEtSIUuiB3QIC+uRIFGnLzvt1k9mXLR aL25XdPNdBAYByaT94mZPh/7jw== X-Google-Smtp-Source: ALg8bN4oko9mZDz3077iZBqA6kXERrTZyuz0tQmWXjY8mNKHikIlSOdvtgfv45oFWo8ia7wiGLi+WA== X-Received: by 2002:a62:2a4b:: with SMTP id q72mr36110652pfq.61.1548972636938; Thu, 31 Jan 2019 14:10:36 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id r80sm10279879pfa.111.2019.01.31.14.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 14:10:36 -0800 (PST) From: Matthias Kaehlcke To: Marcel Holtmann , Johan Hedberg , "David S . Miller" , Loic Poulain Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Balakrishna Godavarthi , Matthias Kaehlcke Subject: [PATCH RESEND 0/3] Add quirk for reading BD_ADDR from fwnode property Date: Thu, 31 Jan 2019 14:10:18 -0800 Message-Id: <20190131221021.176809-1-mka@chromium.org> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org [initial post: https://lore.kernel.org/patchwork/cover/1028184/] On some systems the Bluetooth Device Address (BD_ADDR) isn't stored on the Bluetooth chip itself. One way to configure the address is through the device tree (patched in by the bootloader). The btqcomsmd driver is an example, it can read the address from the DT property 'local-bd-address'. To avoid redundant open-coded reading of 'local-bd-address' and error handling this series adds the quirk HCI_QUIRK_USE_BDADDR_PROPERTY to retrieve the BD address of a device from the DT and adapts the btqcomsmd and hci_qca drivers to use this quirk. Matthias Kaehlcke (3): Bluetooth: Add quirk for reading BD_ADDR from fwnode property Bluetooth: btqcomsmd: use HCI_QUIRK_USE_BDADDR_PROPERTY Bluetooth: hci_qca: Set HCI_QUIRK_USE_BDADDR_PROPERTY for wcn3990 drivers/bluetooth/btqcomsmd.c | 29 +++-------------------- drivers/bluetooth/hci_qca.c | 1 + include/net/bluetooth/hci.h | 12 ++++++++++ net/bluetooth/hci_core.c | 43 +++++++++++++++++++++++++++++++++++ net/bluetooth/mgmt.c | 6 +++-- 5 files changed, 63 insertions(+), 28 deletions(-) -- 2.20.1.495.gaa96b0ce6b-goog