Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2133650lqt; Mon, 22 Apr 2024 02:22:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqs/UkDAR+Bvw614IxI/+r/fCAWwUtIigFdyyQHqejzo9IaHIqqq6a8llJfWr4prwJhWnC8/5AuwL4/rz/npJdukjDVS2/UD4W0U5ZsA== X-Google-Smtp-Source: AGHT+IGwTGHetZwAh7vkcS/YSRxn0l/wvXYbSbN57WOQtvFmRx+ux7rIreEOawUEiFf6gb8jhXXB X-Received: by 2002:a05:690c:6d06:b0:617:fbaa:1d91 with SMTP id iv6-20020a05690c6d0600b00617fbaa1d91mr10724047ywb.11.1713777725224; Mon, 22 Apr 2024 02:22:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713777725; cv=pass; d=google.com; s=arc-20160816; b=ca+la20Nos+0N5FZCS5ns2S/iVPkXT19wxPoawt5B53e6K4n296jelh3JWT1viWpQT cOPc3Qv0wGhUiR3s591lPJZrXa5i1JL05bCajQf3vlXjMBoq/N+K7ZPiKI4G9RuyFsfb VY9Ec7oYD2WWSs5+JN/LnxAJMZUpIVXXzldvo7JMRL4vcQ6RH0occ5wzAFfkVNIauAj7 gGgsFRuS63Efg9vZE/lCOdek8KjhFv8qvwQmdOMD5g5lJjz33w/K5hWjN1WFqzbD5vUm Kx3mGNQr5sUx4xgB/8XRzwFv2MfryUdbhwpbfEytKAjyxJdHg4Od7lEOxnJzThS12abp tf6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=kXNn2oCStDkLWi9zDGUPVO6qkGiMAPrsXwlwOtBRK+g=; fh=7XX6NSeZmr36EiCuoy/3/1sshkPeY3AipGygUViyw0E=; b=XBpIAIKUaRXlk+wi2Ps122b8OGFvHSCaQdZGQeKA9z4RkJ6gcf53nOeBO90fxkdhZS hgB6FrPwTfSoMjt6FVLxAhIsEkr6SevvRUOGVDJQ+1EUifucLoJW01mxRgmkSd7Hi75b NCRyGUBv5vJLa7Q11c3Tpb2cSRJ9GPT/P/vJbhpYnNEj8kE/iq6COOEqcPHszJ2Oib03 q24DKHU41FDY388IE3enLAyBBuhJPy6Lt2YPKdObolFVVwbt5Zf+Xz1FHMJlDldMJgT1 x/sq8as0ctHb2/X9tFvGePAqkGMVjRkA3QPTOfOL6BPZq0/uOwZiMBWxnr4/fdwOC+TG zanA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vXfHtKf5; arc=pass (i=1 spf=pass spfdomain=flex--apusaka.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 21-20020ac85915000000b00439a1bd7d03si2609599qty.332.2024.04.22.02.22.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:22:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vXfHtKf5; arc=pass (i=1 spf=pass spfdomain=flex--apusaka.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id ECA811C20C06 for ; Mon, 22 Apr 2024 09:22:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD4FF13C9A5; Mon, 22 Apr 2024 09:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vXfHtKf5" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDD8A13BC10 for ; Mon, 22 Apr 2024 09:20:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777651; cv=none; b=cMDbQmoamfpbNEK/d2hPIOiuEWEI42AEj6Euoacv4rjuPEhzEYBFgwunaH7XFgiSoYTO2phK5mqNayy5ZoKsJXFldo4T0xNNBfMV6r/8ejEUlvdUf5jNXReh0p5IP76nSjVwZScpntUnqT8SzwXA3lCb0Z8krCq3EM5NwP09tUI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777651; c=relaxed/simple; bh=cRkXSaUBI+idwTIFfGgPlG6dgV5xmDVnjyDMXCOApoA=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=BG5XyKrrqny7KlRClBsyZ6jCRVDod9ZKcrcVYkABCsnESyOJNVAF/pKSfFrIK1FLa8xBOLOdqczvtAfLcbQjpxaOmfh5rsBY2YmFhMdI5vzeSF8EtsxGuRjSbnHDjmSegDNmxugn6bwFe4g+OW8PP12t2Mnsqt5xI48cV1boqCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--apusaka.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vXfHtKf5; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--apusaka.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc6ceade361so8420148276.0 for ; Mon, 22 Apr 2024 02:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713777649; x=1714382449; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=kXNn2oCStDkLWi9zDGUPVO6qkGiMAPrsXwlwOtBRK+g=; b=vXfHtKf5FzOZJ391G+UcrWw654ZzsYDpK5ehAMQpIRH+FAs/0B074ocFV+Zm1vgWOC ONpJN12qbgxH/5DwQMzef9GufZOYpyFg1OWKs5h3rxqFkWeF8Edr7p8PgzzbKrZ1pNMr tyJhapCO08g8tyw+IABNLMeeSTA0RD1pEmoVd7zLFI/YOzyBpFpRESSuWxYJg21QnN/R /7ZEKWocCuBisn9S4nZ6iMDCBQr7NpdtvMkBXJfNYvUXfuhPMrvnnfQtHQlMT8Ug1cMK WXAejJC8gpYZXLkJitqKbbbxEO0DHKptlJysBCoXc7DKfHHW6R6ivAPb/LeqfnVR+D+j AyEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713777649; x=1714382449; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kXNn2oCStDkLWi9zDGUPVO6qkGiMAPrsXwlwOtBRK+g=; b=QQvMvtgGh7tJM43kE17mEYKTEK3n41HOUnSmWGGcyiS7TZTRJmlAX+WGffpmbY//vT saOBq37q3zPqoTtLPFTvbGzgVO4w1H6MtmE4UUsLjYpVCWbp8B2lhE1/oWD8iH4faIw1 9mWXWIsRJHXtNwinEyQjmn1NPoVgHBPiSz8AohGC2IoKRi19tEvousaasVI5UMeaLPx9 ZjCYdYVZtJ3iO96kuSy/0PPN5lSds6YK38+3fHBIFakv9KxqIuVtKt2S2C2oTTA4+Z1g MNdy66QRU9tilxwN6lfMs0BTpzdpiA/+vOH0Uc5qsUAj8v5htHXxCiTCYfJxJBbvROM8 hBvg== X-Gm-Message-State: AOJu0YyVHbOxtzrlI+OfMoyTukwOGs4Ert8ML5pGl+vZGf0xjELJDww7 je70J+8viRMyEvg1xdsIcXyi0KbpTbOS+gQ9xUxIp16CIEG/bIGTSCh8V75yWeDXybXcNrFClJG Mt73KEH6SpPlYvPQDDMdIcGexRYuBhV8NgF4MThzcIFRlj0FmwN5CjWGlgQXcBx1ivl1Gr7sXr8 WL/HrqMjbW/atTCXjwfJTRWuc84Bkimjkm+pigNCXNfNnI9pZRoQ== X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:17:59d7:73d5:a990:d869]) (user=apusaka job=sendgmr) by 2002:a05:6902:1548:b0:dc2:398d:a671 with SMTP id r8-20020a056902154800b00dc2398da671mr3042773ybu.10.1713777648659; Mon, 22 Apr 2024 02:20:48 -0700 (PDT) Date: Mon, 22 Apr 2024 17:20:28 +0800 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog Message-ID: <20240422172027.v2.1.Ib96985e197f3db620a127a84aa20f3f3017aaf57@changeid> Subject: [PATCH v2] Bluetooth: Populate hci_set_hw_info for Intel and Realtek From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz , Johan Hedberg , Marcel Holtmann Cc: CrosBT Upstreaming , Archie Pusaka , Abhishek Pandit-Subedi , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" From: Archie Pusaka The hardware information surfaced via debugfs might be usable by the userspace to set some configuration knobs. This patch sets the hw_info for Intel and Realtek chipsets. Below are some possible output of the hardware_info debugfs file. INTEL platform=55 variant=24 RTL lmp_subver=34898 hci_rev=10 hci_ver=11 hci_bus=1 Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi --- Changes in v2: * Add some sample output to the commit message drivers/bluetooth/btintel.c | 9 +++++++++ drivers/bluetooth/btrtl.c | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index a19ebe47bd951..dc48352166a52 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2956,6 +2956,11 @@ static int btintel_setup_combined(struct hci_dev *hdev) err = -EINVAL; } + hci_set_hw_info(hdev, + "INTEL platform=%u variant=%u revision=%u", + ver.hw_platform, ver.hw_variant, + ver.hw_revision); + goto exit_error; } @@ -3060,6 +3065,10 @@ static int btintel_setup_combined(struct hci_dev *hdev) break; } + hci_set_hw_info(hdev, "INTEL platform=%u variant=%u", + INTEL_HW_PLATFORM(ver_tlv.cnvi_bt), + INTEL_HW_VARIANT(ver_tlv.cnvi_bt)); + exit_error: kfree_skb(skb); diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index cc50de69e8dc9..4f1e37b4f7802 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -1339,6 +1339,13 @@ int btrtl_setup_realtek(struct hci_dev *hdev) btrtl_set_quirks(hdev, btrtl_dev); + hci_set_hw_info(hdev, + "RTL lmp_subver=%u hci_rev=%u hci_ver=%u hci_bus=%u", + btrtl_dev->ic_info->lmp_subver, + btrtl_dev->ic_info->hci_rev, + btrtl_dev->ic_info->hci_ver, + btrtl_dev->ic_info->hci_bus); + btrtl_free(btrtl_dev); return ret; } -- 2.44.0.769.g3c40516874-goog