Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2087358lqt; Mon, 22 Apr 2024 00:28:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaC+W7kNbo9OpQT5UTfkVbtdG6G0+L93pVg7CuSibxJCmRDDR6aqszUncg6MlAXgpkI9Vw9RqIydZJE+9ycljnVDuRNC3l97r7y2jO6A== X-Google-Smtp-Source: AGHT+IFwvwJZIStHJqc0oNivAq8n1hm3pxwQAM4mXJzMn27rvqqZTb5C6aqp/y4sQWIT72u1yLxP X-Received: by 2002:a05:6a20:244d:b0:1a9:68c8:56c0 with SMTP id t13-20020a056a20244d00b001a968c856c0mr12846162pzc.21.1713770916190; Mon, 22 Apr 2024 00:28:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713770916; cv=pass; d=google.com; s=arc-20160816; b=fYa3AT+q1UyNTsvkbuT8BNfmnNCu3L5uJSgr0CDMqWZPovFLg2IP3auJ6ea5OCyf0Y 9UivBY9H+IuL6kFKzaJn+fjKLKgWEZxBWLVzGpOMdzmmKwf99WKh1iEiEoen1x7N+vMM priocMZNoerneOLrCNan0W9VECpHjqG8itn19sYj/cb4TRd4rpW6PrRmbVagxZJ5Y90k Ykz23AeFNtHYFvgw0pkOmRz1tettfO06LEKdZXQHy12+kXv/uqYsF4uts2xawhdtwz0X D3TyGprh76lifc49RsDkLm/VyHNOT4Yr68phwobNVw8i97cv+AgujsepsOECZgHWaxnH FpeA== 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=i9wOGbBfat1hzQwTRQUOOQ0qZfxZpdbfky7UyfMjHY0=; fh=7XX6NSeZmr36EiCuoy/3/1sshkPeY3AipGygUViyw0E=; b=UgT8byhsDEOWg8pkevcAyrO4UYenv92uM2Pi8H7J4gRgfeqmSQY99ZLu4ASb9fP7OR VZliHhWbyrGuVvdeFKR7BSu4kcV5YWKP4MunMPrk1+RC45MEOzgGJ8/o6wWXh3tMhkDa +GMIBLLAZ+d9R1wJ+53Mj8aEmA7rxOjdAdggGkcESdT979Jdj5YLgusw0Rd2VRaTRcbp zCwrnNOUaZQB2ezkWHighwi/SLJObF4GkeWK4Bsj90cMttvk+GotES8tONFDhUvMkd3a Q6vaKwJnZiLcCg8euIDh73XARBomPHtrO/u8CqC+2yDCT9Q9Pu/2uoH2s5scyMUZ09Wu H8jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RL8CBo9E; 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-3828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q15-20020a056a00084f00b006ed41e29c19si7587361pfk.55.2024.04.22.00.28.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 00:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RL8CBo9E; 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-3828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3828-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A7192B21E53 for ; Mon, 22 Apr 2024 07:28:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52A08524DE; Mon, 22 Apr 2024 07:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RL8CBo9E" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 5F26B51C52 for ; Mon, 22 Apr 2024 07:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713770678; cv=none; b=LfqUqGtAErEeNrp3dwZRSYBKNyGFt0ojmPZt26VrxAMIW6xxRFa6HkaAHF+EnEWVwUIMLLaVjSOWl3cR2ACXuBa9rwfapkxsa3irda90Q29B/dJUHiua7hEoaaCBbdbXRk9TCgCxgQW87ITwL/ox+vdTgEbOxC7PSOu4XzxdNkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713770678; c=relaxed/simple; bh=dpgOmQJHRrHOsYFgWaLnsjp9j6Ut9V7hlwOOQWs5FWQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=pNgzYdaigqOfX+/WngK2hhibAhMFJ8zvh9wX9GVDGBvCLIjcMKWIZOotF3WT5ctnYYVmH7EEuNAUJNOB/N0FXiITXOArA9pAlvyoL4HhMB20LXVQ+cnMulXRxvBqG3kbcTQfS71G3/xs26Qq5b0MhwRldwjUMmGqTHz3imtO5h8= 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=RL8CBo9E; arc=none smtp.client-ip=209.85.219.202 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-f202.google.com with SMTP id 3f1490d57ef6-de468af2b73so8332327276.0 for ; Mon, 22 Apr 2024 00:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713770676; x=1714375476; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=i9wOGbBfat1hzQwTRQUOOQ0qZfxZpdbfky7UyfMjHY0=; b=RL8CBo9ESvvBEBmUy5HVNnW1d1umQxu+ZB4iQ2x3VpRAPEFC9wb8C3/2v4JAnSCHMP ZdbrPtXLS+/FemPXQiY2z586oSZ8ayiAkizy6buffwUV7n9HA+Mu2TwmrlPOy+95BHYB 9lD4T4CsdQPdminAwivWiXZPFumwRnGjMCVF/uUErruhTVg4kO8eUPj75awZb1TlflkX 2M+Wg8YZKiWXXjmt5yYTifm6JO8gTuKIeWb3+T6qmAj3lAhFRVInCwPnBcuZ0fNYGzns QczV1YDs5MbNlD/wMCHgv43vGhJXOqRNnco/NMVinihogTfViaHCzqO32lFda//wqBlq yx+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713770676; x=1714375476; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=i9wOGbBfat1hzQwTRQUOOQ0qZfxZpdbfky7UyfMjHY0=; b=BE/pU87lCsra6rrdb/3Qk1Js+sZa1ex9IsG5WzPliRHAfHLC6jx9Ojgu/QltOyLsDd EgL7qfQQD2RqsFZDIwbwu2GwMMOTEBLQnoIlOWWnwQLyQe+jhwzbYrKr3gYl4ge5psXl +15JVWU3sUpfsk8pL/+7FU26VBN3qxAH5lML9iXBZXvw5zhf3FYiEtGvV5xNYRRw/mXO +XqxK8RYABMIT4VttofJ+13tB5iNwogzYnVlJrK9Rm5nIukB5k0bbY+rDZNTusAf61az X8kO7qjuzW39hFJYDUhoL9VSjHh/ByVjAAgM9yd79ye+xeRjoiKGjyzm1a/BOMvQcUTW sR9Q== X-Gm-Message-State: AOJu0YyYliFTQ1DoiZPEnzwP5NHQC71+GguET7MD8g7RCa4MrejFmeks RHvoiNIpJ7Q2hGEnvXSLYMWG+tuN6EgNAfasX2dtCV2wf1ppmHlO0IqTo1xFFtERZPF9ubanHwj p4mtQ9OQKc7peqjHMozQvgKLiA9n8Z2dJsrAPs9wXFOD9zLHg9ngHSmPa8ryHURFMYlca8kEFTJ filYsEDaLb+BrwWrKiPixwLRweR0eRtIj5rcgzYJCQWYEUBBGjWw== 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:c0a:b0:de5:2694:45ba with SMTP id fs10-20020a0569020c0a00b00de5269445bamr759614ybb.0.1713770676156; Mon, 22 Apr 2024 00:24:36 -0700 (PDT) Date: Mon, 22 Apr 2024 15:24:14 +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: <20240422152413.1.Ib96985e197f3db620a127a84aa20f3f3017aaf57@changeid> Subject: [PATCH] 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. Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi --- 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