Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1898623rdb; Thu, 7 Dec 2023 11:46:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbXmoJRy84QeInA89+7wWw976Qb9O99TJtnNO02YzuqakE3V9AJEPo6+iPvru5uhrVCINl X-Received: by 2002:a05:6a21:1ca6:b0:18f:97c:9274 with SMTP id sf38-20020a056a211ca600b0018f097c9274mr2278469pzb.89.1701978360066; Thu, 07 Dec 2023 11:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701978360; cv=none; d=google.com; s=arc-20160816; b=xVK2izx/HTVHKTX4hZ3E+tz+cxWBBDCs1SFwoGINA8B+E4VyuTPIitHkoI9Es97s6m FXVkUHyfgRVSuuyxI9UnVYSLeq3ZPoXh3NE3BOIrQ/X7fGUsdJIrzZYEPQbijFxLnThc 1iaDVmuPOPi8KUR1NrobGn6egR58Wj36tc5GN+u74ksrXyK6Y23bRiZC9k4iexGbiS9k JSSX1ZqI5cISVp7FmzDliczme8DiGZUH7RVwvH+eouhFULPRM2tT5ATL5aUkNd58RHTx xkj6AT1DjgX5v4Yu0Lmt36SuVVkYMGzSpGNXvEigZLHdjdetdh8VbStBPc0tLPnP45l1 FQ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=ODAetODriyWLBfgRxIkO8WbZl5Xnc+DQSeFmQhVOOfE=; fh=ZBEQLMSUin01UQ3hMr8yxJeDPZCratW69sYespTVLyM=; b=RYeFa8Qz+g0muhuxkO+qbY/lhs47Nf+Kg0XKKsLc3zOitjpZuaLcIEzaNM0chUc0a2 w2qUFdpoxBf6cr6KGO0nPmmMC2GZaBAvrYfnZyx5SJx628/FWr1jdTLFlF/rw7xOwF7g r5Q3IowdPoW8OzxlZzlYmu/azfD0vYhqr01y9WCaJ6wV1eMAnjSKI3P9rWcx82oFn7m5 cbsx23X+ahOA7/l4BEKN03tQbe1NIaiH79zTMQAaPZo94rt3HgVdZ4Kv9HZfvEKIX7el waA+nSATKHix8OFWyBtjNV1taHzUXmkAvTC7yzVCpxrY1NhFUg+4+Zs0S9HTtCwVU9xO nkBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mwtQ2fJC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b8-20020a6541c8000000b005c659bf1c70si195998pgq.206.2023.12.07.11.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 11:46:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mwtQ2fJC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id E995D8086931; Thu, 7 Dec 2023 11:45:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbjLGTox (ORCPT + 99 others); Thu, 7 Dec 2023 14:44:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjLGTow (ORCPT ); Thu, 7 Dec 2023 14:44:52 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77C971708; Thu, 7 Dec 2023 11:44:58 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33339d843b9so1390341f8f.0; Thu, 07 Dec 2023 11:44:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701978296; x=1702583096; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=ODAetODriyWLBfgRxIkO8WbZl5Xnc+DQSeFmQhVOOfE=; b=mwtQ2fJCGaOBUihlXTy6Mm9J2opYFcAi0j5wpep1PNZfQlSLo3K5kCm4WL3rknrnty ZkYlHJ7okryA5RTyletWyNN+FF3EysLKjeFzHWWt1jLk1MySRLH/ikKTEkxJf1dDCh8J 3z/OeaUPVomLgcYMeqC9l+JiGM3dAIqvLvef3rfF4ZlpiotD+3aNjaTsByQFYowBQr+Q tFWjtW9ijbmSNvsdTpU47hjVhRGzSg7lu3WiO87Dt+VRyNtoZ2fSiScq88Lm2mcNVrUN 7mCfubkK2XI3t9k/Vk+OefjSjJpzJor/EzX2fCkf1K9SapbkflbH/BACGfiy7yQTGiCt 2IIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701978296; x=1702583096; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ODAetODriyWLBfgRxIkO8WbZl5Xnc+DQSeFmQhVOOfE=; b=xIg4SiydDA/yJTlYmd87M3qeuN+1x3L/SZaauiO6pE9FqVI27sAeRCE06oQiVfc5fV V2zCtd8pQ3HQWBrC3c7HSwzbQxe8krX8usdglOMrqJKKV2VmA+R+YOBsmLyfWQR15gKj fkZoIa0YNULatPnn1bSDpWa47qzszV1Xd0wkLgsjjvrxFZzMxHBI7JjkkuSmGMv9+rB2 0Jx0Sy5a+PNQx2/4w13E52425JEOalK/O7VUohxUHnd4rPFoPqZVH40Tx2ayn53Ru69J UULqI1YYn7PerFKAyQYlJtUNN8ILZh84adT+X/rdG3PLu72miAnOyXqR9Guma22tLm1r WA8w== X-Gm-Message-State: AOJu0Yzf9/FCY5C9nDsp3QjGi4R7EI0kqo5HzdkobE7IhSpFHMJy95A+ H78fSHMCEmUZBV2Bf/E8tFBemffDQ19K1w== X-Received: by 2002:adf:ed06:0:b0:333:380f:2d2d with SMTP id a6-20020adfed06000000b00333380f2d2dmr2203658wro.92.1701978296277; Thu, 07 Dec 2023 11:44:56 -0800 (PST) Received: from [127.0.1.1] (2a02-8389-41cf-e200-1de9-f6cf-eef8-174f.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:1de9:f6cf:eef8:174f]) by smtp.gmail.com with ESMTPSA id rr17-20020a170907899100b00a1d457954d6sm127364ejc.75.2023.12.07.11.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 11:44:55 -0800 (PST) From: Javier Carrasco Subject: [PATCH v3 0/5] hwmon: Add support for Amphenol ChipCap 2 Date: Thu, 07 Dec 2023 20:44:50 +0100 Message-Id: <20231020-topic-chipcap2-v3-0-5b3bb50a5f0b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALIgcmUC/32NzQ6CMBAGX4X0bE27/AiefA/joWwX2ERo0xKiI by7hZMXPc5u5ptVRApMUVyzVQRaOLKbEuSnTOBgpp4k28QCFORagZKz84wSB/ZoPEgCWzd1WeQ KQSSpNZFkG8yEw66NJs4U9ocP1PHrKN0fiQeOswvvI7zo/fqzsWippKovBNoWrSZ760fDzzO6U exTC/zXIeldiTmUTVV1tv3Wt237AKficcQEAQAA To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jean Delvare , Guenter Roeck , Jonathan Corbet , Liam Girdwood , Mark Brown Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Javier Carrasco , Krzysztof Kozlowski X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701978294; l=3636; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=rzfCYZubHRyLXBqxD4RJvarNpshkMo3wb+FzrsdmjT0=; b=d1MiuSSrcZZjuwogYhweoMFAajaYPRinrkRv5R2LXalXOEGN9roQFIwGNJ73610Lg3zosMPC+ vS9+NRmwwZdCwTgVsmZFQyu+uSTMlGEG4b/a2QqGWmWRcuD0mArFRK3 X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 11:45:27 -0800 (PST) This series adds support and documentation for the Amphenol ChipCap 2 humidity and temperature sensor in its digital version. This I2C device provides 14-bit humidity and temperature measurements as well as low (minimum) and high (maximum) humidity alarms. A ready signal is also available to reduce delays while fetching data. The proposed driver implements the logic to perform measurements with and without the ready signal, EEPROM configuration and alarm signaling. The features this driver does not support (I2C address and command window length modification) have been documented in the "Known Issues" section. The complete supported functionality has been tested with a CC2D33S sensor (a 'sleep' device) connected to a Raspberry Pi Zero 2 w. Different device tree node definitions (with and without regulator, ready and/or alarm signals) have been positively tested. The non-sleep measurement mechanism has been inferred from the first measurement, which is carried out automatically and it is common for all part numbers. Any testing or improvements with a non-sleep device is more than welcome. The tests have also covered the properties added to the hwmon core to account for minimum and maximum humidity alarms. Signed-off-by: Javier Carrasco --- Changes in v3: - ABI: sysfs-class-hwmon: documented humidity min/max alarms. - General: reorder patches (bindings first to remove checkpatch warnings). - General: remove part number wildcards and use real part numbers. - chipcap2.c: improve error path in probe function. - chipcap2.c: fix error handling if regulator could not be registered. - chipcap2.c: use absolute values for hysteresis (for both ABI compatibility and simplicity). - chipcap2.c: minor code-style fixes and variable renaming. - Link to v2: https://lore.kernel.org/r/20231020-topic-chipcap2-v2-0-f5c325966fdb@gmail.com Changes in v2: - vendor-prefixes: full company name in the vendor description (Krzystof Kozlowski) - chipcap2.c: proper i2c_device_id table, coding style fixes, cleaner error path in the probe function (Krzystof Kozlowski) - dt-bindings: per-item description and lowercase names (Krzystof Kozlowski) - MAINTAINERS: fix manufacturer name (Krzystof Kozlowski) - Link to v1: https://lore.kernel.org/r/20231020-topic-chipcap2-v1-0-087e21d4b1ed@gmail.com --- Javier Carrasco (5): dt-bindings: vendor-prefixes: add Amphenol hwmon: (core) Add support for humidity min/max alarm ABI: sysfs-class-hwmon: add descriptions for humidity min/max alarms dt-bindings: hwmon: Add Amphenol ChipCap 2 hwmon: Add support for Amphenol ChipCap 2 Documentation/ABI/testing/sysfs-class-hwmon | 18 + .../bindings/hwmon/amphenol,chipcap2.yaml | 74 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + Documentation/hwmon/chipcap2.rst | 73 ++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 8 + drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/chipcap2.c | 1040 ++++++++++++++++++++ drivers/hwmon/hwmon.c | 2 + include/linux/hwmon.h | 4 + 11 files changed, 1233 insertions(+) --- base-commit: 33cc938e65a98f1d29d0a18403dbbee050dcad9a change-id: 20231020-topic-chipcap2-e2d8985430c2 Best regards, -- Javier Carrasco