From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 CF322392837 for ; Mon, 18 May 2026 20:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779136453; cv=none; b=njte6RSLNF8qsVL5clp4at27/bwm+AUF5vzAwgo2arCzHvsfLgfOiaYT4IJmQDD3wUUoMB8fhbltObIzvcBXcl0IlGNgAAyvymDNvCNu5FGiSZnJ7qtlCsaI6faqi/OyzfZ4DhAHCHeVXpULP5BOUfGxEOYsZwUk7hsut0oV1ak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779136453; c=relaxed/simple; bh=6I+QElhAtc/8WabSKYbV0PXAFvgWpATjbvBd61/xDHI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XKmKB/aJCzrpkGnYxdmqPp16XNZhQGBDhgNiDKGJgIu5r/5Oi3QmgIwaGcKO4TPIunULR7cLgtWd3Kua6Mx3CXhuc0lyLPHqbBvaO3Vo/YAu4Cml3ULoHgmh2LcToo2ppwf9ycudJa+X0URGyNitS6VDNvaW2+EAE6JCoD2N8rA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=drMkUY+c; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="drMkUY+c" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-43d75312379so2495264f8f.1 for ; Mon, 18 May 2026 13:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779136450; x=1779741250; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=sTgYcEc55BDnl6ROBsBVO2eyQ8MbIi/0Xe4r8X6dKhw=; b=drMkUY+ciugqawq3ukBhLpwunBhAUQuwYrkglE29OG13pigY/pc31FwwbTyX/UZQXe keRKJUNZE0nRVsHt5XnQumz+hBjSdwSeURsAkBI2KFQjFT7tMtvVZbPkLtbfh5NzX39a xa/WHepdwHjbmnJLqiHhLIveq7BtmV4usTMl9r92d1oLK8zj0ryJcS70kPlVc4e9grtp sU0yfVkkEIb71vFGBsVluQJVF7qCYX+UGd11pPUAZAAVN0dtOMBawuirOSg18uqHz4yN +VDc3Q36ODvlFvsKV1sAWcO+fQHCTKznwNAvm7qKXeWUwk4jCZHBn6KQj0V8KD3eAdpO 9RNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779136450; x=1779741250; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sTgYcEc55BDnl6ROBsBVO2eyQ8MbIi/0Xe4r8X6dKhw=; b=h9TjmibVrcgR+0SeulfVSF7hUndTv24pRzyOVLC2J97YmaFGBAJhojLtVkx29W1L45 EMuUDWvmVUddsGJg8+dbaK9sjG/Ae76+F2AOddX7/nH7uBrFdNUXxOof9rfPryQ2E/Eu XiK5i8M6CqPq4iuwCanuFvAlbTAWNlZc+5A22Vkc8yI0cq2GtejYulxKtq7arEwhCvh8 CEJUTlZaZ2GJ4pdnIMbLMEgDkdLWgUyIRHnU6Q5XPg6N6Kp02ur3k22O9RJhiaIccbit J+eN7Ua8KN5g2YB4FzbB2swFubJ+64rNwHBi1ifWUSXFQzV2FDWIgWiuShOE9PUTGwUF +hwg== X-Forwarded-Encrypted: i=1; AFNElJ/QKXU2qK5PZKjlwEpX3iUuYpFb5iNlBp+h1wKuAY2Xg+XpB5vMYIa7Dd1Oxc6dzISTItn+bsw9+GSPSt4=@vger.kernel.org X-Gm-Message-State: AOJu0YyMi356CJ3uHDkv2tBbTlclra+0yOK3R5URwwlxJ8GRux1Vivh0 C86SgNa7eV1oCvTAnkwoMv1BbVOswQgurr4/hhjWJMBJRHwp1S3qHm8w X-Gm-Gg: Acq92OGr46QuLzP//dP0r7JEqui2lgGAJS86F2KjnKybNomJAMas5TTd0yPhOw6zSXc qtu3bSHF9qpxUXRpnAq/t6ZMxS98POpZqt1b162Z45h97tWDgwTxApEInY/lECTsLeXRlvHsGJy 6YNZbIVtfm2El0x9WWcITuTwcLRYDK/Inyey1JEtQnra8VcG7kHMdi1kiVRw6i9HproxCMfhsf8 lCf2Zl7eP2QkbawN6J18YJy8n5Kr8XWbTrBQ6bjcnat51yz/A9dqI4Sjcecauz86vNAK2yp0AkE zHu79DPOP3QSnxBezkEac9zPf9u2OJVfhj7+H1JkhGsggXDS9Y+ETcyKu8upz1nZEUdvchkNe8c fAJOokm0DD7Iaag0S58geVoLlCYO2kIhwkYOlO0x7h8kR1RXOwPrpwb/rTxMCDsL6VVYCZyeY+C MQoeI/DlugFZzbf4cdo/ryXCZubnL8kloENP6kaAv8By4= X-Received: by 2002:a05:6000:402c:b0:453:9897:76aa with SMTP id ffacd0b85a97d-45d93eccfbfmr34057576f8f.21.1779136450085; Mon, 18 May 2026 13:34:10 -0700 (PDT) Received: from foxbook (bfk48.neoplus.adsl.tpnet.pl. [83.28.48.48]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3b18fsm36967631f8f.11.2026.05.18.13.34.08 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 18 May 2026 13:34:09 -0700 (PDT) Date: Mon, 18 May 2026 22:34:05 +0200 From: Michal Pecio To: Guenter Roeck Cc: Jihong Min , Greg Kroah-Hartman , Mathias Nyman , Jonathan Corbet , Shuah Khan , Mario Limonciello , Basavaraj Natikar , linux-usb@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "Mario Limonciello (AMD)" , Yaroslav Isakov Subject: Re: [PATCH v6 1/2] usb: xhci-pci: add AMD Promontory 21 PCI glue Message-ID: <20260518223405.06cd8fbd.michal.pecio@gmail.com> In-Reply-To: References: <20260517130407.795157-1-hurryman2212@gmail.com> <20260517130407.795157-2-hurryman2212@gmail.com> <20260517232147.34931718.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 18 May 2026 03:55:52 -0700, Guenter Roeck wrote: > On 5/17/26 14:21, Michal Pecio wrote: > > Instead of the X86 heuristic, would it be possible to build glue > > code if and only if SENSORS_PROM21_XHCI is enabled? > > > > This seems to work: > > > > config SENSORS_PROM21_XHCI > > tristate "AMD Promontory 21 xHCI temperature sensor" > > - depends on USB_XHCI_PCI_PROM21 > > + depends on USB_XHCI_PCI > > > > config USB_XHCI_PCI_PROM21 > > tristate > > - depends on X86 > > depends on USB_XHCI_PCI > > - default USB_XHCI_PCI > > + default USB_XHCI_PCI if SENSORS_PROM21_XHCI != 'n' > > select AUXILIARY_BUS > > > > I don't know if it's the best way, perhaps it would be preferable for > > the hwmon driver to select the glue, but then I'm not sure how to force > > glue to become 'y' when xhci-pci is 'y'. > > > > Unless I am missing something, that would disable the entire controller > if the hwmon device is not enabled. That seems a bit draconian to me. I haven't tested (I don't have this chipset), but it should work like the similar xhci-pci-renesas module, which I'm familiar with. When the special unicorn module is disabled by Kconfig, xhci-pci no longer rejects its devices and works with them normally, like it always did before the unicorn module even existed. It should be the same with xhci-pci-prom21. You don't need to enable this module to use USB, only for the special functions. So if hwmon is disabled then you can disable it too. I always found this dual-driver solution (for Renesas) rather ugly and confusing, but so far it's the least bad option tried. Hmm, maybe the next iteration should be an aux bus interface for FW loaders... Regards, Michal