From patchwork Sat Dec 24 04:18:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 3282 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp7933wrt; Fri, 23 Dec 2022 20:21:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBtxC43ZN5OwWkczc4l9kS7XkFhEIqOb74jE3V7w0zlPEUgqGbez1f/vkAsoBYwUZ8oA/U X-Received: by 2002:a17:907:1110:b0:78d:f455:3118 with SMTP id qu16-20020a170907111000b0078df4553118mr9240951ejb.64.1671855706607; Fri, 23 Dec 2022 20:21:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671855706; cv=none; d=google.com; s=arc-20160816; b=uGyuRNzMLmw134ksj/4qMZcmNea5FUtC7h8i3HaxqVpvScbol232zzemYdPkf4Ha14 Gi+B7EgAz5hi+Uo0wmGJQZTxinJhS9Ur3ZudDiWlWJRpymteyr3XkZIMrLVWZlc5y+a+ tB8V25h+GycJhNC0860mLv2UWEbvff0dF+wJdZiYtHiBs634cIVVnxe+W7gqJWJAvZdx 3/b8kT/HITn/3YOumY39k/m9Pwn0C0PUQZPbCBdDyTyBjUIRTgRLUFZrKMvkJHu8vgZC CRM+3YgXB322Irx9t7PzjPcvdZNbo0kYatc8oyc9aVMpMkfPLit3R91v93v5Cxqypuvr Nt7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=cSbR2qNQkudTLVEp05jc1jPuX5MjzdnDB4tlB7eyrgE=; b=C3cjXJU4nxIN+TQ+h0P2Jt6Ao9qUw7TJx9fMw31TxIs5pzUBdCuTjVYlq0WnCtYHdJ VXyP4qq9yvv4LmGyapmyWlYq9kC2SvIpViz/7DBBf916XUt5UgX8X0Oexm21KUVbs1gx Mh03wijq7YhUgEwQJqFlzTqiTz5qLIFbYyq3BHgqk89BLnI+/YHu3mwRyNGddERwxqPQ sQ8j1gL1Dk7RIBersxcJNvq2c3LyDg2nSqjaljqdef2OC00R0WlarbXTybEaBsTJnDCB JFpnD2VEzeNdiKkO0sf6ll6Lit/sha0H3hRMkWyxrR9njirXr9KG76ZYKutTesg5tXqh LaGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=CJv8nXZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae6-20020a17090725c600b007c0fa8181c4si3898291ejc.567.2022.12.23.20.21.23; Fri, 23 Dec 2022 20:21:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=CJv8nXZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbiLXET0 (ORCPT + 99 others); Fri, 23 Dec 2022 23:19:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230386AbiLXETT (ORCPT ); Fri, 23 Dec 2022 23:19:19 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AF401C934; Fri, 23 Dec 2022 20:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1671855539; bh=ADj8j6/BUuQBYyxAwlKsfqY5hsrX2k4RAQgZk47ua6c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=CJv8nXZXasufGfn3c4aQ5hO79VmhuF+CJe04esSkKbLPUS7k3zVdKzGB18gxnEc5X 3LrJJQyKflmaKyG+QKmWjO+Ip2sR6QmEqM6Z03QHMCiv+qe/woQt1ug6JXhPfk6PqN WqqyT0/yYI+CJDDfH3PB17klEhu/CJeozkfE/EdtjB5K9JSb4sLPFzJS1jTXAOeNa6 gTFHdRPXMN+i6rUBhTTb2jw+vvw0n0VauPbgBgNDFILXHplpukKvl401wm/sS5FvJa G51viqrXih4iSqKNIt33dX80ex43EkjTV7lFoGxfdmsurh4S0+mDN30/dbqFH78Bib N6wIRtEGGQPFg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzQg6-1ovmpH01aK-00vMnc; Sat, 24 Dec 2022 05:18:59 +0100 From: Armin Wolf To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] hwmon: (ftsteutates) Various fixes Date: Sat, 24 Dec 2022 05:18:52 +0100 Message-Id: <20221224041855.83981-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:eExvhEnXCe011nUidf8E87CZzTm1rlfwWya2IayXQ4mWGaBuZ6q TD0WbIe8IWmICQrZUGCbcNDemQMXqniUicgIREHrONngr9mi2+kfVIyHG1/s9vFRTzr5vNr 6cVS8PlmZteWLPV6ruy6qtl8c6DwE/0qnCjShZIK2Ds3jeM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7g= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753067768974144345?= X-GMAIL-MSGID: =?utf-8?q?1753067768974144345?= Merry Christmas, a user reported strange sensors values when using the ftsteutates driver on kernel 6.1. A bit of research revealed that the drivers was omiting any scaling of the measurements, causing strange sensor values being reported with the sensors command. This was likely done since when the ftsteutates driver was still out-of-tree, all scaling was done by libsensors with an custom config file provided by Fujitsu. The first patch fixes this issue. The seconds patch converts the driver to use the modern *_with_info() API and also adds support for fanX_fault and pwmX_auto_channels_temp attributes. Since the behaviour of the pwmX_auto_channels_temp attributes is a bit special with the teutates BMC, it is added to the drivers documentation. The last patch is a minor improvement regarding the watchdog registration. All changes where tested on a Fujitsu DS3401-B1 and apppear to work. Armin Wolf (3): hwmon: (ftsteutates) Fix scaling of measurements hwmon: (ftsteutates) Convert to devm_hwmon_device_register_with_info() hwmon: (ftsteutates) Use devm_watchdog_register_device() Documentation/hwmon/ftsteutates.rst | 9 + drivers/hwmon/ftsteutates.c | 551 ++++++++++------------------ 2 files changed, 213 insertions(+), 347 deletions(-) --- 2.30.2