From patchwork Tue Feb 27 00:56:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ban Feng X-Patchwork-Id: 20999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2421188dyb; Mon, 26 Feb 2024 16:57:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVx1vynRQzw3muC8gLkYIRja0m9DKNhrTgNTYeezU0gRX+FxMoMs5MP0VTmVz8v8iWM/NI+bujsV/s8NV2QN70PVw66fQ== X-Google-Smtp-Source: AGHT+IGvtp0OReB6PPTSWLFRmgPja5+SqoFjCxkyVBu5PK1/bWwIXVmhuqYdTscciBrK+SJZ/l67 X-Received: by 2002:a1f:eac3:0:b0:4d1:34a1:d180 with SMTP id i186-20020a1feac3000000b004d134a1d180mr5217770vkh.11.1708995439154; Mon, 26 Feb 2024 16:57:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708995439; cv=pass; d=google.com; s=arc-20160816; b=kx7QJdxrng+yKBiS8+XvApepv7EXtjx0mUYyTety5K434xC7gU5jCfbI+a6Zn1VA1B gENAubqeunO1RT7Lkw1D2KWmSYQMqDBcYYi1W9RjtUns3fZ9uY6s0GiKscQaLdwbz44h UZpm1FvceTShXg7DfR/i1YnGulfbgfWfOl4QC7B2tDDRFuJra4pRPzNWH95I7t4pLaWN Fvx+FE1avt3PaDGBITdcOgGVlYrWBLlJOUFzp3H7YZy/4Kh7C4KxilsxfrAIXyC7sW3m JcyxDKJjq04BFBVYLWXBLx7EGE9o/SPPJDjOlPvRnDAYWLSnoE24aMx5La/YY4XJDi7A 0MHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=rWOqPITH8/D/rm9Piee283eHAkgF3ezgjvokn+PRZ8I=; fh=En/c9zIaj8zNQ0XWNZKnOG426wZGCVqO+OV5SrFSEWI=; b=zGj1mIKbnCholLnBOcUINQhSSJMgABbMJ8Apo6gFfRqPf9o5l6OWTELhlj1EKrNP3E pXt/TFjqeEHbtw0CfOGYz1jEks8JYIzj3VBjTswpXarrzF7zfaNNcPmqVNVB1JxTr3yR RxG3G/+AguCFIAWJHjhn4VeaU/OII2kP6IqaM0ugLsAqPl0d7N0gVV2L+T3O72p1S7em 0kVUnrUVshPbJaRfalls1oxIesD3hzE099Rn/3sVDB0iEaEQGRR7W7oo2iw6vtADVqxx Ug3AoORJmD0TsVxIQI1a9+FaOPTSNLenk6NLnyDXEFZyrHUCYv8bhGsxydjA36PDPoD2 MLlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eXa000Oz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82491-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82491-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q7-20020ad45747000000b0068eeeabaa8fsi6659382qvx.144.2024.02.26.16.57.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 16:57:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82491-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eXa000Oz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82491-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82491-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E462F1C22321 for ; Tue, 27 Feb 2024 00:57:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 128674C89; Tue, 27 Feb 2024 00:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eXa000Oz" Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90D3B1847; Tue, 27 Feb 2024 00:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708995422; cv=none; b=DJ1nxYHXR/YboqfVBw49IpB5Spuf7D1Kl9FD6lmmytA6EsnX7cu5KN+sEsLNuWIo/gm5rhixa+HWHHY2OURQHCyxEermxg2uTPiMq91mJ3aBqUUlp55otmLVn9XrGCyRjAWmQfr8ttbb4oT9RiSE4zsYu6bhLLTTm363ouLZHKU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708995422; c=relaxed/simple; bh=Rpstasz6qy5asuH/ldMOofvDaUhuD9+siwLcWOuJaC4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Rh2SAKE0WziPvEOJTU9H1t6rmLKKrq0eHb0t9SxzDMcK/rf3bT5v9IMRKXXom2PbBn3OzLk3WGeu1JDnYdYwOH97vDNqun2EZuAy1l58GQnbmtTpKsTbpfK/ZdiXV4/PF6issGXOlPIryOh+Lnbh/GFW7SE0XBC46Ebf08dJGEg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eXa000Oz; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5d3912c9a83so2799247a12.3; Mon, 26 Feb 2024 16:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708995420; x=1709600220; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rWOqPITH8/D/rm9Piee283eHAkgF3ezgjvokn+PRZ8I=; b=eXa000OzWsZE9/wtEOwGV3tJ2cQMYFnuFqQZtNT1kjEseq7uQllk9GKpzTlr0SY1jZ nxhbfti5T9wClU6/nXktvR22QOkeVmzqnljQ156GfGA1kMibTPTJTI8ffLdiugIQVUo6 2FR/dhpvoy5pGU07x9ZZ8dl/zU8Js7yZikJ8R3/vRofnJQ3NfJMcn9fOuJseH2grK9bM teb90nWYgQQZCOWg30S3egblVkr76UgM3A6UWQiFuJis2ub6RflCuF+vfby/L7ZLD69z nKxeb3TQj1+DgM5x3k2WG0CAkMqGH5f0T7cQtUyy8zeBxcXiZaQpK/QF4DeAjij1MMO0 gK/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708995420; x=1709600220; 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=rWOqPITH8/D/rm9Piee283eHAkgF3ezgjvokn+PRZ8I=; b=fksBdRnz8dYfkTMF2gN2szYukT0deK2s6i8Al4JyMDYEhPdPRemNtcUSsGGCt4Tmvo ftCbCMhtk0JnITpnjH8rr14E9eHXXGhoI2lbq9cd2BAWLPXW7uDqkZwT+Xl4qxzmT+g5 Dwl20MT/xfF138whXPqh/2sn13sTofMATbf+t0/yKWnNlChPtDoezwp0jWuqq7oSztSp 5ZX+UJi96ibEEgVgLKTyEyKTyGfBSoNlFJUwggkpR2odqneJHKmAg7HDaJ9xvEOTet43 lOHNEoUzwKc305WbsQ2H9omUmpRx7NORg9UZImVGFddO/6NEvaNfemDcQPXnHS7yFXVe E4Ng== X-Forwarded-Encrypted: i=1; AJvYcCX2vRgl2f6G4oCa3cwPVlbALa1yHd9PeSF69FtQVAYj7Qi7p4EltHmVMYeoztVY4hT6oG85rm+FXTUCyWvvKJoeSqjyAqYbUsYxz+5LcCwIZRLKGsF3bYqxab734grzerLVyNyTmoUTcIA5pkFqhVDMEI50nPgPw3MyFYRHjFL65MqqNA== X-Gm-Message-State: AOJu0Yzh6veWx0gwexfm/S+2HorhC5qtWBtsTHiODgrlTo/ptHNBS2PR MG4mneLdAuUhr8xLj/mhTjYdMtxXPecwVd9K9GbZU4YxH+nnjE/G X-Received: by 2002:a17:902:f690:b0:1dc:5dc0:9ba with SMTP id l16-20020a170902f69000b001dc5dc009bamr9461638plg.26.1708995419555; Mon, 26 Feb 2024 16:56:59 -0800 (PST) Received: from hcdev-d520mt2.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id t12-20020a170902e84c00b001db3361bc1dsm289253plg.102.2024.02.26.16.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 16:56:59 -0800 (PST) From: baneric926@gmail.com X-Google-Original-From: kcfeng0@nuvoton.com To: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, corbet@lwn.net Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, openbmc@lists.ozlabs.org, kwliu@nuvoton.com, kcfeng0@nuvoton.com, DELPHINE_CHIU@wiwynn.com, Bonnie_Lo@wiwynn.com, naresh.solanki@9elements.com, billy_tsai@aspeedtech.com Subject: [PATCH v4 0/3] hwmon: Driver for Nuvoton NCT7363Y Date: Tue, 27 Feb 2024 08:56:03 +0800 Message-Id: <20240227005606.1107203-1-kcfeng0@nuvoton.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792011601563106412 X-GMAIL-MSGID: 1792011601563106412 From: Ban Feng NCT7363Y is an I2C based hardware monitoring chip from Nuvoton. Changes since version 3: - Cherry-pick the fan-common.yaml in [1] - Fix "checkpatch --strict" report - Replace BIT_CHECK() with BIT() - Fix CamelCase defines or variables - Drop enum chips - Drop all local caching and just read values through regmap - Drop chip auto-detection since it increases boot time [1]: https://patchwork.kernel.org/project/linux-hwmon/patch/ 20240221104025.1306227-2-billy_tsai@aspeedtech.com/ Changes since version 2: - Cherry-pick the fan-common.yaml in [1] - Fix nct736x typo and add unevaluatedProperties [1]: https://patchwork.kernel.org/project/linux-hwmon/patch/ 20231107105025.1480561-2-billy_tsai@aspeedtech.com/ Changes since version 1: - Modify NCT736X(nct736x) to NCT7363Y(nct7363) - Convert to devm_hwmon_device_register_with_info API - All ID tables are next to each other and should be consistent between i2c_device_id and of_device_id - Ref. fan-common.yaml and modify properties (nuvoton,pwm-mask/ nuvoton,fanin-mask) to (pwms/tach-ch) - Convert to devm_regmap_init_i2c API - Remove unused function (watchdog timer) - Fix uninitialized symbol which is reported by kernel test robot Ban Feng (2): dt-bindings: hwmon: Add NCT7363Y documentation hwmon: Driver for Nuvoton NCT7363Y Naresh Solanki (1): dt-bindings: hwmon: fan: Add fan binding to schema .../devicetree/bindings/hwmon/fan-common.yaml | 78 ++++ .../bindings/hwmon/nuvoton,nct7363.yaml | 63 +++ Documentation/hwmon/index.rst | 1 + Documentation/hwmon/nct7363.rst | 33 ++ MAINTAINERS | 8 + drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/nct7363.c | 412 ++++++++++++++++++ 8 files changed, 607 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml create mode 100644 Documentation/devicetree/bindings/hwmon/nuvoton,nct7363.yaml create mode 100644 Documentation/hwmon/nct7363.rst create mode 100644 drivers/hwmon/nct7363.c