Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp722073ybl; Sat, 18 Jan 2020 09:27:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyBHnp1hpBOHutHbRooWwiCJqijcBhd/vjRGXAP9PekBtj839imWX90B0EpyqPXwHDIa25q X-Received: by 2002:a05:6808:a11:: with SMTP id n17mr7509287oij.94.1579368451073; Sat, 18 Jan 2020 09:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579368451; cv=none; d=google.com; s=arc-20160816; b=DWycB0BOYQv53OTqsiRy6qM22VUBQDg+3aO6QunvFHM+5nPjRpPZpoQkc52s2RB+SH JoTB9goOu6IVflYERmg6179taKJX2WQjNpffpj+89CSq3iauHahXVZaAXbuKPH4tgK/x zVAAkTdqYm0l3+2TEkZ02N7nSq/puIRT8rp1DYwdZBNByNRD6uIt6wEAUXVcFnFlPTzZ Hgc/2W7nBKhIqkzCW5GOX/f77fFDYXjGzz+nZ4lfCorjtRDPMbIkLciujvKFspP3cul7 st1Iigf2hrZgpjLzVWoy7EyT6nSv1+Yk5lIWxfJSMvudVlnJiLn6E2uQnOEtYh5AfoUM BqEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Pcd9IeGcNNBUcKOyRHFaGz/TtdBvNMJdJIjUqyVupNo=; b=z/QaUzHtKQ9LERErN4uUxQ0ZDdIvgiotzEe4x/KmbmTXaH2a8vrbsWl6+r2Vvw2pA6 z29D5LPlE9l35qKy1NWdGjsZQYtBK+OgPDKxNrWRrFlzEYxx2JjqzciPz6G6ygxjXldw CyYOppNn6W6t0K0Mp9HionXbJvt4IoJ+RfKfSR4w/7+TjZNa+wZ9wW9T1723qqBlb5a4 CwyFJXvRxFKmqBQ9DP2ZLvO/uC09c87rHXVIOvC9Hg4DfpFk/KWTIXLBPkayoeVkybBv Y8SE5w+4q2jIk7zZ9gNaqOvGXnKtogf0lvd4hQaZ6TS/H1Xz4xHEm3eR7uGsgqpHGa23 FPRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NY5M4FvR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si17808859oti.249.2020.01.18.09.27.18; Sat, 18 Jan 2020 09:27:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NY5M4FvR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbgARR0Y (ORCPT + 99 others); Sat, 18 Jan 2020 12:26:24 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:44135 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbgARR0X (ORCPT ); Sat, 18 Jan 2020 12:26:23 -0500 Received: by mail-yw1-f66.google.com with SMTP id t141so15886319ywc.11; Sat, 18 Jan 2020 09:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Pcd9IeGcNNBUcKOyRHFaGz/TtdBvNMJdJIjUqyVupNo=; b=NY5M4FvRmv20Vy+SjbHj5Th/m03s56uHs5rHahfdmdaQymV0UqOGwYj62Rn/ApmDB3 hDKuDAZ1tRGCfjpNlSGTrcCn2cf1aGst9RDvwORGHKpaV/BkG9uAQcqqOs9nK9F4P7OT L3tDLkJwmVidDl96suDMTer28Y66h0V5E+OI/W8/nLhy57vD0rx9uWtJrPKORJq+z1xb +OV2uzpWEi3hOXsBbm9UBaxa07xu4WsxpUiF/UBSUL9qe3SHa9CgkVLH5LaLuy8thaEZ R0Mf/XAhOSlN3zkk0/tKli944AtRbai8SM4JS/BlyYxwbsUSSKq1gaJ+IDrtSaQzm8pA mEOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Pcd9IeGcNNBUcKOyRHFaGz/TtdBvNMJdJIjUqyVupNo=; b=YsmRxB6MsXsjzmnDdOJhIn7qPy6bJgq1rZdUp6f8Y6wRT0wQ+gBc+I+8gQ5cPO3YrC /JM6xaM3XMYcVX+RpHsSlRngtcG96uQv5ytSkeWO8A/JrGgnFmqW+BqyzsTkO0+95qdd 8FaYPat6C2i/3vOM20QmQi1HBQo4E+hW8FPtoa3MY0juDvsjjV2mgge6f3h94iopVw9z XZ9J47DTtU5lElgt3H5kDOcOh4YtbwDIE23tcfZDVJphKw7tcYTbG+xlz9Xi1ZePAhfU MBCMX6acm/AwycxFeDsfORnWNl34YCnUDhALKU6gdJN8QqgfA9tKaASDDfzI8I+dbjss i+zA== X-Gm-Message-State: APjAAAX6uIVoiO+8RanHf+rHmcKfkuCeBryCuqYPPBVhu+wz4rCMqDUA QnEHLH5PEmrKfKhJNvmiWRSQDVBR X-Received: by 2002:a81:6f07:: with SMTP id k7mr36934728ywc.395.1579368382762; Sat, 18 Jan 2020 09:26:22 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id x84sm12867190ywg.47.2020.01.18.09.26.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Jan 2020 09:26:22 -0800 (PST) From: Guenter Roeck To: linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Clemens Ladisch , Jean Delvare , Darren Salt , Bernhard Gebetsberger , Ken Moffat , =?UTF-8?q?Ondrej=20=C4=8Cerman?= , Holger Kiehl , Sebastian Reichel , Brad Campbell , Guenter Roeck Subject: [PATCH v2 0/5] hwmon: k10temp driver improvements Date: Sat, 18 Jan 2020 09:26:10 -0800 Message-Id: <20200118172615.26329-1-linux@roeck-us.net> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series implements various improvements for the k10temp driver. Patch 1/5 introduces the use of bit operations. Patch 2/5 converts the driver to use the devm_hwmon_device_register_with_info API. This not only simplifies the code and reduces its size, it also makes the code easier to maintain and enhance. Patch 3/5 adds support for reporting Core Complex Die (CCD) temperatures on Ryzen 3 (Zen2) CPUs. Patch 4/5 adds support for reporting core and SoC current and voltage information on Ryzen CPUs. Patch 5/5 removes the maximum temperature from Tdie for Ryzen CPUs. It is inaccurate, misleading, and it just doesn't make sense to report wrong information. With all patches in place, output on Ryzen 3900X CPUs looks as follows (with the system under load). k10temp-pci-00c3 Adapter: PCI adapter Vcore: +1.36 V Vsoc: +1.18 V Tdie: +86.8°C Tctl: +86.8°C Tccd1: +80.0°C Tccd2: +81.8°C Icore: +44.14 A Isoc: +13.83 A The voltage and current information is limited to Ryzen CPUs. Voltage and current reporting on Threadripper and EPYC CPUs is different, and the reported information is either incomplete or wrong. Exclude it for the time being; it can always be added if/when more information becomes available. Tested with the following Ryzen CPUs: 1300X A user with this CPU in the system reported somewhat unexpected values for Vcore; it isn't entirely if at all clear why that is the case. Overall this does not warrant holding up the series. 1600 1800X 2200G 2400G 3800X 3900X 3950X v2: Added tested-by: tags as received. Don't display voltage and current information for Threadripper and EPYC. Stop displaying the fixed (and wrong) maximum temperature of 70 degrees C for Tdie on model 17h/18h CPUs.