Message ID | 20221021165000.1865615-1-martin.blumenstingl@googlemail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp804184wrr; Fri, 21 Oct 2022 09:59:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6qJ3RwZtE5S2KdTb+PlDcnhGf07cS8V0geG1K6/eTer3WTDFxxlXxbqsKtEfJAWITbVQdM X-Received: by 2002:a65:6d1a:0:b0:3fb:2109:7b87 with SMTP id bf26-20020a656d1a000000b003fb21097b87mr16750573pgb.127.1666371576481; Fri, 21 Oct 2022 09:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666371576; cv=none; d=google.com; s=arc-20160816; b=F0CrgPsd/Ywzg+rShRy9TkuDfLcSp5GlPR8dXLwt0vGyiBINW8Kwaqn2DHNvuXIrP+ sOW8+HLcqoYXvzHeN+S4TxGDVNzxZMKP+wYNG6LdOZtEsi39TyZ06SGbyWqC7ZZA2xyj P2FmKPnKOegaSr1H78ZYn5zx+Ga7LzJjRsrontyCrF0oolTo672VlCSCK+fDRy22trZO tvdY9DILJuKAyNX1BrCsCRHJhnbnbGy8PyAuvA5Os/mUXAEAu6Vru9aQFSqogY0PmUTY OPp26JSYU0OmPQGYn8otuNibL0KgZVzxFzoxEP1QWvyvxmRpLwInrGWtWpuhWybb05gn SLbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Cw+R9Xikusyj0v7XUpo66UBCqQebEKZZe8nkfd2rnP4=; b=VvDFkYJ5EkF3jzHnuXrlZcYpg9ITVZINdCwB9SSCSHL0StDr4LGu0kNfYaBV+KpwYE gS/UaX6A1U1f09By61nVu4BIrOmb3G7tGLBiqLm4vESlII8XrX+GrSAupvTYxY8jlZct eC84+m1q4byANUnXwNuq5kTHWF0Lh4yi1SRvJh8qzDlKIi+3JiNtklmfhunThmh58xsB 00x6WNLfbADhkn88m/4YBfDyWw0NDOWug73sLiwh7Wrin1GI7O7snsMi8fWI71HiB4l3 9iDRKhQVTazpgT3FXCkvNRmIveOqlbroVwUV0OBYm0NeEZZc+ePFoNz3q0lxrzBFG7zs UuHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=Ao635rcc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a17090a430100b0020dbb78e5c6si6553489pjg.73.2022.10.21.09.59.22; Fri, 21 Oct 2022 09:59:36 -0700 (PDT) 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=@googlemail.com header.s=20210112 header.b=Ao635rcc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbiJUQuZ (ORCPT <rfc822;mntrajkot1@gmail.com> + 99 others); Fri, 21 Oct 2022 12:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230185AbiJUQuU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 12:50:20 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F158D2475E3; Fri, 21 Oct 2022 09:50:15 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id b12so8111915edd.6; Fri, 21 Oct 2022 09:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Cw+R9Xikusyj0v7XUpo66UBCqQebEKZZe8nkfd2rnP4=; b=Ao635rcc4v6ANTEZfVUNii8aItSWgNLiZ9owf76yP2my6qCugJssh6e7ebj16THCMl hpI+m5iIrKSzZFU1SvaisJzzIFwXKDV4/gHM3z+hvda+b4vSYpADy+RB9LsjSagoP3Fc tsoC0zw9QpwPSiDoOF6IutJywJVIXQ082uZ4zqMGRElTzV3LW90wS04bdsh2+14iwdrS /FaVxbeRU5ohz/wJdyR3g1doSpqqnJHX+DLkedaa6SRCJst2sGTih9SwZdikK1UKQQSg qw8PHfkP8jK6oAxIbQe4KHsGAwjf3ZHD/+zU/QMKfuTIzLjYhi6ixaopvDZrPf9SADug xfHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cw+R9Xikusyj0v7XUpo66UBCqQebEKZZe8nkfd2rnP4=; b=5aIxMiKjGFxJ5DPJOf+8EMuvCloof5nwvsMpCBx5kqww2QfeaFlw/AMjdycXJXi0hI rpIslZX+FvPGeiYHUO9Lq5t9NwuMxSMZB5/sHvjP1L3/fiEId+BPyVioFnl/EKe95UzX XYhX5IbiXZaHtX8nOJRE+hDoZZ8N66VQ0atWDznhXcr1N4rB1xnSu+xIh4VU3szWBYJ6 yYRIA75/HRbsX2sAd1xK7Vob+8zhTBWA9dYbfMA/XC/dTfjMA3Q2KjqBAo6UE+8awIa9 CB9qSXoJ+xdvl3KZ+3JbT8z+NjHKeD0N5c0fpcNjENUgo3Ow/F5qrNDlm7A2ed4uL5/h W49w== X-Gm-Message-State: ACrzQf2WkMlP1ekIITEZf3NUkTNLZuHs8uvhI2y9GVX5ajQM7j4ypeLb ojeqfer2lUZzNNhjG5kyfn8= X-Received: by 2002:a17:907:2719:b0:782:b261:e9eb with SMTP id w25-20020a170907271900b00782b261e9ebmr17186574ejk.104.1666371013803; Fri, 21 Oct 2022 09:50:13 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a01-0c22-7b0b-4500-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:7b0b:4500::e63]) by smtp.googlemail.com with ESMTPSA id l23-20020aa7d957000000b0044ef2ac2650sm13725331eds.90.2022.10.21.09.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 09:50:13 -0700 (PDT) From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> To: linux@roeck-us.net, linux-hwmon@vger.kernel.org Cc: jdelvare@suse.com, linux-kernel@vger.kernel.org, Martin Blumenstingl <martin.blumenstingl@googlemail.com> Subject: [PATCH v3 0/2] hwmon: (jc42) regmap conversion and resume fix Date: Fri, 21 Oct 2022 18:49:58 +0200 Message-Id: <20221021165000.1865615-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747317242295286967?= X-GMAIL-MSGID: =?utf-8?q?1747317242295286967?= |
Series |
hwmon: (jc42) regmap conversion and resume fix
|
|
Message
Martin Blumenstingl
Oct. 21, 2022, 4:49 p.m. UTC
Hello, this is a follow-up to the comments I got from Guenter on v1 of my patch from [0] titled: "hwmon: (jc42) Restore the min/max/critical temperatures on resume" There Guenter suggested: "The best solution would probably be to convert the driver to use regmap and let regmap handle the caching". That's the goal of this series - in addition to fixing the original resume issue (see patch #3 - which was the reason for v1 of this series). Guenter suggested: > Make sure that the alarm bits are not dropped after reading the > temperature (running the 'sensors' command with alarms active should > do) I configured the limits to be below the case temperature on my system (as the jc42 sensor - a ST Microelectronics STTS2004 - is part of the DIMMs) and ran sensors three times in a row. The output is the same for all runs: temp1: +35.0°C (low = +0.0°C) ALARM (HIGH, CRIT) (high = +25.0°C, hyst = +25.0°C) (crit = +30.0°C, hyst = +30.0°C) My conclusion is that the alarm bit is not dropped after reading the temperature. Changes sinc v2 at [1]: - squashed patches #1, #2 and #4 into the new patch #1 (without any other changes to content in jc42.c) - patch #3 has no changes other than it's numbering (see previous change) - dropped RFC prefix Changes since v1 at [0]: - marked as RFC - added patches for regmap (patch #1) and regcache (patch #2) conversion - patch #3 has been updated to use regcache for restoring the register values during system resume (this was originally patch 1/1) - added another patch to remove caching of the temperature register [0] https://lore.kernel.org/linux-hwmon/20221019214108.220319-1-martin.blumenstingl@googlemail.com/ [1] https://lore.kernel.org/linux-hwmon/20221020210320.1624617-1-martin.blumenstingl@googlemail.com/ Martin Blumenstingl (2): hwmon: (jc42) Convert register access and caching to regmap/regcache hwmon: (jc42) Restore the min/max/critical temperatures on resume drivers/hwmon/Kconfig | 1 + drivers/hwmon/jc42.c | 224 +++++++++++++++++++++++------------------- 2 files changed, 125 insertions(+), 100 deletions(-)