From patchwork Mon Dec 4 16:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Gloor X-Patchwork-Id: 17508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2892764vqy; Mon, 4 Dec 2023 08:52:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9RjeffbXeIh7d62QjLnF4z/U/1P1Mp2KrWgAok6PITpHILo6Wg8gFHedMGq35ULTumbGR X-Received: by 2002:a6b:3ed6:0:b0:7b4:28f8:15c3 with SMTP id l205-20020a6b3ed6000000b007b428f815c3mr5768759ioa.35.1701708734755; Mon, 04 Dec 2023 08:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701708734; cv=none; d=google.com; s=arc-20160816; b=m5TNHWyhtOasmhPXOg7JNyhsylYBvI5ztarfd4/3KKCfjmmm1NbIndi8dLccGVm4sJ QdXm6iNYNIflD5XGocM4F6vf3clX7QxWhEA4zPaRcFcMbg8spV4i3x/F3LbJz+VgO/DJ km/e9bHrJN1y90aid7yf1GXOtqxKUpOxJuD0uNAXJMTOghMyeY1yctftvEXxNwBxKXzm rZ2Cy9ELtCBb3A5OU7Vc0P7LQT/Qmmur4oGYFVwoXprb6u71n5EzFynw3K90ZDPtISvI qfptWxU9M+InB/sYPWKIokw48VKUC6OIthswNsL4nBk8OL/b91uiYiq4JgIzc8v93os7 2MfQ== 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; bh=5iFNmhV8XRKuzQtz9RFM61yBy/S61ichquGneemH+EA=; fh=fjNSoY0LvOsWcORqEKQpjzRbUZLsws7xZhkeCHIPeqI=; b=rYF922dnV6p56S3FQkH9oz5wo84wHoJ0yy07btmU8aZJfA+Mj1YCmkg1TjHrim+Kjr 77x915vU0Wru6fXHtkEvHqEgfQmnHo7MR4ARHSeCrSovJXEMZsaj6fqGlne69reJhz2H uemewa8jKbxTzMXgaC6TDlXdbpsdI3tPGyp2ZBRHFGea11padZJRfKdTCap6NqtJQKKL 9I5sh3prjebEMWdMpFOvdC7fLjTFclEuF4x/TBLRh5bHS0ltd2AmtAnojV4w+TfVgf3i 4SsfKvabGIDOwOPkUOFTA/9D6LuFoIhga9tFepfzEdyo3geD4p7yFw1pCZWuaN1rrOQm k66w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id h10-20020a63f90a000000b005c668a5a906si3585993pgi.282.2023.12.04.08.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 08:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 5AF0F804C485; Mon, 4 Dec 2023 08:52:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235427AbjLDQvp (ORCPT + 99 others); Mon, 4 Dec 2023 11:51:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbjLDQvn (ORCPT ); Mon, 4 Dec 2023 11:51:43 -0500 Received: from mxout014.mail.hostpoint.ch (mxout014.mail.hostpoint.ch [IPv6:2a00:d70:0:e::314]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F78DCA; Mon, 4 Dec 2023 08:51:48 -0800 (PST) Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout014.mail.hostpoint.ch with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.2 (FreeBSD)) (envelope-from ) id 1rACAV-0007sl-1J; Mon, 04 Dec 2023 17:51:39 +0100 Received: from 157.20.79.83.dynamic.wline.res.cust.swisscom.ch ([83.79.20.157] helo=thinkpad.localdomain) by asmtp013.mail.hostpoint.ch with esmtpa (Exim 4.96.2 (FreeBSD)) (envelope-from ) id 1rACAV-000JX2-0e; Mon, 04 Dec 2023 17:51:39 +0100 X-Authenticated-Sender-Id: code@stefan-gloor.ch From: Stefan Gloor To: jdelvare@suse.com, linux@roeck-us.net, corbet@lwn.net, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Gloor Subject: [PATCH v2 0/2] hwmon: sht3x: improve docs, read serial number Date: Mon, 4 Dec 2023 17:50:02 +0100 Message-ID: <20231204165004.8491-1-code@stefan-gloor.ch> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Vs-State: 0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 08:52:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784370938176450693 X-GMAIL-MSGID: 1784370938176450693 The temperature/humidity sensors of the STS3x/SHT3x family are calibrated and factory-programmed with a unique serial number. For some sensors, this serial number can be used to obtain a calibration certificate via an API provided by the manufacturer (Sensirion). Expose the serial number via debugfs. Documentation is missing information about the sts3x support, add it. Changelog ========= v1 -> v2: - Change from sysfs to debugfs - Add documentation improvements In v1 I stated that the serial number readout was not documented for the whole SHT3x/STS3x series. I found that there is a separate document for SHT3x documenting this feature. For STS3x, the manufacturer confirmed with me that both families work identically. Therefore, it is not needed to introduce more IDs than "sts3x" and "sht3x", as they don't have different functionality. Stefan Gloor (2): hwmon: sht3x: add sts3x support hwmon: sht3x: read out sensor serial number Documentation/hwmon/sht3x.rst | 40 ++++++++++++++++++++----- drivers/hwmon/sht3x.c | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 8 deletions(-)