[{"id":3688563,"web_url":"http://patchwork.ozlabs.org/comment/3688563/","msgid":"<0269bf45-316b-4ba5-af0e-312f6c2bebdd@roeck-us.net>","list_archive_url":null,"date":"2026-05-08T15:45:11","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":21889,"url":"http://patchwork.ozlabs.org/api/people/21889/","name":"Guenter Roeck","email":"linux@roeck-us.net"},"content":"On 5/8/26 07:39, Jihong Min wrote:\n> Add an auxiliary-bus hwmon driver for the temperature sensor exposed by\n> AMD Promontory 21 (PROM21) xHCI PCI functions. The driver binds to the\n> \"hwmon\" auxiliary device published by the PROM21 xHCI PCI glue and\n> exposes the sensor as temp1_input under the prom21_xhci hwmon device.\n> \n> The sensor is accessed through a PROM21 vendor index/data register pair\n> in the xHCI PCI MMIO BAR. The read path restores the previous vendor\n> index value after sampling and does not runtime-resume the parent PCI\n> device; reads from a suspended parent return -ENODATA.\n> \n> Document the supported device, register access, runtime PM behavior, and\n> sysfs lookup method. The documentation also records the observation\n> method used to identify the register pair and derive the conversion\n> formula.\n> \n> Assisted-by: Codex:gpt-5.5\n> Signed-off-by: Jihong Min <hurryman2212@gmail.com>\n> ---\n>   Documentation/hwmon/index.rst       |   1 +\n>   Documentation/hwmon/prom21-xhci.rst |  99 +++++++++++\n>   drivers/hwmon/Kconfig               |  10 ++\n>   drivers/hwmon/Makefile              |   1 +\n>   drivers/hwmon/prom21-xhci.c         | 250 ++++++++++++++++++++++++++++\n>   5 files changed, 361 insertions(+)\n>   create mode 100644 Documentation/hwmon/prom21-xhci.rst\n>   create mode 100644 drivers/hwmon/prom21-xhci.c\n> \n> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst\n> index 8b655e5d6b68..324208f1faa2 100644\n> --- a/Documentation/hwmon/index.rst\n> +++ b/Documentation/hwmon/index.rst\n> @@ -216,6 +216,7 @@ Hardware Monitoring Kernel Drivers\n>      pmbus\n>      powerz\n>      powr1220\n> +   prom21-xhci\n>      pt5161l\n>      pxe1610\n>      pwm-fan\n> diff --git a/Documentation/hwmon/prom21-xhci.rst b/Documentation/hwmon/prom21-xhci.rst\n> new file mode 100644\n> index 000000000000..10d03c4476c3\n> --- /dev/null\n> +++ b/Documentation/hwmon/prom21-xhci.rst\n> @@ -0,0 +1,99 @@\n> +.. SPDX-License-Identifier: GPL-2.0\n> +\n> +Kernel driver prom21-xhci\n> +=========================\n> +\n> +Supported chips:\n> +\n> +  * AMD Promontory 21 (PROM21) xHCI\n> +\n> +    Prefix: 'prom21_xhci'\n> +\n> +    PCI ID: 1022:43fd\n> +\n> +Author:\n> +\n> +  - Jihong Min <hurryman2212@gmail.com>\n> +\n> +Description\n> +-----------\n> +\n> +This driver exposes the temperature sensor in AMD PROM21 xHCI controllers.\n> +\n> +The driver binds to an auxiliary device created by the xHCI PCI driver for\n> +supported controllers. The sensor value is accessed through a vendor-specific\n> +index/data register pair in the controller's PCI MMIO BAR.\n> +The auxiliary device is created by the ``xhci-pci-prom21`` PCI glue driver.\n> +USB host operation is otherwise delegated to the common ``xhci-pci`` code.\n> +\n> +PROM21 is an AMD chipset IP used in single-chip or daisy-chained configurations\n> +to build AMD 6xx/8xx series chipsets. Since the xHCI controllers are\n> +integrated in PROM21, this temperature can also be used as a monitor for a\n> +temperature close to the AMD chipset temperature.\n> +\n> +Register access\n> +---------------\n> +\n> +The temperature value is read through a vendor-specific index/data register\n> +pair in the xHCI PCI MMIO BAR. The driver uses the following byte offsets from\n> +the MMIO BAR base:\n> +\n> +======================= =====================================================\n> +0x3000\t\t\tVendor index register\n> +0x3008\t\t\tVendor data register\n> +======================= =====================================================\n> +\n> +The driver saves the current vendor index register value, writes the\n> +temperature selector ``0x0001e520`` to the vendor index register, reads the\n> +vendor data register, and restores the previous vendor index value before\n> +returning. The raw temperature value is the low 8 bits of the vendor data\n> +register value.\n> +\n\nI am a bis concerned about this. Any mutex protection only applies to this driver,\nbut not to any other drivers or ACPI code accessing the vendor registers.\nWhat if ACPI reads from the same register set ?\n\n> +No public AMD reference is available for the register pair or the raw value.\n> +The register pair was identified on an X870E system with two PROM21 xHCI\n> +controllers. One controller was passed through to a Windows VM, and the same\n> +controller's PCI MMIO BAR was observed from the Linux host while HWiNFO64 was\n> +reporting the PROM21 xHCI temperature. In the test environment, the reported\n> +temperature was very stable at idle and the displayed sensor resolution was\n> +low, which made it possible to look for a consistently repeating MMIO response\n> +for the same reported temperature. During observation, offset 0x3000 repeatedly\n> +contained selector ``0x0001e520``. Writing the same selector to offset 0x3000\n> +from Linux and then reading offset 0x3008 reproduced the same raw value, so the\n> +offsets are treated as a vendor index/data register pair.\n> +\n> +The conversion formula was empirically inferred by matching observed raw\n> +8-bit values against HWiNFO64's reported PROM21 xHCI temperature for the same\n> +controller. The observed mapping is:\n> +\n> +  temp[C] = raw * 0.9066 - 78.624\n> +\n> +Runtime PM\n> +----------\n> +\n> +The driver does not wake the xHCI PCI device for hwmon reads. It reads the\n> +temperature only when the parent device is already active. A read from a\n> +suspended device returns ``-ENODATA``. Sensor reads do not mark the xHCI PCI\n> +device as busy or schedule autosuspend, so polling the sensor does not delay\n> +runtime suspend.\n> +\n> +Sysfs entries\n> +-------------\n> +\n> +======================= =====================================================\n> +temp1_input\t\tTemperature in millidegrees Celsius\n> +======================= =====================================================\n> +\n> +The hwmon device name is ``prom21_xhci``. The sysfs path depends on the hwmon\n> +device number assigned by the kernel. Userspace can locate the device by\n> +matching the ``name`` attribute:\n> +\n> +.. code-block:: sh\n> +\n> +   for hwmon in /sys/class/hwmon/hwmon*; do\n> +           [ \"$(cat \"$hwmon/name\")\" = \"prom21_xhci\" ] || continue\n> +           cat \"$hwmon/temp1_input\"\n> +   done\n> +\n> +``temp1_input`` reports millidegrees Celsius, so a value of ``50113`` means\n> +50.113 degrees Celsius.\n\nThe above reflects the hardware monitoring ABI and is pointless\nto repeat here. Please drop.\n\n  If the raw register value is invalid, ``temp1_input``\n> +returns ``-ENODATA``.\n> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig\n> index 14e4cea48acc..fe0f14e247b5 100644\n> --- a/drivers/hwmon/Kconfig\n> +++ b/drivers/hwmon/Kconfig\n> @@ -951,6 +951,16 @@ config SENSORS_POWR1220\n>   \t  This driver can also be built as a module. If so, the module\n>   \t  will be called powr1220.\n>   \n> +config SENSORS_PROM21_XHCI\n> +\ttristate \"AMD Promontory 21 xHCI temperature sensor\"\n> +\tdepends on USB_XHCI_PCI_PROM21\n> +\thelp\n> +\t  If you say yes here you get support for the AMD Promontory 21\n> +\t  (PROM21) xHCI temperature sensor.\n> +\n> +\t  This driver can also be built as a module. If so, the module\n> +\t  will be called prom21-xhci.\n> +\n>   config SENSORS_LAN966X\n>   \ttristate \"Microchip LAN966x Hardware Monitoring\"\n>   \tdepends on SOC_LAN966 || COMPILE_TEST\n> diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile\n> index 4788996aa137..0bda542e8e2b 100644\n> --- a/drivers/hwmon/Makefile\n> +++ b/drivers/hwmon/Makefile\n> @@ -196,6 +196,7 @@ obj-$(CONFIG_SENSORS_PC87427)\t+= pc87427.o\n>   obj-$(CONFIG_SENSORS_PCF8591)\t+= pcf8591.o\n>   obj-$(CONFIG_SENSORS_POWERZ)\t+= powerz.o\n>   obj-$(CONFIG_SENSORS_POWR1220)  += powr1220.o\n> +obj-$(CONFIG_SENSORS_PROM21_XHCI)\t+= prom21-xhci.o\n>   obj-$(CONFIG_SENSORS_PT5161L)\t+= pt5161l.o\n>   obj-$(CONFIG_SENSORS_PWM_FAN)\t+= pwm-fan.o\n>   obj-$(CONFIG_SENSORS_QNAP_MCU_HWMON)\t+= qnap-mcu-hwmon.o\n> diff --git a/drivers/hwmon/prom21-xhci.c b/drivers/hwmon/prom21-xhci.c\n> new file mode 100644\n> index 000000000000..f91303ce3428\n> --- /dev/null\n> +++ b/drivers/hwmon/prom21-xhci.c\n> @@ -0,0 +1,250 @@\n> +// SPDX-License-Identifier: GPL-2.0\n> +/*\n> + * AMD Promontory 21 xHCI Hwmon Implementation\n> + * (only temperature monitoring is supported)\n> + *\n> + * This can be effectively used as the alternative chipset temperature monitor.\n> + *\n> + * Copyright (C) 2026 Jihong Min <hurryman2212@gmail.com>\n> + */\n> +\n> +#include <linux/auxiliary_bus.h>\n> +#include <linux/device.h>\n> +#include <linux/err.h>\n> +#include <linux/errno.h>\n> +#include <linux/hwmon.h>\n> +#include <linux/io.h>\n> +#include <linux/math.h>\n\nIs this needed ?\n\n> +#include <linux/module.h>\n> +#include <linux/mutex.h>\n> +#include <linux/pci.h>\n> +#include <linux/pm_runtime.h>\n> +#include <linux/slab.h>\n> +#include <linux/usb.h>\n> +#include <linux/usb/hcd.h>\n> +\n> +#define PROM21_INDEX 0x3000\n> +#define PROM21_DATA 0x3008\n> +#define PROM21_TEMP_REG 0x0001e520\n\nPlease use\n\n#define<space>NAME<tab>value\n\nand align the value column.\n\n\n> +\n> +struct prom21_xhci {\n> +\tstruct pci_dev *pdev;\n> +\tstruct device *hwmon_dev;\n> +\tvoid __iomem *regs;\n> +\tstruct mutex lock; /* serializes index/data register access */\n\nWhy is this lock still needed on top of the hwmon subsystem lock ?\n\n> +};\n> +\n> +static int prom21_xhci_pm_get(struct prom21_xhci *hwmon, bool *pm_ref)\n> +{\n> +\tstruct device *dev = &hwmon->pdev->dev;\n> +\tint ret;\n> +\n> +\t*pm_ref = false;\n> +\n> +\t/*\n> +\t * PROM21 temperature register access does not return a valid value while\n> +\t * the parent xHCI PCI function is suspended. Do not wake the device from\n> +\t * a hwmon read; only read when runtime PM reports the device as active,\n> +\t * or when runtime PM is disabled and the device is not marked as\n> +\t * suspended.\n> +\t */\n> +\tret = pm_runtime_get_if_active(dev);\n> +\tif (ret > 0) {\n> +\t\t*pm_ref = true;\n> +\t\treturn 0;\n> +\t}\n> +\n> +\tif (ret == -EINVAL && !pm_runtime_status_suspended(dev))\n> +\t\treturn 0;\n> +\n> +\tif (!ret || pm_runtime_status_suspended(dev))\n> +\t\treturn -ENODATA;\n> +\n> +\treturn ret;\n> +}\n> +\n> +/*\n> + * This is not a pure MMIO read. The PROM21 vendor data register is selected\n> + * by temporarily writing PROM21_TEMP_REG to the vendor index register.\n> + * Serialize the sequence, keep it short, and restore the previous index before\n> + * returning so this driver does not leave the vendor index/data register pair\n> + * in a different state for other possible users.\n> + */\n> +static int prom21_xhci_read_temp_raw_restore_index(struct prom21_xhci *hwmon,\n> +\t\t\t\t\t\t   u8 *raw)\n> +{\n> +\tstruct device *dev = &hwmon->pdev->dev;\n> +\tbool pm_ref;\n> +\tu32 index;\n> +\tu32 data;\n> +\tint ret;\n> +\n> +\tret = prom21_xhci_pm_get(hwmon, &pm_ref);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\tmutex_lock(&hwmon->lock);\n> +\tindex = readl(hwmon->regs + PROM21_INDEX);\n> +\t/* Select the PROM21 temperature register through the vendor index. */\n> +\twritel(PROM21_TEMP_REG, hwmon->regs + PROM21_INDEX);\n> +\tdata = readl(hwmon->regs + PROM21_DATA);\n> +\t/* Restore the previous vendor index register value. */\n> +\twritel(index, hwmon->regs + PROM21_INDEX);\n> +\treadl(hwmon->regs + PROM21_INDEX);\n> +\tmutex_unlock(&hwmon->lock);\n> +\n> +\tif (pm_ref) {\n> +\t\t/*\n> +\t\t * Drop only the reference taken by pm_runtime_get_if_active().\n> +\t\t * Do not mark the device busy or schedule autosuspend from the\n> +\t\t * hwmon path; sensor polling must not keep the xHCI PCI device\n> +\t\t * active.\n> +\t\t */\n> +\t\tpm_runtime_put_noidle(dev);\n> +\t}\n> +\n> +\t*raw = data & 0xff;\n> +\tif (!*raw || *raw == 0xff)\n> +\t\treturn -ENODATA;\n> +\n> +\treturn 0;\n> +}\n> +\n> +static long prom21_xhci_raw_to_millicelsius(u8 raw)\n> +{\n> +\t/*\n> +\t * No public AMD reference is available for this value.\n> +\t * The scale was derived from observed PROM21 xHCI temperature readings:\n> +\t *  temp[C] = raw * 0.9066 - 78.624\n> +\t */\n> +\treturn DIV_ROUND_CLOSEST(raw * 9066, 10) - 78624;\n> +}\n> +\n> +static umode_t prom21_xhci_is_visible(const void *drvdata,\n> +\t\t\t\t      enum hwmon_sensor_types type, u32 attr,\n> +\t\t\t\t      int channel)\n> +{\n> +\tif (type != hwmon_temp || channel)\n\nDrop as unnecessary.\n\n> +\t\treturn 0;\n> +\n> +\tswitch (attr) {\n> +\tcase hwmon_temp_input:\n> +\t\treturn 0444;\n> +\tdefault:\n> +\t\treturn 0;\n> +\t}\n> +}\n> +\n> +static int prom21_xhci_read(struct device *dev, enum hwmon_sensor_types type,\n> +\t\t\t    u32 attr, int channel, long *val)\n> +{\n> +\tstruct prom21_xhci *hwmon = dev_get_drvdata(dev);\n> +\tu8 raw;\n> +\tint ret;\n> +\n> +\tif (type != hwmon_temp || attr != hwmon_temp_input || channel)\n> +\t\treturn -EOPNOTSUPP;\n\nI am ok with the type and attr checks, but the channel check is really\nunnecessary. Please drop.\n\n> +\n> +\tret = prom21_xhci_read_temp_raw_restore_index(hwmon, &raw);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\t*val = prom21_xhci_raw_to_millicelsius(raw);\n> +\treturn 0;\n> +}\n> +\n> +static const struct hwmon_ops prom21_xhci_ops = {\n> +\t.is_visible = prom21_xhci_is_visible,\n> +\t.read = prom21_xhci_read,\n> +};\n> +\n> +static const struct hwmon_channel_info *const prom21_xhci_info[] = {\n> +\tHWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),\n> +\tNULL,\n> +};\n> +\n> +static const struct hwmon_chip_info prom21_xhci_chip_info = {\n> +\t.ops = &prom21_xhci_ops,\n> +\t.info = prom21_xhci_info,\n> +};\n> +\n> +static int prom21_xhci_probe(struct auxiliary_device *auxdev,\n> +\t\t\t     const struct auxiliary_device_id *id)\n> +{\n> +\tstruct device *dev = &auxdev->dev;\n> +\tstruct device *parent = dev->parent;\n> +\tstruct prom21_xhci *hwmon;\n> +\tstruct pci_dev *pdev;\n> +\tstruct usb_hcd *hcd;\n> +\tint ret;\n> +\n> +\tif (!parent || !dev_is_pci(parent))\n> +\t\treturn -ENODEV;\n\nHow would this ever happen ?\n\n> +\n> +\tpdev = to_pci_dev(parent);\n> +\thcd = pci_get_drvdata(pdev);\n> +\tif (!hcd)\n> +\t\treturn dev_err_probe(dev, -ENODEV,\n> +\t\t\t\t     \"xHCI HCD data unavailable\\n\");\n> +\n> +\tif (!hcd->regs || hcd->rsrc_len < PROM21_DATA + sizeof(u32))\n> +\t\treturn dev_err_probe(dev, -ENODEV, \"invalid MMIO resource\\n\");\n> +\n\nIsn't that a bit fragile ? Can a driver like this really make assumptions\nabout the contents of struct usb_hcd and the content of the parent's\ndriver data ?\n\n> +\thwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);\n> +\tif (!hwmon)\n> +\t\treturn -ENOMEM;\n> +\n> +\tret = devm_mutex_init(dev, &hwmon->lock);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\thwmon->pdev = pdev;\n> +\thwmon->regs = hcd->regs;\n> +\tauxiliary_set_drvdata(auxdev, hwmon);\n> +\n> +\t/*\n> +\t * Use the PCI function as the hwmon parent so user space reports it as\n> +\t * a PCI adapter. Lifetime is still owned by this auxiliary driver;\n> +\t * remove() unregisters the hwmon device before xhci-pci tears down the\n> +\t * HCD.\n> +\t */\n\nI am sure I understand the reasoning here. What is the problem if it is attached\nto the auxiliary device ? Other drivers do that, so I don't immediate see why\nthat would be a problem here.\n\n> +\thwmon->hwmon_dev =\n> +\t\thwmon_device_register_with_info(&pdev->dev, \"prom21_xhci\",\n> +\t\t\t\t\t\thwmon, &prom21_xhci_chip_info,\n> +\t\t\t\t\t\tNULL);\n> +\tif (IS_ERR(hwmon->hwmon_dev))\n> +\t\treturn PTR_ERR(hwmon->hwmon_dev);\n> +\n> +\treturn 0;\n> +}\n> +\n> +static void prom21_xhci_remove(struct auxiliary_device *auxdev)\n> +{\n> +\tstruct prom21_xhci *hwmon = auxiliary_get_drvdata(auxdev);\n> +\n> +\t/*\n> +\t * The PROM21 PCI glue destroys the auxiliary device before HCD teardown.\n> +\t * Unregister the hwmon device here so sysfs removes the attributes,\n> +\t * stops new reads, and drains active hwmon callbacks before the xHCI\n> +\t * MMIO mapping is released.\n> +\t */\n> +\thwmon_device_unregister(hwmon->hwmon_dev);\n> +}\n> +\n> +static const struct auxiliary_device_id prom21_xhci_id_table[] = {\n> +\t{ .name = \"xhci_pci_prom21.hwmon\" },\n> +\t{}\n> +};\n> +MODULE_DEVICE_TABLE(auxiliary, prom21_xhci_id_table);\n> +\n> +static struct auxiliary_driver prom21_xhci_driver = {\n> +\t.name = \"prom21-xhci\",\n> +\t.probe = prom21_xhci_probe,\n> +\t.remove = prom21_xhci_remove,\n> +\t.id_table = prom21_xhci_id_table,\n> +};\n> +module_auxiliary_driver(prom21_xhci_driver);\n> +\n> +MODULE_AUTHOR(\"Jihong Min <hurryman2212@gmail.com>\");\n> +MODULE_DESCRIPTION(\"AMD Promontory 21 xHCI temperature sensor driver\");\n> +MODULE_LICENSE(\"GPL\");","headers":{"Return-Path":"\n <linux-pci+bounces-54264-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Xn9PLkhV;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-54264-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"Xn9PLkhV\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.216.46","smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=roeck-us.net","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBtqH594lz1yKm\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 01:50:03 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 2C2AC3077569\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 15:45:21 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A7C142ED860;\n\tFri,  8 May 2026 15:45:17 +0000 (UTC)","from mail-pj1-f46.google.com (mail-pj1-f46.google.com\n [209.85.216.46])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 26D722EDD7D\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 15:45:14 +0000 (UTC)","by mail-pj1-f46.google.com with SMTP id\n 98e67ed59e1d1-3665a90bcd3so734269a91.1\n        for <linux-pci@vger.kernel.org>; Fri, 08 May 2026 08:45:14 -0700 (PDT)","from ?IPV6:2600:1700:e321:62f0:da43:aeff:fecc:bfd5?\n ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2baf1c5466bsm26707695ad.0.2026.05.08.08.45.12\n        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n        Fri, 08 May 2026 08:45:13 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778255117; cv=none;\n b=QNv2hSNtMlaPEsh+mHjF9C3eUiIVxnd6KsqgQrRlltL4KdSBaWoozHzn7laEftFSYvCg+NtJlu+iz9okfgl1vNqP7UkjmPcaPqoyVEl0svKStQ9VBYBQj5OO/qD0Jk2z86ZnZCBCbp2w+8cbZE3fdSoaNYqW0Z1pofkEnVCssz4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778255117; c=relaxed/simple;\n\tbh=6paRAVwk0PZoN4nszLIT7hKf5hH14eTB0iWX/VR0Tmc=;\n\th=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:\n\t In-Reply-To:Content-Type;\n b=iPRQ5lSC0bui6zpBqGxFMlms3QkqdD+oGmsRhDLme9xNhrW7o1/cK4h5vNEyjg6UKccSKG64zPeBh7BwUte8b6tr992qycp8rgilUznU53h03Y6O6TG3ywjB3V2IKB3Pxd6mqGkN6po22o9TyqpWdzlHQ/P5BdGvGks1O60CMk0=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=roeck-us.net;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=Xn9PLkhV; arc=none smtp.client-ip=209.85.216.46","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1778255114; x=1778859914;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:in-reply-to:autocrypt:from\n         :content-language:references:cc:to:subject:user-agent:mime-version\n         :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to;\n        bh=oJRHVQq7aQgGmot3T8SSBCUdDsZa5RJoIlCaB/RdQcQ=;\n        b=Xn9PLkhVjmCDx5cewkqr4gph7gL/t1LX4y3zJVOOWrhgxQVpgdFsvGYW6pZ69B8r8Y\n         CSw1ZwhnlqiosAIt+bZPy6303xgq39x9cfrwWoU7SVQDjYiFCNVfUtal37oyIgI6ZrRM\n         HflLSTBjJGOQllFakFRxkgsA83iRgJBr9fO1tYwBYh+JZtY5VT7TTV9hPlVW63ARMT3M\n         yN2udOiJgZQiS4467lGEAMeQMO2/4cP5Tc70w7netJgYZNb2pxLcUfGfaTXwqKw+v7Na\n         Sn6oiVttijqUjiX533tKmIwM8Kw2eITUEAuhDfDqPPjlgJZi+X+58FSQTjM6zy1QrEFB\n         rWqA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778255114; x=1778859914;\n        h=content-transfer-encoding:in-reply-to:autocrypt:from\n         :content-language:references:cc:to:subject:user-agent:mime-version\n         :date:message-id:sender:x-gm-gg:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=oJRHVQq7aQgGmot3T8SSBCUdDsZa5RJoIlCaB/RdQcQ=;\n        b=Xi14/iJ7GRzBFpkVg/dER4eL5EYFpNbWmqatSVnvcjF6HipzRl4j9HIFE2HvKZRpJN\n         A9I1cBYWTcvWSGr9FJwrQQgPcUacIs3B0n/gcbyBnv0UWL6Rs7vyjVbDwpJGlbsjNGb+\n         5myPlRNe3ANxwCfMLwxS1czjquPgdbn3oPHIvwzgKrtP4AW2zrdlN5/X/JR/8X65bMIH\n         H3k8n6c8pO1lio+1yVWXVCndnQYXAmuSjvDhg8WiToepw4AmmnuvV36skN+U1oZgPez3\n         gtZkjCdlTq07hq1Tvl4eNdMxzjNFRsc62H5XnHzXiHb2lkZLh/iEzFpkM/uFph9n5D07\n         hSvQ==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9JgpV3knH7vx1+YLfYthex5N/Cs6X460YtNrh0WT/tbSMKcsM2A7ney4+XPqjdrGvs/jyWcBSz3iY=@vger.kernel.org","X-Gm-Message-State":"AOJu0YxHV9UGWJpa8j2Z8kYiWPdX3KK6Z31/DiW1Dhebcia5f4AvQprI\n\tIRNZu6Hkr68eGNpnaXodj8Gy3qC5A0I5B+VwDzG2z49DgF6bA+6WgZHl","X-Gm-Gg":"Acq92OFxO/E3FiIlTRcjSZdzbrcUpkrYFRxt7xGs2XCxwTL962ShvbqJGddCbVxqRCc\n\tyiEP8krxnaKwluHGxHohqjByLNAcAbnZPDu49yJPnkPTsOe3ZJ32Mu2nOY8CRibFnquQ4ehDj8q\n\t/v1f2+pp+bej0RjGWFxYYQ2bpj2rvt/fBBRiawzM1JUWn9ltXrFaJK8iIYTvdD6AcP4fFpF4tB5\n\thiTB78/Kv20B8lipW8sa9Wy1hIdOWmXEQ1l9rHTK8e+xQJBJVIqJng52QOtJJnXSkR2MWTDz7hN\n\tsONyKXpZ4pG8RCVjHA/wdcNpVN41+qg8YPyLxX62zJMd8bAvENItLGX6PJOMQT4+T1gZuBQm6EX\n\tfWMB1xXktBh8FhiVQ8zxCZ1igXI0vHT6pN7VHH1Y02ACr+gWsB7sRmuC9P/Y6vrzgckbZVRkOvq\n\ttAF5A+5/cC2kSlqqUhVXc6AZMhKvaZ9FRP4b2fen6jWVrZdgyNhoK4PPSkrt5MCVED6W1HL+0M","X-Received":"by 2002:a17:902:cf4c:b0:2b2:5840:809c with SMTP id\n d9443c01a7336-2ba78b49e00mr134787025ad.1.1778255113973;\n        Fri, 08 May 2026 08:45:13 -0700 (PDT)","Sender":"Guenter Roeck <groeck7@gmail.com>","Message-ID":"<0269bf45-316b-4ba5-af0e-312f6c2bebdd@roeck-us.net>","Date":"Fri, 8 May 2026 08:45:11 -0700","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","To":"Jihong Min <hurryman2212@gmail.com>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n Mathias Nyman <mathias.nyman@intel.com>","Cc":"Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>,\n Mario Limonciello <mario.limonciello@amd.com>,\n Basavaraj Natikar <Basavaraj.Natikar@amd.com>, linux-usb@vger.kernel.org,\n linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,\n linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org","References":"<20260508143910.14673-1-hurryman2212@gmail.com>\n <20260508143910.14673-3-hurryman2212@gmail.com>","Content-Language":"en-US","From":"Guenter Roeck <linux@roeck-us.net>","Autocrypt":"addr=linux@roeck-us.net; keydata=\n xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN\n RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7\n nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl\n 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh\n gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX\n IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC\n kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0\n VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s\n jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk\n BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv\n ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAcm9lY2stdXMubmV0PsLBgQQTAQIAKwIbAwYL\n CQgHAwIGFQgCCQoLBBYCAwECHgECF4ACGQEFAmgrMyQFCSbODQkACgkQyx8mb86fmYGcWRAA\n oRwrk7V8fULqnGGpBIjp7pvR187Yzx+lhMGUHuM5H56TFEqeVwCMLWB2x1YRolYbY4MEFlQg\n VUFcfeW0OknSr1s6wtrtQm0gdkolM8OcCL9ptTHOg1mmXa4YpW8QJiL0AVtbpE9BroeWGl9v\n 2TGILPm9mVp+GmMQgkNeCS7Jonq5f5pDUGumAMguWzMFEg+Imt9wr2YA7aGen7KPSqJeQPpj\n onPKhu7O/KJKkuC50ylxizHzmGx+IUSmOZxN950pZUFvVZH9CwhAAl+NYUtcF5ry/uSYG2U7\n DCvpzqOryJRemKN63qt1bjF6cltsXwxjKOw6CvdjJYA3n6xCWLuJ6yk6CAy1Ukh545NhgBAs\n rGGVkl6TUBi0ixL3EF3RWLa9IMDcHN32r7OBhw6vbul8HqyTFZWY2ksTvlTl+qG3zV6AJuzT\n WdXmbcKN+TdhO5XlxVlbZoCm7ViBj1+PvIFQZCnLAhqSd/DJlhaq8fFXx1dCUPgQDcD+wo65\n qulV/NijfU8bzFfEPgYP/3LP+BSAyFs33y/mdP8kbMxSCjnLEhimQMrSSo/To1Gxp5C97fw5\n 3m1CaMILGKCmfI1B8iA8zd8ib7t1Rg0qCwcAnvsM36SkrID32GfFbv873bNskJCHAISK3Xkz\n qo7IYZmjk/IJGbsiGzxUhvicwkgKE9r7a1rOwU0ETofVZwEQALlLbQeBDTDbwQYrj0gbx3bq\n 7kpKABxN2MqeuqGr02DpS9883d/t7ontxasXoEz2GTioevvRmllJlPQERVxM8gQoNg22twF7\n pB/zsrIjxkE9heE4wYfN1AyzT+AxgYN6f8hVQ7Nrc9XgZZe+8IkuW/Nf64KzNJXnSH4u6nJM\n J2+Dt274YoFcXR1nG76Q259mKwzbCukKbd6piL+VsT/qBrLhZe9Ivbjq5WMdkQKnP7gYKCAi\n pNVJC4enWfivZsYupMd9qn7Uv/oCZDYoBTdMSBUblaLMwlcjnPpOYK5rfHvC4opxl+P/Vzyz\n 6WC2TLkPtKvYvXmdsI6rnEI4Uucg0Au/Ulg7aqqKhzGPIbVaL+U0Wk82nz6hz+WP2ggTrY1w\n ZlPlRt8WM9w6WfLf2j+PuGklj37m+KvaOEfLsF1v464dSpy1tQVHhhp8LFTxh/6RWkRIR2uF\n I4v3Xu/k5D0LhaZHpQ4C+xKsQxpTGuYh2tnRaRL14YMW1dlI3HfeB2gj7Yc8XdHh9vkpPyuT\n nY/ZsFbnvBtiw7GchKKri2gDhRb2QNNDyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY\n HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX\n JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAmgrMyQFCSbODQkACgkQyx8mb86fmYHlgg/9\n H5JeDmB4jsreE9Bn621wZk7NMzxy9STxiVKSh8Mq4pb+IDu1RU2iLyetCY1TiJlcxnE362kj\n njrfAdqyPteHM+LU59NtEbGwrfcXdQoh4XdMuPA5ADetPLma3YiRa3VsVkLwpnR7ilgwQw6u\n dycEaOxQ7LUXCs0JaGVVP25Z2hMkHBwx6BlW6EZLNgzGI2rswSZ7SKcsBd1IRHVf0miwIFYy\n j/UEfAFNW+tbtKPNn3xZTLs3quQN7GdYLh+J0XxITpBZaFOpwEKV+VS36pSLnNl0T5wm0E/y\n scPJ0OVY7ly5Vm1nnoH4licaU5Y1nSkFR/j2douI5P7Cj687WuNMC6CcFd6j72kRfxklOqXw\n zvy+2NEcXyziiLXp84130yxAKXfluax9sZhhrhKT6VrD45S6N3HxJpXQ/RY/EX35neH2/F7B\n RgSloce2+zWfpELyS1qRkCUTt1tlGV2p+y2BPfXzrHn2vxvbhEn1QpQ6t+85FKN8YEhJEygJ\n F0WaMvQMNrk9UAUziVcUkLU52NS9SXqpVg8vgrO0JKx97IXFPcNh0DWsSj/0Y8HO/RDkGXYn\n FDMj7fZSPKyPQPmEHg+W/KzxSSfdgWIHF2QaQ0b2q1wOSec4Rti52ohmNSY+KNIW/zODhugJ\n np3900V20aS7eD9K8GTU0TGC1pyz6IVJwIE=","In-Reply-To":"<20260508143910.14673-3-hurryman2212@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit"}},{"id":3688602,"web_url":"http://patchwork.ozlabs.org/comment/3688602/","msgid":"<f682afbb-e816-44e6-9b18-fc7e2335706e@amd.com>","list_archive_url":null,"date":"2026-05-08T16:51:13","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":81779,"url":"http://patchwork.ozlabs.org/api/people/81779/","name":"Mario Limonciello","email":"Mario.Limonciello@amd.com"},"content":"On 5/8/26 09:39, Jihong Min wrote:\n> Add an auxiliary-bus hwmon driver for the temperature sensor exposed by\n> AMD Promontory 21 (PROM21) xHCI PCI functions. The driver binds to the\n> \"hwmon\" auxiliary device published by the PROM21 xHCI PCI glue and\n> exposes the sensor as temp1_input under the prom21_xhci hwmon device.\n> \n> The sensor is accessed through a PROM21 vendor index/data register pair\n> in the xHCI PCI MMIO BAR. The read path restores the previous vendor\n> index value after sampling and does not runtime-resume the parent PCI\n> device; reads from a suspended parent return -ENODATA.\n> \n> Document the supported device, register access, runtime PM behavior, and\n> sysfs lookup method. The documentation also records the observation\n> method used to identify the register pair and derive the conversion\n> formula.\n> \n> Assisted-by: Codex:gpt-5.5\n> Signed-off-by: Jihong Min <hurryman2212@gmail.com>\n> ---\n>   Documentation/hwmon/index.rst       |   1 +\n>   Documentation/hwmon/prom21-xhci.rst |  99 +++++++++++\n>   drivers/hwmon/Kconfig               |  10 ++\n>   drivers/hwmon/Makefile              |   1 +\n>   drivers/hwmon/prom21-xhci.c         | 250 ++++++++++++++++++++++++++++\n>   5 files changed, 361 insertions(+)\n>   create mode 100644 Documentation/hwmon/prom21-xhci.rst\n>   create mode 100644 drivers/hwmon/prom21-xhci.c\n> \n> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst\n> index 8b655e5d6b68..324208f1faa2 100644\n> --- a/Documentation/hwmon/index.rst\n> +++ b/Documentation/hwmon/index.rst\n> @@ -216,6 +216,7 @@ Hardware Monitoring Kernel Drivers\n>      pmbus\n>      powerz\n>      powr1220\n> +   prom21-xhci\n>      pt5161l\n>      pxe1610\n>      pwm-fan\n> diff --git a/Documentation/hwmon/prom21-xhci.rst b/Documentation/hwmon/prom21-xhci.rst\n> new file mode 100644\n> index 000000000000..10d03c4476c3\n> --- /dev/null\n> +++ b/Documentation/hwmon/prom21-xhci.rst\n> @@ -0,0 +1,99 @@\n> +.. SPDX-License-Identifier: GPL-2.0\n> +\n> +Kernel driver prom21-xhci\n> +=========================\n> +\n> +Supported chips:\n> +\n> +  * AMD Promontory 21 (PROM21) xHCI\n> +\n> +    Prefix: 'prom21_xhci'\n> +\n> +    PCI ID: 1022:43fd\n> +\n> +Author:\n> +\n> +  - Jihong Min <hurryman2212@gmail.com>\n> +\n> +Description\n> +-----------\n> +\n> +This driver exposes the temperature sensor in AMD PROM21 xHCI controllers.\n> +\n> +The driver binds to an auxiliary device created by the xHCI PCI driver for\n> +supported controllers. The sensor value is accessed through a vendor-specific\n> +index/data register pair in the controller's PCI MMIO BAR.\n> +The auxiliary device is created by the ``xhci-pci-prom21`` PCI glue driver.\n> +USB host operation is otherwise delegated to the common ``xhci-pci`` code.\n> +\n> +PROM21 is an AMD chipset IP used in single-chip or daisy-chained configurations\n> +to build AMD 6xx/8xx series chipsets. Since the xHCI controllers are\n> +integrated in PROM21, this temperature can also be used as a monitor for a\n> +temperature close to the AMD chipset temperature.\n> +\n> +Register access\n> +---------------\n> +\n> +The temperature value is read through a vendor-specific index/data register\n> +pair in the xHCI PCI MMIO BAR. The driver uses the following byte offsets from\n> +the MMIO BAR base:\n> +\n> +======================= =====================================================\n> +0x3000\t\t\tVendor index register\n> +0x3008\t\t\tVendor data register\n> +======================= =====================================================\n> +\n> +The driver saves the current vendor index register value, writes the\n> +temperature selector ``0x0001e520`` to the vendor index register, reads the\n> +vendor data register, and restores the previous vendor index value before\n> +returning. The raw temperature value is the low 8 bits of the vendor data\n> +register value.\n> +\n> +No public AMD reference is available for the register pair or the raw value.\n> +The register pair was identified on an X870E system with two PROM21 xHCI\n> +controllers. One controller was passed through to a Windows VM, and the same\n> +controller's PCI MMIO BAR was observed from the Linux host while HWiNFO64 was\n> +reporting the PROM21 xHCI temperature. In the test environment, the reported\n> +temperature was very stable at idle and the displayed sensor resolution was\n> +low, which made it possible to look for a consistently repeating MMIO response\n> +for the same reported temperature. During observation, offset 0x3000 repeatedly\n> +contained selector ``0x0001e520``. Writing the same selector to offset 0x3000\n> +from Linux and then reading offset 0x3008 reproduced the same raw value, so the\n> +offsets are treated as a vendor index/data register pair.\n> +\n> +The conversion formula was empirically inferred by matching observed raw\n> +8-bit values against HWiNFO64's reported PROM21 xHCI temperature for the same\n> +controller. The observed mapping is:\n> +\n> +  temp[C] = raw * 0.9066 - 78.624\n> +\n> +Runtime PM\n> +----------\n> +\n> +The driver does not wake the xHCI PCI device for hwmon reads. It reads the\n> +temperature only when the parent device is already active. A read from a\n> +suspended device returns ``-ENODATA``. Sensor reads do not mark the xHCI PCI\n> +device as busy or schedule autosuspend, so polling the sensor does not delay\n> +runtime suspend.\n> +\n> +Sysfs entries\n> +-------------\n> +\n> +======================= =====================================================\n> +temp1_input\t\tTemperature in millidegrees Celsius\n> +======================= =====================================================\n> +\n> +The hwmon device name is ``prom21_xhci``. The sysfs path depends on the hwmon\n> +device number assigned by the kernel. Userspace can locate the device by\n> +matching the ``name`` attribute:\n> +\n> +.. code-block:: sh\n> +\n> +   for hwmon in /sys/class/hwmon/hwmon*; do\n> +           [ \"$(cat \"$hwmon/name\")\" = \"prom21_xhci\" ] || continue\n> +           cat \"$hwmon/temp1_input\"\n> +   done\n> +\n> +``temp1_input`` reports millidegrees Celsius, so a value of ``50113`` means\n> +50.113 degrees Celsius. If the raw register value is invalid, ``temp1_input``\n> +returns ``-ENODATA``.\n> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig\n> index 14e4cea48acc..fe0f14e247b5 100644\n> --- a/drivers/hwmon/Kconfig\n> +++ b/drivers/hwmon/Kconfig\n> @@ -951,6 +951,16 @@ config SENSORS_POWR1220\n>   \t  This driver can also be built as a module. If so, the module\n>   \t  will be called powr1220.\n>   \n> +config SENSORS_PROM21_XHCI\n> +\ttristate \"AMD Promontory 21 xHCI temperature sensor\"\n> +\tdepends on USB_XHCI_PCI_PROM21\n> +\thelp\n> +\t  If you say yes here you get support for the AMD Promontory 21\n> +\t  (PROM21) xHCI temperature sensor.\n> +\n> +\t  This driver can also be built as a module. If so, the module\n> +\t  will be called prom21-xhci.\n> +\n>   config SENSORS_LAN966X\n>   \ttristate \"Microchip LAN966x Hardware Monitoring\"\n>   \tdepends on SOC_LAN966 || COMPILE_TEST\n> diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile\n> index 4788996aa137..0bda542e8e2b 100644\n> --- a/drivers/hwmon/Makefile\n> +++ b/drivers/hwmon/Makefile\n> @@ -196,6 +196,7 @@ obj-$(CONFIG_SENSORS_PC87427)\t+= pc87427.o\n>   obj-$(CONFIG_SENSORS_PCF8591)\t+= pcf8591.o\n>   obj-$(CONFIG_SENSORS_POWERZ)\t+= powerz.o\n>   obj-$(CONFIG_SENSORS_POWR1220)  += powr1220.o\n> +obj-$(CONFIG_SENSORS_PROM21_XHCI)\t+= prom21-xhci.o\n>   obj-$(CONFIG_SENSORS_PT5161L)\t+= pt5161l.o\n>   obj-$(CONFIG_SENSORS_PWM_FAN)\t+= pwm-fan.o\n>   obj-$(CONFIG_SENSORS_QNAP_MCU_HWMON)\t+= qnap-mcu-hwmon.o\n> diff --git a/drivers/hwmon/prom21-xhci.c b/drivers/hwmon/prom21-xhci.c\n> new file mode 100644\n> index 000000000000..f91303ce3428\n> --- /dev/null\n> +++ b/drivers/hwmon/prom21-xhci.c\n> @@ -0,0 +1,250 @@\n> +// SPDX-License-Identifier: GPL-2.0\n> +/*\n> + * AMD Promontory 21 xHCI Hwmon Implementation\n> + * (only temperature monitoring is supported)\n> + *\n> + * This can be effectively used as the alternative chipset temperature monitor.\n> + *\n> + * Copyright (C) 2026 Jihong Min <hurryman2212@gmail.com>\n> + */\n> +\n> +#include <linux/auxiliary_bus.h>\n> +#include <linux/device.h>\n> +#include <linux/err.h>\n> +#include <linux/errno.h>\n> +#include <linux/hwmon.h>\n> +#include <linux/io.h>\n> +#include <linux/math.h>\n> +#include <linux/module.h>\n> +#include <linux/mutex.h>\n> +#include <linux/pci.h>\n> +#include <linux/pm_runtime.h>\n> +#include <linux/slab.h>\n> +#include <linux/usb.h>\n> +#include <linux/usb/hcd.h>\n> +\n> +#define PROM21_INDEX 0x3000\n> +#define PROM21_DATA 0x3008\n> +#define PROM21_TEMP_REG 0x0001e520\n> +\n> +struct prom21_xhci {\n> +\tstruct pci_dev *pdev;\n> +\tstruct device *hwmon_dev;\n> +\tvoid __iomem *regs;\n> +\tstruct mutex lock; /* serializes index/data register access */\n> +};\n> +\n> +static int prom21_xhci_pm_get(struct prom21_xhci *hwmon, bool *pm_ref)\n> +{\n> +\tstruct device *dev = &hwmon->pdev->dev;\n> +\tint ret;\n> +\n> +\t*pm_ref = false;\n> +\n> +\t/*\n> +\t * PROM21 temperature register access does not return a valid value while\n> +\t * the parent xHCI PCI function is suspended. Do not wake the device from\n> +\t * a hwmon read; only read when runtime PM reports the device as active,\n> +\t * or when runtime PM is disabled and the device is not marked as\n> +\t * suspended.\n> +\t */\n> +\tret = pm_runtime_get_if_active(dev);\n> +\tif (ret > 0) {\n> +\t\t*pm_ref = true;\n> +\t\treturn 0;\n> +\t}\n> +\n> +\tif (ret == -EINVAL && !pm_runtime_status_suspended(dev))\n> +\t\treturn 0;\n> +\n> +\tif (!ret || pm_runtime_status_suspended(dev))\n> +\t\treturn -ENODATA;\n> +\n> +\treturn ret;\n> +}\n> +\n> +/*\n> + * This is not a pure MMIO read. The PROM21 vendor data register is selected\n> + * by temporarily writing PROM21_TEMP_REG to the vendor index register.\n> + * Serialize the sequence, keep it short, and restore the previous index before\n> + * returning so this driver does not leave the vendor index/data register pair\n> + * in a different state for other possible users.\n> + */\n> +static int prom21_xhci_read_temp_raw_restore_index(struct prom21_xhci *hwmon,\n> +\t\t\t\t\t\t   u8 *raw)\n> +{\n> +\tstruct device *dev = &hwmon->pdev->dev;\n> +\tbool pm_ref;\n> +\tu32 index;\n> +\tu32 data;\n> +\tint ret;\n> +\n> +\tret = prom21_xhci_pm_get(hwmon, &pm_ref);\n> +\tif (ret)\n> +\t\treturn ret;\n\nRather than using pm_ref as an output variable to indicate whether you \ntook a ref - how about you instead always take a ref on success and \nreturn an error on fail?  This would feel more logical to me.\n\n> +\n> +\tmutex_lock(&hwmon->lock);\nguard(mutex) perhaps?\n\n> +\tindex = readl(hwmon->regs + PROM21_INDEX);\n> +\t/* Select the PROM21 temperature register through the vendor index. */\n> +\twritel(PROM21_TEMP_REG, hwmon->regs + PROM21_INDEX);\n> +\tdata = readl(hwmon->regs + PROM21_DATA);\n\nYou only care about the first byte, right?  Just use readb() and make \ndata a u8.\n\n> +\t/* Restore the previous vendor index register value. */\n> +\twritel(index, hwmon->regs + PROM21_INDEX);\n> +\treadl(hwmon->regs + PROM21_INDEX);\n> +\tmutex_unlock(&hwmon->lock);\n> +\n> +\tif (pm_ref) {\n> +\t\t/*\n> +\t\t * Drop only the reference taken by pm_runtime_get_if_active().\n> +\t\t * Do not mark the device busy or schedule autosuspend from the\n> +\t\t * hwmon path; sensor polling must not keep the xHCI PCI device\n> +\t\t * active.\n> +\t\t */\n> +\t\tpm_runtime_put_noidle(dev);\n> +\t}\n> +\n> +\t*raw = data & 0xff;\n\nI personally don't really like changing the pointer when there is \npotentially an error case with it for -ENODATA.\n\n> +\tif (!*raw || *raw == 0xff)\n\nDoes 0xff actually happen with your runtime PM handling? Between my \nsuggestion above to use readb() this can turn into:\n\nif (!data)\n\treturn -ENODDATA;\n*raw = data;\n\nreturn 0;\n\n> +\t\treturn -ENODATA;\n> +\n> +\treturn 0;\n> +}\n> +\n> +static long prom21_xhci_raw_to_millicelsius(u8 raw)\n> +{\n> +\t/*\n> +\t * No public AMD reference is available for this value.\n> +\t * The scale was derived from observed PROM21 xHCI temperature readings:\n> +\t *  temp[C] = raw * 0.9066 - 78.624\n> +\t */\n> +\treturn DIV_ROUND_CLOSEST(raw * 9066, 10) - 78624;\n> +}\n> +\n> +static umode_t prom21_xhci_is_visible(const void *drvdata,\n> +\t\t\t\t      enum hwmon_sensor_types type, u32 attr,\n> +\t\t\t\t      int channel)\n> +{\n> +\tif (type != hwmon_temp || channel)\n> +\t\treturn 0;\n> +\n> +\tswitch (attr) {\n> +\tcase hwmon_temp_input:\n> +\t\treturn 0444;\n> +\tdefault:\n> +\t\treturn 0;\n> +\t}\n> +}\n> +\n> +static int prom21_xhci_read(struct device *dev, enum hwmon_sensor_types type,\n> +\t\t\t    u32 attr, int channel, long *val)\n> +{\n> +\tstruct prom21_xhci *hwmon = dev_get_drvdata(dev);\n> +\tu8 raw;\n> +\tint ret;\n> +\n> +\tif (type != hwmon_temp || attr != hwmon_temp_input || channel)\n> +\t\treturn -EOPNOTSUPP;\n> +\n> +\tret = prom21_xhci_read_temp_raw_restore_index(hwmon, &raw);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\t*val = prom21_xhci_raw_to_millicelsius(raw);\n> +\treturn 0;\n> +}\n> +\n> +static const struct hwmon_ops prom21_xhci_ops = {\n> +\t.is_visible = prom21_xhci_is_visible,\n> +\t.read = prom21_xhci_read,\n> +};\n> +\n> +static const struct hwmon_channel_info *const prom21_xhci_info[] = {\n> +\tHWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),\n> +\tNULL,\n> +};\n> +\n> +static const struct hwmon_chip_info prom21_xhci_chip_info = {\n> +\t.ops = &prom21_xhci_ops,\n> +\t.info = prom21_xhci_info,\n> +};\n> +\n> +static int prom21_xhci_probe(struct auxiliary_device *auxdev,\n> +\t\t\t     const struct auxiliary_device_id *id)\n> +{\n> +\tstruct device *dev = &auxdev->dev;\n> +\tstruct device *parent = dev->parent;\n> +\tstruct prom21_xhci *hwmon;\n> +\tstruct pci_dev *pdev;\n> +\tstruct usb_hcd *hcd;\n> +\tint ret;\n> +\n> +\tif (!parent || !dev_is_pci(parent))\n> +\t\treturn -ENODEV;\n> +\n> +\tpdev = to_pci_dev(parent);\n> +\thcd = pci_get_drvdata(pdev);\n> +\tif (!hcd)\n> +\t\treturn dev_err_probe(dev, -ENODEV,\n> +\t\t\t\t     \"xHCI HCD data unavailable\\n\");\n> +\n> +\tif (!hcd->regs || hcd->rsrc_len < PROM21_DATA + sizeof(u32))\n> +\t\treturn dev_err_probe(dev, -ENODEV, \"invalid MMIO resource\\n\");\n> +\n> +\thwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);\n> +\tif (!hwmon)\n> +\t\treturn -ENOMEM;\n> +\n> +\tret = devm_mutex_init(dev, &hwmon->lock);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\thwmon->pdev = pdev;\n> +\thwmon->regs = hcd->regs;\n> +\tauxiliary_set_drvdata(auxdev, hwmon);\n> +\n> +\t/*\n> +\t * Use the PCI function as the hwmon parent so user space reports it as\n> +\t * a PCI adapter. Lifetime is still owned by this auxiliary driver;\n> +\t * remove() unregisters the hwmon device before xhci-pci tears down the\n> +\t * HCD.\n> +\t */\n> +\thwmon->hwmon_dev =\n> +\t\thwmon_device_register_with_info(&pdev->dev, \"prom21_xhci\",\n> +\t\t\t\t\t\thwmon, &prom21_xhci_chip_info,\n> +\t\t\t\t\t\tNULL);\n> +\tif (IS_ERR(hwmon->hwmon_dev))\n> +\t\treturn PTR_ERR(hwmon->hwmon_dev);\n> +\n> +\treturn 0;\n> +}\n> +\n> +static void prom21_xhci_remove(struct auxiliary_device *auxdev)\n> +{\n> +\tstruct prom21_xhci *hwmon = auxiliary_get_drvdata(auxdev);\n> +\n> +\t/*\n> +\t * The PROM21 PCI glue destroys the auxiliary device before HCD teardown.\n> +\t * Unregister the hwmon device here so sysfs removes the attributes,\n> +\t * stops new reads, and drains active hwmon callbacks before the xHCI\n> +\t * MMIO mapping is released.\n> +\t */\n> +\thwmon_device_unregister(hwmon->hwmon_dev);\n> +}\n> +\n> +static const struct auxiliary_device_id prom21_xhci_id_table[] = {\n> +\t{ .name = \"xhci_pci_prom21.hwmon\" },\n> +\t{}\n> +};\n> +MODULE_DEVICE_TABLE(auxiliary, prom21_xhci_id_table);\n> +\n> +static struct auxiliary_driver prom21_xhci_driver = {\n> +\t.name = \"prom21-xhci\",\n> +\t.probe = prom21_xhci_probe,\n> +\t.remove = prom21_xhci_remove,\n> +\t.id_table = prom21_xhci_id_table,\n> +};\n> +module_auxiliary_driver(prom21_xhci_driver);\n> +\n> +MODULE_AUTHOR(\"Jihong Min <hurryman2212@gmail.com>\");\n> +MODULE_DESCRIPTION(\"AMD Promontory 21 xHCI temperature sensor driver\");\n> +MODULE_LICENSE(\"GPL\");","headers":{"Return-Path":"\n <linux-pci+bounces-54267-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256\n header.s=selector1 header.b=Cv3wfrk/;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54267-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com\n header.b=\"Cv3wfrk/\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.93.195.65","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=amd.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=amd.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=amd.com;"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBwC84mFRz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 02:52:20 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id F178B305EA88\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 16:51:22 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2C2AD40B6D6;\n\tFri,  8 May 2026 16:51:22 +0000 (UTC)","from SN4PR2101CU001.outbound.protection.outlook.com\n (mail-southcentralusazon11012065.outbound.protection.outlook.com\n [40.93.195.65])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AA4D2FFDD6;\n\tFri,  8 May 2026 16:51:19 +0000 (UTC)","from SA0PR12MB4557.namprd12.prod.outlook.com (2603:10b6:806:9d::10)\n by CY8PR12MB7490.namprd12.prod.outlook.com (2603:10b6:930:91::13) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.17; Fri, 8 May\n 2026 16:51:16 +0000","from SA0PR12MB4557.namprd12.prod.outlook.com\n ([fe80::885a:79b3:8288:287]) by SA0PR12MB4557.namprd12.prod.outlook.com\n ([fe80::885a:79b3:8288:287%5]) with mapi id 15.20.9891.019; Fri, 8 May 2026\n 16:51:16 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778259082; cv=fail;\n b=alswKFAP/MSQ67fOvXwzrZOK83D1nXdXZmpKQtztqeQtyYxjhDrU9nR4ykmWHNLSZMXT+nuxHwkK4JOaHl8YNW4xU21MIoGUblLfouiqTgKA+9YaCaIjwr1YXsziTvpc9iC0Ino4BKOI2+ZVYSVSrPs/zPIDpNvchFfTrYIRcYU=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=kilOTU3HP6A6F+gdX3++60soninc2sGkqtyS4jDmrO4Ksbw7ShAyJy/cIAxKz441FtkT6pD+MIKPHybkWBUjo/pT/8jegAA8Qi6CgipPPYImvvY05XHFyv4ydL5fuSPhUgTv515MEfWc4l/gM7/wYfCSrjXzAfsN2nLtlYm+qjyXmie58gSS3x6SNEljdAUJ+0dd7KQpW8dqokpYAND86xurw+WP/fb9nbimLa6Y5zgZLhEyxUd47HUNNSJV3hL/L6tsTkjzqSH+ces+weZM4kNZk+/OuCOkMI7zHC2mYssWSJooHWSoZhRfj9YX9BUHzj2JsRIa7ixGZF1sdgk/SQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778259082; c=relaxed/simple;\n\tbh=qICeR3Q0eN2AwdCzvX7D80uBR24qB7rMVX2PFe+nkkc=;\n\th=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:\n\t Content-Type:MIME-Version;\n b=CXHNegH9Mo/ndK3RIEzvgL8N0Y8OdP4O8Y8akIs8UcnzsWPAps/IQURh42v+3BSGmelIjXAW1JtYwVAiF2LqOJY2BUhMpoQSHWCMu/1XQQ0XiUvCG7BpAoMDjQx7dlJ/TqK03bbw4fBJxuXUqw5u7h+0e8S/xKZkZXv++PTBs3E=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=Ls1r+y/BWYVSqiYddwZNOIr31lWZTx0kC8r04wweDxQ=;\n b=wobRZJY4KuUwj4rfCAE0sZbYRLmFMaVzVvaomK9/A0Rk2fv2t8AWZPwNdAIrinkTBvP7/z2BoC9M0s7sKGpojVIxOKO0HnMj/rsdbgRg3IZ2d9YAARaBBvmYTjR/T9+n0fnekLHEoG68WN+wPd2jJbNqZbE5gUvEXPPjhCUQidhHqcq6zVDeA0fHjTsF3uV6DCYmd/hTC8UWSgqPYtfrs1a8PVtnvLeXW2/PlxlMLtmi/ERJYH1zCsmCssVeixBsPYbV0DZOhPBbvzBO8pA0h9oCKUlRMvd1btSlNUqQp0P3/hXj+x9nk4soOLA+b3OSBv4yGIgTitvVDS3NyJqYVQ=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=amd.com;\n spf=fail smtp.mailfrom=amd.com;\n dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com\n header.b=Cv3wfrk/; arc=fail smtp.client-ip=40.93.195.65","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass\n header.d=amd.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Ls1r+y/BWYVSqiYddwZNOIr31lWZTx0kC8r04wweDxQ=;\n b=Cv3wfrk/csKZcdRJ88g5VOf+CXTy9PFno0KCdfHU15aa3rXpkF+tuq3xyb5gnYrKC5iop6359FKvghz6GeyonLsxxva8cuv6phAfqeOt3H3rR6qrPFPukQ4mm5KRv5aHf40+FI4/KNpM9/DsK4ZUOo+MGszb5f5m3MfR78h+2Pg=","Message-ID":"<f682afbb-e816-44e6-9b18-fc7e2335706e@amd.com>","Date":"Fri, 8 May 2026 11:51:13 -0500","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","Content-Language":"en-US","To":"Jihong Min <hurryman2212@gmail.com>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n Mathias Nyman <mathias.nyman@intel.com>","Cc":"Guenter Roeck <linux@roeck-us.net>, Jonathan Corbet <corbet@lwn.net>,\n Shuah Khan <skhan@linuxfoundation.org>,\n Basavaraj Natikar <Basavaraj.Natikar@amd.com>, linux-usb@vger.kernel.org,\n linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,\n linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org","References":"<20260508143910.14673-1-hurryman2212@gmail.com>\n <20260508143910.14673-3-hurryman2212@gmail.com>","From":"Mario Limonciello <mario.limonciello@amd.com>","In-Reply-To":"<20260508143910.14673-3-hurryman2212@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"CH0PR03CA0413.namprd03.prod.outlook.com\n (2603:10b6:610:11b::11) To SA0PR12MB4557.namprd12.prod.outlook.com\n (2603:10b6:806:9d::10)","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"SA0PR12MB4557:EE_|CY8PR12MB7490:EE_","X-MS-Office365-Filtering-Correlation-Id":"b7945aae-6b28-402b-e27d-08dead22053b","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|376014|7416014|366016|1800799024|3023799003|56012099003|22082099003|18002099003;","X-Microsoft-Antispam-Message-Info":"\n\tgkFZUhb8d5pTwuoBD30MD89nXgfOL3LAiTXkVh01Itx0FACm5u34hbGe2dfsPskaukntHIeQAURQ8mG1AQC1j64vtupB3WntZt5b1NyeA+aFllXuQXLN5kuOQDZWZLujrrUSrPim9IaCTt0Ortyh49gUxVrib0QNfswR6tItDrv3du+4m97fMGFXhHq/fh9zoPux4/L7IwEKgXyULPqDgE5oT+xV21vK6OQvQ7iL+5gQdE/46y8Oo/zmyyEG0hk4ZxKiCzI9ZNncWzLZGlNMHPH5m1WW96PyQVSu9QMFvboIHU/GuI7NTarEgXrAfIf946W6YIKc+xwYPS3RmOQgbm5yVhdKvreRSD9qfK6YGKl8k0DSf27ITbc5ozbvrtma/HtIYXHUFZn4yxlLAq26BVWe/sBNg5wcF0g3mywo55w+YtJATa7oMC0yBIhUY/LzxsnINygxx7vkXZkQ+RXgnu0FWDdPjVuPGNJg3EbC70CLqroMEIHzHdOi+ZFiSc5WC2qVr48kw/2TXltI0IxvhT6yv+ehL+qOJy0jh7LnZdvPDRI3PHrY/d3HPt7NfKGY64g5/XYLS+N+AvWHbAOQN5BMiJY4JPvEEWm5BwQSGSNuHZauIgu4JB7xt2EzTRY1ap541nuANtOX0Gw8S7rCLx+5hwhccMgbE4Lum9np6hPXagSRCg8Vk39B/lhhGHbZ","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4557.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024)(3023799003)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?RGJH7Pl3fj5ImUzRPI6ij7SRxkHY?=\n\t=?utf-8?q?iCkFnbIcu0Yw5fA1yodr1yQT7HfCPtv1kMP3njqrmckpjkWlAaBcFXDcZgh1PQIeT?=\n\t=?utf-8?q?Qwvetk9S934QCKOLBi0gv8tAzBrwXeFjojiW3rtUt1bv0UVT9CCGg+Dw3KrrOg/cL?=\n\t=?utf-8?q?1me6/nvoqKsWeQcpp4++xTgDAf3sJLljn/ej9LKQiwScuX1VKVJen0pGvymh9xzL0?=\n\t=?utf-8?q?PBMBAfBKEAgKX3d5X4hGKB8pSOBjBgZxRE8gEY9pZGxfFQMz6ZEe4iUkEA60OGYYk?=\n\t=?utf-8?q?f/RKuGcF1Yakbmd6xEMRlSSJrPPqBDFOp0PBVFz1LfnV9QaP4y5ClNXu+BjPRPGSA?=\n\t=?utf-8?q?M9MAlncYtbbhF7qv/7Qtvyb+GxyLeMhhSRqClCUeGIr3+sCkIUbKmPS+/9ZXHKPyG?=\n\t=?utf-8?q?y3+pRQgeaaaczWt83Tba03IWIpkf/QT5UJOpTNrm+xJviBl7MGvM8FflFMV3Xmnk4?=\n\t=?utf-8?q?nPC8fLqi/mYgLh2y3tZDSMczUDvToowj6ZAHcPM083PjTJiPTy+yWOw+jicuQHQtx?=\n\t=?utf-8?q?RB+RXV5H8YSUsgyifypiBR0mmg1tOkw0bp95FcnJSt3FjGzCOveiBNYCfznINmrKl?=\n\t=?utf-8?q?M27sj0J0Zg7bhCcCdVJz+QtCKT7/C0Vh6xi2RvsT+PfkEJC0+fj5jXrD3FD5OXIoA?=\n\t=?utf-8?q?JZ9NkYvWidyfAONLE0+iZQp6t4Qi7LHwZFdmmGM5b3O4f63IRnz1FC1Qtf0pqYig6?=\n\t=?utf-8?q?241lQOWCl4yirsWRUXjDU40YqOuQwFrQazWdYlAeSxPLI1jTxQ0kmyLWWNOY1K9fQ?=\n\t=?utf-8?q?SPKumKpoLEViMJlnJ8Mrd5+xKJxS2bzksz0gQBmFiRaXv6shFeJgOUGYUPJaiVTd5?=\n\t=?utf-8?q?TkCMOJgFMx6Izoxwl4bvQrqZg664hiHi7zMiiL+xBRCk9Rur7ncUz9Wr9fUOPt4HC?=\n\t=?utf-8?q?0C+41etKv9HEKvgtQ9enCZt3oNQ+BJup9gSXDUcrF4/VDcz5XjlMxUQpzw/JLsqb6?=\n\t=?utf-8?q?erJVGL3vaScKrGxrNc2B0b781pVLf+i1V29ae5Mte0qReBnDwRyG7FtBR9BLRvvqC?=\n\t=?utf-8?q?Vs2Z4D8FYyn3718hTJ//QqLNA3CY0DFbNRoXbIVk9s2mNxMMMD00T2xynjD8idwhw?=\n\t=?utf-8?q?1WPHXYhrZiSrgEi3LbwlstsLvULR2g+N+f8AfSjTfXDd/XFYnYbrAS0Rhk6SFydL6?=\n\t=?utf-8?q?fq4Iw60Qah0IFwDHW2H46+lTtPCUwWeQJ9vR/mWfuH28kYNrmbeYAKUZGNVtwt01y?=\n\t=?utf-8?q?H49Jd6SrWj1oKcYKQ8v1JNmsuaoUf9J70ItHiHTGWKojCUOLIs9zvzCYNgm2ySVVI?=\n\t=?utf-8?q?r/NLTGDi4RxCUa7i0slkGPX3f/4HW4PlAr6namKUc/Q83NxqC6DAqDYEspsXFYeBC?=\n\t=?utf-8?q?zOkDhSSvrW+50VrEWv/uCcFvZUGxh3vP2n88QrQjogdSPLwIR93aKyvKgAXh7XIvq?=\n\t=?utf-8?q?7oYPJiRxgAHWquLv8leElr5XslbcYFFoCFzuKyNu+1PXuRiXzQfs7XZy65ulATH71?=\n\t=?utf-8?q?E5RFbWHxkTWITLd6dMy6jgJ8IMJWb5BCYAaaVhES/b3/O4R5Iw87wdokPcH3rtyO4?=\n\t=?utf-8?q?aBapuRxzfYQBMTcoibD5cD0Ix1XTdd2aqE4M2xZ605mmjfyf960QPLaREkYtydxD3?=\n\t=?utf-8?q?TT75pim7+ilgBOV/c2ayva2EvejrSqJvvwKEqcQ1KiG1p0k/MVBVaRCKSvv34gpJE?=\n\t=?utf-8?q?UDOx0B1itk2eO4FCATgnZffLASHw9aPg=3D=3D?=","X-OriginatorOrg":"amd.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n b7945aae-6b28-402b-e27d-08dead22053b","X-MS-Exchange-CrossTenant-AuthSource":"SA0PR12MB4557.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"08 May 2026 16:51:16.2713\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"3dd8961f-e488-4e60-8e11-a82d994e183d","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n O9W/3CgTJpRm6Iwq6MphHs6I/895RV4elg/IE1t8N1wmBATAKTD1gOfhZle7mAMwqEhS0cpLUJCZyR+20f08AQ==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"CY8PR12MB7490"}},{"id":3688640,"web_url":"http://patchwork.ozlabs.org/comment/3688640/","msgid":"<546ce99d-554a-4d64-a1ff-420e802001a0@icloud.com>","list_archive_url":null,"date":"2026-05-08T17:37:54","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":93350,"url":"http://patchwork.ozlabs.org/api/people/93350/","name":"Jihong Min","email":"hurryman2212@icloud.com"},"content":"> I am sure I understand the reasoning here. What is the problem if it \nis attached\n > to the auxiliary device ? Other drivers do that, so I don't immediate \nsee why\n > that would be a problem here.\n\nI kept the hwmon device parented to the PCI function intentionally \nbecause the\ntemperature value is read from that PCI function's MMIO BAR, and systems may\nhave more than one PROM21 xHCI PCI function.\n\nIf the hwmon device is parented to the auxiliary device, userspace may \nreport it\nas a virtual adapter. Parenting it to the PCI function lets userspace \nidentify\nwhich PCI endpoint each reading belongs to, which is useful on systems with\nmultiple PROM21 xHCI functions.\n\nThe auxiliary driver still owns the hwmon lifetime. Its remove path \nunregisters\nthe hwmon device before the PROM21 xHCI PCI glue tears down the HCD/MMIO\nmapping.\n\n > +#include <linux/math.h>\n >\n > Is this needed ?\n\nYes. It is used for DIV_ROUND_CLOSEST() in the raw-to-millicelsius \nconversion.\n\nThe other review comments have been addressed locally, including \ndropping the\nextra mutex, removing the unnecessary channel checks, passing the MMIO \nresource\nthrough platform data instead of looking at the parent's driver data, \nremoving\nthe redundant hwmon ABI wording from the documentation, and the small style\ncleanups.\n\nFollowing Mario's advice from the v3 discussion, I will wait for the current\nreview discussion to settle before sending v5. I am keeping the current\nwork-in-progress branch here for reference only:\n\n   https://github.com/hurryman2212/linux/tree/prom21_hwmon\n\nSincerely,\nJihong Min","headers":{"Return-Path":"\n <linux-pci+bounces-54271-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=icloud.com header.i=@icloud.com header.a=rsa-sha256\n header.s=1a1hai header.b=zW8G0XVJ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54271-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=\"zW8G0XVJ\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=57.103.77.221","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=icloud.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBxDy6QfFz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 03:38:58 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id EBC8C303D300\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 17:38:08 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D6834410D2D;\n\tFri,  8 May 2026 17:38:07 +0000 (UTC)","from outbound.st.icloud.com\n (p-east2-cluster3-host1-snip4-10.eps.apple.com [57.103.77.221])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B55A410D24\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 17:38:06 +0000 (UTC)","from outbound.st.icloud.com (unknown [127.0.0.2])\n\tby p00-icloudmta-asmtp-us-east-1a-60-percent-3 (Postfix) with ESMTPS id\n 630251800644;\n\tFri, 08 May 2026 17:38:01 +0000 (UTC)","from [192.168.89.2] (unknown [17.42.251.67])\n\tby p00-icloudmta-asmtp-us-east-1a-60-percent-3 (Postfix) with ESMTPSA id\n 7BCDD180161F;\n\tFri, 08 May 2026 17:37:57 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778261887; cv=none;\n b=iqVwlELYG0Jz8GHXepdXOMBAUcMusAqUxBhKjr843W/47gn69p0+4K/YfDz/8DVQYwp8PCuMAh21/Jq2S9mlyyRNsXugsXnDm1pBifkV1UTjMjQ5O6lvDd03mhcD4LSGUaAlUByBupu3xT+AFmMXbRCksM5pClzVzvIzWfmcOjI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778261887; c=relaxed/simple;\n\tbh=94R/QwsybbBzR1ekCC85MN/MnNhExX89pnlxdPMUFIQ=;\n\th=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:\n\t In-Reply-To:Content-Type;\n b=CNv3XTqS2Qh0z4OexdLLtGKo1bfMnXn+rWH8HAP7KpgxIT3AhHJXIvSKdZg6iQ8dNSq7aQjAu8DksY8jGyhmfytzxW4lAtGoBGajG9ge/iTAEKhLOI/mSCoaL9IinV3Q1qU5P76hoYWJijB1hkk4+4oG0adsbn4VEisQZwEmB6E=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com;\n spf=pass smtp.mailfrom=icloud.com;\n dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=zW8G0XVJ; arc=none smtp.client-ip=57.103.77.221","X-ICL-Out-Info":"\n HUtFAUMEWwJACUgBTUQeDx5WFlZNRAJCTQhJBkMDRQVJF0wBTVIPDxhMCkEUWgpcQgtJAS1eCF4fTBwdDlgGEhZdRVsYRRlLHVgWAV8GWXIZWhRcGFNFUR9UWEEOCloBUFEdXwIKBEcEWxdGA1NFQQQXEVABWB5WXloXXk1HH0BNYkkBWhlbHEAXSm5NUw8PGVoUXBhTRVEfVFheBFNWDkUNTlAIDlJWXQxNBwwaX1ZGDVVSXFENH0QLSFZVB1kCQAgZAy1eCF4fTBwdDlgGDFBNAUMICgJRHFYNVw==","Dkim-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai;\n t=1778261885; x=1780853885; bh=2Gaxvl/4GCmdXsxMSVsMtj2eUIHFRsgIyPlEsCEOxsM=;\n h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:x-icloud-hme;\n b=zW8G0XVJbCf/FlLxdOUv/OED4zzYr0FEw2Tat38Oqq3QPQHVctYCFi2BQuyMFV/raoouTsKb7EnADK/GzrHJm7uHeMzoUNk3Cw6ZAyZNHCfOmjl67iD8sNlAujrfW4fBWDSP5OomfZkoc4wasqUbLahbwoLR6aLWk7CA5XyvRVSpQnYqVo0qBpkCnSaXmp3vszZ2kz5cNkXXpIKZsYKU5FBe83SyrvWT7DDrf1Svqw0LBDJrB18M14lr49rOJxVWJaTkGuX+F+/SsqjdcWaZYlYTEQR+b7U7YXr9gT3V6EZ8J03yK0QxxR/jfmVw8fiWZNK6udcEsmV49YRRzXYYFw==","Message-ID":"<546ce99d-554a-4d64-a1ff-420e802001a0@icloud.com>","Date":"Sat, 9 May 2026 02:37:54 +0900","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","To":"Guenter Roeck <linux@roeck-us.net>, Jihong Min <hurryman2212@gmail.com>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n Mathias Nyman <mathias.nyman@intel.com>","Cc":"Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>,\n Mario Limonciello <mario.limonciello@amd.com>,\n Basavaraj Natikar <Basavaraj.Natikar@amd.com>, linux-usb@vger.kernel.org,\n linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,\n linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org","References":"<20260508143910.14673-1-hurryman2212@gmail.com>\n <20260508143910.14673-3-hurryman2212@gmail.com>\n <0269bf45-316b-4ba5-af0e-312f6c2bebdd@roeck-us.net>","Content-Language":"en-US","From":"Jihong Min <hurryman2212@icloud.com>","In-Reply-To":"<0269bf45-316b-4ba5-af0e-312f6c2bebdd@roeck-us.net>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-Proofpoint-GUID":"rD_QwU-zS2IxD-YnjQpZCyhF2T3lsYc4","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTA4MDE3NiBTYWx0ZWRfX4ZkxS6YcZIaj\n O8O7cCFtCe8MOO/Wnq9S2NzTa/f7GEFsorYF0tthmi8aqRK5gjhPb/FytGKQJdgbddzRGXui/A6\n 5DvuOTKSxubRxJ7imzJMQI7XttUwh6VwQ5ReFG914t5P5GYDeCtO+QlT1/KOtR7ifVmk59w29El\n B9E7UYRbI3zpGEYTOl3rW7DLzaFnJgcSKkywkjCm6XrPo/2J4L67fCujHdkS+4pyrEMlkrtGoFn\n K2uPGoQK36tuuCw89w3J/Qb5yHx7rkaCZYL/7JBMrw1xKoL+eFa8KpL1J7tuxkvcFt4fGeq9CfT\n HuIvpRPj/SVEylgqHs5GJaY7qSWJsOBB0mYtOjQ8owJV8/I8zBVlMSbtZpy6Yo=","X-Proofpoint-ORIG-GUID":"rD_QwU-zS2IxD-YnjQpZCyhF2T3lsYc4","X-Authority-Info-Out":"v=2.4 cv=P7E3RyAu c=1 sm=1 tr=0 ts=69fe1f7b\n cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117\n a=YrL12D//S6tul8v/L+6tKg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10\n a=x7bEGLp0ZPQA:10 a=5jDBv52wX64A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=NEAV23lmAAAA:8 a=k_rWY7h1Oc5qVOcB2M4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=PgRulw5oR9JgysbTFEid:22 a=MienORt8HT0FiJ1vGQZ6:22"}},{"id":3688646,"web_url":"http://patchwork.ozlabs.org/comment/3688646/","msgid":"<021e9b61-46f9-4429-85be-242bb12e70a4@icloud.com>","list_archive_url":null,"date":"2026-05-08T17:40:24","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":93350,"url":"http://patchwork.ozlabs.org/api/people/93350/","name":"Jihong Min","email":"hurryman2212@icloud.com"},"content":"> Rather than using pm_ref as an output variable to indicate whether you\n > took a ref - how about you instead always take a ref on success and\n > return an error on fail? This would feel more logical to me.\n\nAgreed. I changed the PM helper so success always means that a usage \nreference\nis held, and the caller now unconditionally drops it with \npm_runtime_put_noidle()\nafter the register access.\n\nFor the runtime PM disabled case, pm_runtime_get_if_active() returns \n-EINVAL.\nIn that case the helper now allows the read if the device is not marked\nsuspended, and uses pm_runtime_get_noresume() so the same success/put \ncontract\nis preserved without changing the runtime PM state.\n\n > guard(mutex) perhaps?\n\nThe private mutex is gone. Guenter pointed out that the hwmon core already\nserializes the callbacks, so I removed the extra lock instead of \nconverting it.\n\n > You only care about the first byte, right? Just use readb() and make\n > data a u8.\n\nDone. The data register read now uses readb(), and the local data \nvariable is\nu8.\n\n > I personally don't really like changing the pointer when there is\n > potentially an error case with it for -ENODATA.\n\nDone. The raw output pointer is only written after validating the read \nvalue.\n\n > Does 0xff actually happen with your runtime PM handling? Between my\n > suggestion above to use readb() this can turn into:\n >\n > if (!data)\n > return -ENODDATA;\n > *raw = data;\n >\n > return 0;\n\nDone. I removed the 0xff invalid check. Suspended devices are rejected \nbefore\nthe MMIO access, so the read path now only treats zero as invalid and \nassigns\n*raw after that check.\n\nSincerely,\nJihong Min","headers":{"Return-Path":"\n <linux-pci+bounces-54273-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=icloud.com header.i=@icloud.com header.a=rsa-sha256\n header.s=1a1hai header.b=cUPNlmbY;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54273-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=\"cUPNlmbY\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=57.103.76.241","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=icloud.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBxNf08n2z1yKd\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 03:45:38 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id BCAFB30CB289\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 17:40:37 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0D11D41B34A;\n\tFri,  8 May 2026 17:40:35 +0000 (UTC)","from outbound.st.icloud.com\n (p-east2-cluster6-host11-snip4-10.eps.apple.com [57.103.76.241])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 6002541322D\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 17:40:33 +0000 (UTC)","from outbound.st.icloud.com (unknown [127.0.0.2])\n\tby p00-icloudmta-asmtp-us-east-1a-100-percent-0 (Postfix) with ESMTPS id\n EC04B18000A4;\n\tFri, 08 May 2026 17:40:29 +0000 (UTC)","from [192.168.89.2] (unknown [17.42.251.67])\n\tby p00-icloudmta-asmtp-us-east-1a-100-percent-0 (Postfix) with ESMTPSA id\n 85F7C1800160;\n\tFri, 08 May 2026 17:40:26 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778262034; cv=none;\n b=LKeltXbiKarUgKPIvpu8oWwi48GsYQiOBEbtB3urTKJOxyDzzZmlz7EgZbI56e0bG6qmotZxnp4j6NYpCa9385kVaeBwk3spNVxXu9Pas/sUX7nS7KVKYD9rj6x52NeW57l4i6il6stSPZ+lGV87IJrYLmWMdiuzSYGAYTT+wHA=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778262034; c=relaxed/simple;\n\tbh=sSo0MgVGHg6sujfoidXV1jooMx78c4nS2ln4QJ43EFY=;\n\th=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:\n\t In-Reply-To:Content-Type;\n b=dUCmyuPnsZwjcUC3S8c6vTogMgQbbJt9zJbpq+AbaMba9mbmm6weE405YMw0V3bKt4Pp7hhv1FSwhRrZ4iNGQkI0pPSC997vJv0S6E1btCIJqPrRznJf9CQIY8zf5/V0t1FjOJ7S9kXT1BQJYwRAPbjJTIOTuCfsWvg5ObMVXXo=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com;\n spf=pass smtp.mailfrom=icloud.com;\n dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=cUPNlmbY; arc=none smtp.client-ip=57.103.76.241","X-ICL-Out-Info":"\n HUtFAUMEWwJACUgBTUQeDx5WFlZNRAJCTQhJBkMDRQVJF0wBTVIPDxhMCkEUWgpcQgtJAS1eCF4fTBwdDlgGEhZdRVsYRRlLHVgWAV8GWXIZWhRcGFNFUR9UWEEOCloBUFEdXwIKBEcEWxdGA1NFQQQXEVABWB5WXloXXk1HH0BNYkkBWhlbHEAXSm5NUw8PGVoUXBhTRVEfVFheBFNWDkALSVZUVV0DXQ1OVVQaXwZCAFULWFUOH0INSlEPBllXRwkZBy1eCF4fTBwdDlgGDFBNAUMICgJRHFYNVw==","Dkim-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai;\n t=1778262032; x=1780854032; bh=rvYX763umxFx0VQGORIEx96cyb4wpDHfqn79Q5PBAww=;\n h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:x-icloud-hme;\n b=cUPNlmbYeZBDFc/K5kAjYI4Wv0ESfEheN/XfFsb2XNAZfLMmpiB4WoDxuqt4hB/X/DJ+Ehc8zu5yW32xA8H0YkPsj8wvGJUofRGWbMLP8RDpz+I/Vq6ZJ2Uf4AsHO+Kt1TvwQ4gwCK/FBI1DlMX0vg8l1tL9wep/tktqMoDXTXBqQh8stULJ/uslWqmtwhek5GrvcBtmlLSxJXJLtqY9+YQ7kwtwnUD/BwJr0VGLM5RRWf6YMix4CAchIZlcggjlPtIb/KIses1vvUkNWVkmbQlIyAE1k7leL0mxyezgUziSQgKv0Spd/2JSjAtap+aeLrSa5cHwUCaXH2jf6uB3BQ==","Message-ID":"<021e9b61-46f9-4429-85be-242bb12e70a4@icloud.com>","Date":"Sat, 9 May 2026 02:40:24 +0900","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","To":"Mario Limonciello <mario.limonciello@amd.com>,\n Jihong Min <hurryman2212@gmail.com>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n Mathias Nyman <mathias.nyman@intel.com>","Cc":"Guenter Roeck <linux@roeck-us.net>, Jonathan Corbet <corbet@lwn.net>,\n Shuah Khan <skhan@linuxfoundation.org>,\n Basavaraj Natikar <Basavaraj.Natikar@amd.com>, linux-usb@vger.kernel.org,\n linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,\n linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org","References":"<20260508143910.14673-1-hurryman2212@gmail.com>\n <20260508143910.14673-3-hurryman2212@gmail.com>\n <f682afbb-e816-44e6-9b18-fc7e2335706e@amd.com>","Content-Language":"en-US","From":"Jihong Min <hurryman2212@icloud.com>","In-Reply-To":"<f682afbb-e816-44e6-9b18-fc7e2335706e@amd.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-Proofpoint-GUID":"V8RT7b5aKlJS5F51g1NUi2RoLo6NL3GJ","X-Proofpoint-ORIG-GUID":"V8RT7b5aKlJS5F51g1NUi2RoLo6NL3GJ","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTA4MDE3NiBTYWx0ZWRfX/0IR7APOao5Z\n 03VK+LlSf2TKM9ABzANrbGECkxe+B6bNyviWRL6z/vTv0grPRvI2dEGsZ35QUdxvB9MaBefEpaI\n WQL9otpbJ5zlA045T7MoOmzG9/KuFPs1yrllv21WDUOYFVSxyBY0euek4+kKRknNVti+InTVCnt\n GiE2dVjnWiUovKTyUdukdPjHS/f+5AR4knPpKCoulnVU9HTzvgmd7+swKFemdNQ52IUdKDTEvsy\n Rg97E7Y24Ftpi3Z+oHsD/zmoieki67N3VgMvoSDmBWv5q7jw8+R6noiPzP2HqkzMjLPHFip8pST\n p8WhPQbW+2hswYcgvzNGNwBfT6xcicpJr4NUMYH4rGZjTVtaNCf5Xk4EnUU/0c=","X-Authority-Info-Out":"v=2.4 cv=OZeVzxTY c=1 sm=1 tr=0 ts=69fe200f\n cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117\n a=YrL12D//S6tul8v/L+6tKg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10\n a=x7bEGLp0ZPQA:10 a=5jDBv52wX64A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=-FalU_6Lp0SrYWVKIWsA:9 a=QEXdDO2ut3YA:10 a=PgRulw5oR9JgysbTFEid:22\n a=MienORt8HT0FiJ1vGQZ6:22"}},{"id":3688744,"web_url":"http://patchwork.ozlabs.org/comment/3688744/","msgid":"<20260508215247.71919C2BCB0@smtp.kernel.org>","list_archive_url":null,"date":"2026-05-08T21:52:46","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":93311,"url":"http://patchwork.ozlabs.org/api/people/93311/","name":null,"email":"sashiko-bot@kernel.org"},"content":"Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:\n- [High] Using pm_runtime_put_noidle() can permanently prevent the PCI device from runtime-suspending.\n- [Low] The local hwmon->lock mutex is redundant and violates the hwmon subsystem locking architecture.\n--\n\ncommit 62e33fab546f8b14b0cd80683aa504672db60e64\nAuthor: Jihong Min <hurryman2212@gmail.com>\n\nhwmon: add AMD Promontory 21 xHCI temperature sensor support\n\nThis commit adds an auxiliary-bus hwmon driver to expose the temperature\nsensor on AMD Promontory 21 xHCI controllers. It reads the sensor value\nthrough a vendor-specific index/data register pair in the PCI MMIO BAR.\n\n> diff --git a/drivers/hwmon/prom21-xhci.c b/drivers/hwmon/prom21-xhci.c\n> new file mode 100644\n> index 0000000000000..f91303ce3428d\n> --- /dev/null\n> +++ b/drivers/hwmon/prom21-xhci.c\n> @@ -0,0 +1,250 @@\n\n[ ... ]\n\n> +static int prom21_xhci_read_temp_raw_restore_index(struct prom21_xhci *hwmon,\n> +\t\t\t\t\t\t   u8 *raw)\n> +{\n> +\tstruct device *dev = &hwmon->pdev->dev;\n> +\tbool pm_ref;\n> +\tu32 index;\n> +\tu32 data;\n> +\tint ret;\n> +\n> +\tret = prom21_xhci_pm_get(hwmon, &pm_ref);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\tmutex_lock(&hwmon->lock);\n\nIs this private mutex redundant here?\n\nAccording to the hardware monitoring subsystem guidelines, the hwmon core\nautomatically serializes sysfs operations for attributes registered via the\ninfo parameter of hwmon_device_register_with_info().\n\nSince this driver registers its only attribute (temp1_input) via the info\nparameter and does not access the hardware from interrupt handlers or other\nasynchronous paths, does it need its own serialization?\n\n> +\tindex = readl(hwmon->regs + PROM21_INDEX);\n> +\t/* Select the PROM21 temperature register through the vendor index. */\n> +\twritel(PROM21_TEMP_REG, hwmon->regs + PROM21_INDEX);\n> +\tdata = readl(hwmon->regs + PROM21_DATA);\n> +\t/* Restore the previous vendor index register value. */\n> +\twritel(index, hwmon->regs + PROM21_INDEX);\n> +\treadl(hwmon->regs + PROM21_INDEX);\n> +\tmutex_unlock(&hwmon->lock);\n> +\n> +\tif (pm_ref) {\n> +\t\t/*\n> +\t\t * Drop only the reference taken by pm_runtime_get_if_active().\n> +\t\t * Do not mark the device busy or schedule autosuspend from the\n> +\t\t * hwmon path; sensor polling must not keep the xHCI PCI device\n> +\t\t * active.\n> +\t\t */\n> +\t\tpm_runtime_put_noidle(dev);\n\nCan using pm_runtime_put_noidle() permanently prevent the PCI device from\nruntime-suspending?\n\nIf the xHCI driver drops its own runtime PM reference concurrently (e.g., via\npm_runtime_put_autosuspend()), the PM core's idle check sees usage_count > 0,\nreturns -EAGAIN, and skips scheduling the autosuspend timer.\n\nThis code then calls pm_runtime_put_noidle(), which decrements usage_count\nto 0 but intentionally bypasses queueing an idle check or notifying the PM\ncore.\n\nCould this leave the xHCI controller permanently in the RPM_ACTIVE state with\na usage_count of 0 and no pending autosuspend timer until the next PM state\nchange?\n\nTo safely drop the reference without resetting the autosuspend timer, should\nthis use pm_runtime_put() instead, which properly queues an asynchronous\nidle check?\n\n> +\t}\n> +\n> +\t*raw = data & 0xff;\n> +\tif (!*raw || *raw == 0xff)\n> +\t\treturn -ENODATA;\n> +\n> +\treturn 0;\n> +}","headers":{"Return-Path":"\n <linux-pci+bounces-54295-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DGkJLYQp;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54295-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"DGkJLYQp\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gC2sv59bXz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 07:52:51 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 6BBB2301A707\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 21:52:49 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 31600312803;\n\tFri,  8 May 2026 21:52:48 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DEBE2E762C;\n\tFri,  8 May 2026 21:52:47 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 71919C2BCB0;\n\tFri,  8 May 2026 21:52:47 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778277168; cv=none;\n b=FICMSPAov9iXUUK3WY8Nfme6f8IDDqfidEQmTsfIi+flaA8p8lUr/ZT27xHUzwzuBvuOfKWHNXPRk7edxTX79WVzox44BsjYlEHvq58+WFfnaytQwixRacjosY2Cdk8Fh+gt6hNhiXsxzNQpEX8e8JR9pA8403m46vQgYnCdVP8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778277168; c=relaxed/simple;\n\tbh=2ft7ENV4Q+1UIVHLV+1ZilABTSDxqlSv/DzDkwMcbWM=;\n\th=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date:\n\t Message-Id;\n b=V6A0qT7628UUhwpEZz6hoU5+mg04dINbz5LVR1I/jBL/DCudpsdWvRmcTWcG+wAxl71ImfTo34IP+f8te10a6ZNIQFZtAP4oTR7VT0EHdRFW38g7ft1Zpz86m8I+pRKomJttsWNesFaby+JIK6YCBYXRrT3wOE2hpuqkJPPlE7g=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=DGkJLYQp; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1778277167;\n\tbh=2ft7ENV4Q+1UIVHLV+1ZilABTSDxqlSv/DzDkwMcbWM=;\n\th=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date:From;\n\tb=DGkJLYQps+6b5pT9X0x+i5jagWGJu1wvR6rjNFIFhuZNLZ6/9yiQgQY3C+MF3R/D2\n\t rsJvYwDPIYk4qiY2Fc0MZFcv2w5sb2QtW7LgToQGABm7mzmKDUUe6eJ2yQkvkzvENb\n\t wijjnJQw9AH6M+rhqjyIruoUjYA64ZQiNbuwpKHGt3hv5KMIgou9kO/MKntgIf4ejo\n\t vZ3zphcLVusDm65+ZtA/GI2/DUr2fMH/E2SKRBXsiSffVWuwv0PyhwN5BI/At56uya\n\t WTmCvf8ucBZa85Cf2pd3wvssa0884U/b9jQxT4LuqpjcETBvKDm5O3HMYCUpDoqoAe\n\t vF6SHIkTYTgVw==","From":"sashiko-bot@kernel.org","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","Reply-To":"sashiko@lists.linux.dev","To":"\"Jihong Min\" <hurryman2212@gmail.com>","Cc":"linux-hwmon@vger.kernel.org, linux-pci@vger.kernel.org","In-Reply-To":"<20260508143910.14673-3-hurryman2212@gmail.com>","References":"<20260508143910.14673-3-hurryman2212@gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Date":"Fri, 08 May 2026 21:52:46 +0000","Message-Id":"<20260508215247.71919C2BCB0@smtp.kernel.org>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>"}},{"id":3688808,"web_url":"http://patchwork.ozlabs.org/comment/3688808/","msgid":"<b3a2630f-8c31-4c18-b601-42f773019f22@icloud.com>","list_archive_url":null,"date":"2026-05-09T05:18:00","subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","submitter":{"id":93350,"url":"http://patchwork.ozlabs.org/api/people/93350/","name":"Jihong Min","email":"hurryman2212@icloud.com"},"content":"On 5/9/26 06:52, sashiko-bot@kernel.org wrote:\n > Thank you for your contribution! Sashiko AI review found 2 potential \nissue(s) to consider:\n > - [High] Using pm_runtime_put_noidle() can permanently prevent the \nPCI device from runtime-suspending.\n > - [Low] The local hwmon->lock mutex is redundant and violates the \nhwmon subsystem locking architecture.\n > --\n\nBoth points make sense.\n\n > Is this private mutex redundant here?\n >\n > According to the hardware monitoring subsystem guidelines, the hwmon core\n > automatically serializes sysfs operations for attributes registered \nvia the\n > info parameter of hwmon_device_register_with_info().\n >\n > Since this driver registers its only attribute (temp1_input) via the info\n > parameter and does not access the hardware from interrupt handlers or \nother\n > asynchronous paths, does it need its own serialization?\n\nThis was already removed locally after Guenter's review. The driver now \nrelies\non hwmon core serialization for its own callbacks.\n\nI also updated the comment around the PROM21 vendor index/data access to \navoid\nimplying that the driver can synchronize with firmware, SMM, ACPI, or other\npossible users outside this driver.\n\n > Can using pm_runtime_put_noidle() permanently prevent the PCI device from\n > runtime-suspending?\n >\n > If the xHCI driver drops its own runtime PM reference concurrently \n(e.g., via\n > pm_runtime_put_autosuspend()), the PM core's idle check sees \nusage_count > 0,\n > returns -EAGAIN, and skips scheduling the autosuspend timer.\n >\n > This code then calls pm_runtime_put_noidle(), which decrements \nusage_count\n > to 0 but intentionally bypasses queueing an idle check or notifying \nthe PM\n > core.\n >\n > Could this leave the xHCI controller permanently in the RPM_ACTIVE \nstate with\n > a usage_count of 0 and no pending autosuspend timer until the next PM \nstate\n > change?\n\nYes, that is a good point. I changed the successful read path to use\npm_runtime_put() instead.\n\nThe driver still does not runtime-resume the parent device for a hwmon read:\nit only reads when pm_runtime_get_if_active() succeeds. But after a \nsuccessful\nread, pm_runtime_put() lets the PM core re-evaluate the idle state after the\nactive-only runtime PM reference is dropped.\n\nI also updated the runtime PM documentation accordingly.\n\n > To safely drop the reference without resetting the autosuspend timer, \nshould\n > this use pm_runtime_put() instead, which properly queues an asynchronous\n > idle check?\n\nYes. That is what I changed locally.\n\nThese changes are already in my v5 work-in-progress branch:\n\n   https://github.com/hurryman2212/linux/tree/prom21_hwmon\n\nFollowing Mario's advice, I will defer posting v5 to the mailing list \nfor a few\ndays while waiting for more review feedback and doing additional \nself-review.\n\nSincerely,\nJihong Min","headers":{"Return-Path":"\n <linux-pci+bounces-54310-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=icloud.com header.i=@icloud.com header.a=rsa-sha256\n header.s=1a1hai header.b=WY/42eqm;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54310-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=\"WY/42eqm\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=57.103.77.234","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=icloud.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gCDll5Xy4z1yK7\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 15:18:11 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 97B203011776\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  9 May 2026 05:18:07 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B43C7346AC3;\n\tSat,  9 May 2026 05:18:06 +0000 (UTC)","from outbound.st.icloud.com\n (p-east2-cluster3-host7-snip4-3.eps.apple.com [57.103.77.234])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 51E4630BF52\n\tfor <linux-pci@vger.kernel.org>; Sat,  9 May 2026 05:18:05 +0000 (UTC)","from outbound.st.icloud.com (unknown [127.0.0.2])\n\tby p00-icloudmta-asmtp-us-east-1a-60-percent-3 (Postfix) with ESMTPS id\n CF9D718000BE;\n\tSat, 09 May 2026 05:18:03 +0000 (UTC)","from [192.168.89.2] (unknown [17.42.251.67])\n\tby p00-icloudmta-asmtp-us-east-1a-60-percent-3 (Postfix) with ESMTPSA id\n 8FF1C18000A9;\n\tSat, 09 May 2026 05:18:02 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778303886; cv=none;\n b=SXcNUBV/FYlCDvy6qhB10UKYjL16ThCAtdgbgDbO5uMoWm6DEW66QbQJoPIf7f5Z2cUHS5LSYLMTS0w5MIqo0bc3QOH7p2hw1O/hNzgsNkzabdkxvlwUNRnB3iGVlYbm5mTWp2EwrwYxoLZil6hP2D0RyH0chG0M1fq7fgoL7x8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778303886; c=relaxed/simple;\n\tbh=6MHd+G+4Sv+dIZu7YjDRe+Q8et0I2nPcdBJ7MVza2QI=;\n\th=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:\n\t In-Reply-To:Content-Type;\n b=m4G1I1C4hFIKO9RlF4f/JETyKLIR2MVyuklm0p5MrMwDHOpfyIghNUdhr7K98JxLwTI93x78cvikPl83xejUPjFV/uxYYclL1AVhZoJVg7XTH0OU5TsAMM38MM8oVWRX2zkpKopwHJoWGa9IGxv5hSnatLqhjct/8Ig8Bx+o3pc=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=icloud.com;\n spf=pass smtp.mailfrom=icloud.com;\n dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com\n header.b=WY/42eqm; arc=none smtp.client-ip=57.103.77.234","X-ICL-Out-Info":"\n HUtFAUMEWwJACUgBTUQeDx5WFlZNRAJCTQhJBkMDRQVJF0wBTVIPDxhMCkEUWgpcQgtJAS1eCF4fTBwdDlgGEhZdRVsYRRlLHVgWAV8GWXIZWhRcGFNFUR9UWEEOCl8SGFwUXFBYHkYSVg1dCRkYRl5QG18CQg8cE1YVEx1DGQ8rCEoEQwdFAl4LJRMJU1ZbE1UXRgkZCF0dGRVaCQpXUENYSgVeBw0fSFpLAkADCANIFBoFXQZGBkJfTwReB1oLFgtKcwRUB10FXVZQAlpVEgRACFZQXgheH0wc","Dkim-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai;\n t=1778303884; x=1780895884; bh=yh0kkrR/sxJmwo/ItgwwffqWRbcFRElHpVkCqlz99R4=;\n h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:x-icloud-hme;\n b=WY/42eqmJwYxhc6Bq5Xj7Tf2xQLG0pBXlS7Y7Kd7SsN1eP92n57/6i4RIii9K1kevKpFP4YyRfb4UBj+zqfPxgFPVndbu/CjaXPP5UX+VpZH64O+rzdk4e/Ad+GpXuHVC7o1Lmg3xEc2zRtGhlMPmOXiQyUaxxxxZFfTrmhObc0uDAQ/Gc2+qHGKmLv2a9zpGayB5zphCWEy6jaOqfyPbbQnwP8GrvVE59tnGPJVA8rRtok+0kXZG79iCweocr27EkDH56Y87vaBwuF+9Jo8bxzjsZmgBC1JAohLKqa98mqKbxtBGABhyLWLF03eysgahfIyuQQsKH9NVstnDqUNkw==","Message-ID":"<b3a2630f-8c31-4c18-b601-42f773019f22@icloud.com>","Date":"Sat, 9 May 2026 14:18:00 +0900","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/2] hwmon: add AMD Promontory 21 xHCI temperature\n sensor support","To":"sashiko@lists.linux.dev, Jihong Min <hurryman2212@gmail.com>","Cc":"linux-hwmon@vger.kernel.org, linux-pci@vger.kernel.org","References":"<20260508143910.14673-3-hurryman2212@gmail.com>\n <20260508215247.71919C2BCB0@smtp.kernel.org>","Content-Language":"en-US","From":"Jihong Min <hurryman2212@icloud.com>","In-Reply-To":"<20260508215247.71919C2BCB0@smtp.kernel.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTA5MDA1MiBTYWx0ZWRfX2teZg+UR3yHU\n acbFn6+hlzg7sFXIkftD1OAgj+TweOq4IwFjIPBMhh9OJMrzS7CzYOZgmGlrvj6fp5u64ARB9mM\n CIN/KQusZQ20Lf3SYW8KjgAfWwt/jnXD8Y4IZ4ckj73qseY7hTVerSgxsJqM1djD2uJ1iprvU+y\n 9ZIlb/KcNjkC4H9GT/N6VnX0UAltI6sJTg88Gv4L2Sul4isz9mkqRuESjnjHmrMhaHCp4OC2YBr\n vd36Q8sOOlDVpfSd7tOCgJtzJxCaABJDz71oMxGLz52IIDI57BgPTYL0jdEBb1jCSlREy7tpuej\n qjFLP382XbhtgQMnRM2LjGAiSrGMW15Pb/7W7/j6ZFFGNpRwB+3FMKbc0tVjcU=","X-Proofpoint-GUID":"8OSLBH1OucZO_RqaNH4OZhIaOtmWyrXM","X-Proofpoint-ORIG-GUID":"8OSLBH1OucZO_RqaNH4OZhIaOtmWyrXM","X-Authority-Info-Out":"v=2.4 cv=b5y/I9Gx c=1 sm=1 tr=0 ts=69fec38b\n cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117\n a=YrL12D//S6tul8v/L+6tKg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10\n a=x7bEGLp0ZPQA:10 a=5jDBv52wX64A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=IKN3xXhxJM_QOBnC98AA:9 a=3ZKOabzyN94A:10\n a=QEXdDO2ut3YA:10 a=PgRulw5oR9JgysbTFEid:22 a=MienORt8HT0FiJ1vGQZ6:22"}}]