Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1407651imm; Wed, 26 Sep 2018 17:50:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ECn6XPJ1T69GL2DTQ4TxHGpBpDFLIxeDHeMujj8c241gTyvfc/7dG5RG29eFB8IBlYK+P X-Received: by 2002:aa7:8191:: with SMTP id g17-v6mr8596932pfi.71.1538009452821; Wed, 26 Sep 2018 17:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538009452; cv=none; d=google.com; s=arc-20160816; b=vZtZmICJnd87n/3r+d87LMkYEn4ulYP7I2EJ4828zdn/KJC2qbB27hcIJNI8FwLAPy 5bZYnYIYWpNTalvMGt9cv6VbvrOFCeqnkiNLYcSNSOmvPoFPsncssy6IQAuQKKmV+lLC d/2mhR3ZnCmEV+MoO20OqiQPX+i0XctXJiFtuBzD7+gsWJbzWb0a/43RKDTyLkSBXMfF XnfDoFK93NhCYrJXNcLPzSSMYp03TgBtxnWUm8yGCk/lNCPqNnbZyj0EzvBI3IhfsS6A s2ZMVoZhzJcCHZwAADpNIJAXkZ0Dk/su9LnEQQzhXQQovw4Zgmnp+rtKGTLN0HX4nO1u ta2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xUL1ep5YulCv8tYmJ085iDc7GTmTFmf9XugNtYkFpvo=; b=QA0KxvPef0zFsqW8XiLNgRyDHaf1eOjJhzzqO5VW8kOLLRjy7cC6AiH++tmYazTej0 gmrXFdyoSKWMP3oEQwun4joO9X21SI18ID0Q+emP2yZRFB5v2PV7Q7hz3OxTSTnLXPdq 5gedu1CicJWUgcKCeDyWfC20ZcfIqAF1heDMx0f516zuRO700nV2BA9e0Wqg0SGQx6Po kBLUstJ1fJtm6GZ2SWHov7LaVc7GUYq27o5PpJyZLTDm2LhbtLTekY/yYojve0moOFU9 7lINZO+9uqZY/aB1ZxvKU9edo0wKWWaPvKL+sKZsrIniR975ekaDg8LQfk8ioBdiZ5Fc UGyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nsec8cYE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b1-v6si204523pgc.319.2018.09.26.17.50.37; Wed, 26 Sep 2018 17:50:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=nsec8cYE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726820AbeI0HEZ (ORCPT + 99 others); Thu, 27 Sep 2018 03:04:25 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39416 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbeI0HEZ (ORCPT ); Thu, 27 Sep 2018 03:04:25 -0400 Received: by mail-pf1-f196.google.com with SMTP id j8-v6so557481pff.6 for ; Wed, 26 Sep 2018 17:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xUL1ep5YulCv8tYmJ085iDc7GTmTFmf9XugNtYkFpvo=; b=nsec8cYEhUD0W9Bp+gLbaplSSfAodml6GWgnL/rhcReGG3/7q3fyyx4G5AQmh9NNfo ZmkGI5r6KaPbysE8cfrR+7gh9gug0oeiAgPTTa2Wh+rV6B3nLN0q1aJZvuvNt0QOTYmG r9PDgA/63af64Q7KgX1KMNhADh+VC2GJV0k08= 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=xUL1ep5YulCv8tYmJ085iDc7GTmTFmf9XugNtYkFpvo=; b=Ef0BEh4EUd+PhE22NFv2s6mg6euZ8sHQcJ+tLoRFEJofbIgBfqGFKF/88pOXTE6ruL /ZEWii1VZ5yuMEaLHfxJ/W38PqOKR9sv5mfrBRvVv3sXn7vkJ/fKXEvd8NiucW39fn1w 1+4Gnljq3DCxUJlMi1L0ptPjvsBEIsYtwoTvGm9IMBT8cnTkqL2TRw8EAe0QUdc7rdzu 4glt7fLh5s6jo1w4Ur4PJYv9eon7l0vTouOYOgs7iYMeX2qsSXDmxntwTxQdX2F66Yel du6IH/jo6P3xNweiPgymtjnazd3F1IE4ojqhwtbh+36kZQ/I/q138SaFiU98Yak4DhSa OJew== X-Gm-Message-State: ABuFfogV1KMq1qYZnOGaWqH26CubSlmAKpvVT8X0wpPnYZhGOwZTqUFg CxQ07uGwQhDHWa5Toi99oa7ijA== X-Received: by 2002:a62:25c5:: with SMTP id l188-v6mr8482081pfl.179.1538009330683; Wed, 26 Sep 2018 17:48:50 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:b6af:f85:ed6c:ac6a]) by smtp.gmail.com with ESMTPSA id g3-v6sm404173pfi.9.2018.09.26.17.48.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 17:48:49 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Sakari Ailus , Marcin Wojtas , Andy Shevchenko Andy Shevchenko , Sinan Kaya , Marcel Holtmann , Johan Hedberg Cc: linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Balakrishna Godavarthi , Loic Poulain , Brian Norris , Matthias Kaehlcke Subject: [PATCH v4 0/2] Add API to retrieve the Bluetooth Device Address (BD_ADDR) Date: Wed, 26 Sep 2018 17:48:08 -0700 Message-Id: <20180927004810.124185-1-mka@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. The btqcomsmd driver is an example, it can read the address from the DT property 'local-bd-address'. It is also planned to extend the hci_qca driver to support setting the BD address through the DT. To avoid redundant open-coded reading of 'local-bd-address' and error handling this series adds an API to retrieve the BD address of a device and adapts the btqcomsmd driver to use this API. Matthias Kaehlcke (2): Bluetooth: Add device_get_bd_address() Bluetooth: btqcomsmd: Get the BD address with device_get_bd_address() drivers/bluetooth/btqcomsmd.c | 4 +--- include/net/bluetooth/bluetooth.h | 2 ++ net/bluetooth/lib.c | 34 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) -- 2.19.0.605.g01d371f741-goog