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=unavailable 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 07F1EC282D9 for ; Thu, 31 Jan 2019 22:11:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D52432087F for ; Thu, 31 Jan 2019 22:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729287AbfAaWKi (ORCPT ); Thu, 31 Jan 2019 17:10:38 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40222 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbfAaWKh (ORCPT ); Thu, 31 Jan 2019 17:10:37 -0500 Received: by mail-pf1-f195.google.com with SMTP id i12so2118042pfo.7 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=nyIirkhUG1FakqA1jvndyIFQqe5Nk5qrqT/b8XHaSY0csKYvrlv2HTJav5bF04HD1V jZcv3Y5sv83BILlaiP1BiANgRTIbxFSEZLfXq8wkQplhTbT8BoMaB4YpnBJ/oSbVlBdr e6QDrkqaVudX0uO5Evi8qSfCzFFk7vW0rs3chv/Js+whTKGkBJEpNWV6LVtk0E3dph3T sXmK4rTDlRA3WOqqhrMetu4MJ7xtMRO+yij5BOE+UIG+Zy3ps7nmZ5hpa6A92VD60507 6P6mtw2vkGT+QKnGjbYjjtQDuLVup2UzDXaFMaj/0P9jBrIFwNa7dOWhYOsoWGGyTD/T eAbQ== X-Gm-Message-State: AJcUukdckiITQ7oDl/Chv2NbLg4qVR9V9f5TRNHF46fFHKXzI8wp3HPC uvdvC3R0soO8ZAv4PBJX0pUmfw== 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: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@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