From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 C044946F488 for ; Wed, 5 Aug 2026 13:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785935738; cv=none; b=iziAWTaHiSJJAQ/HytTjpZOdXQUhi6GYicF9kHADQ6BFYjrWzFr+oWbxgXz1o2eAwmcIfQwYaAbyJ5zMGx+L8k7hL7AotW+BD3YdnJqJ2otp0HcE4G0T/xVfGw1gbXqt39mgpXAmYvvOH0Q1KEQ98Qee9J3nPcJUT9IrrFE6o1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785935738; c=relaxed/simple; bh=BFGcDUFM2IGZ4TgmcIIPIXiOpFbJb35N7OkBBLt79qU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=AV1o0De7Tb/Cv3lPuf17w/d2ZXwlDPgqpM0h0gM2QohbGHGBMeY9I3LTGgumqSCmfELpXTncM4NRfrDlvK+PcmDTalPrgijTqx0fxCCEjCsjy1bQs/Tu89SRbymKZ0q8h/ZwPDUIqUKjkgPbvNKkZqXtxbjK0gpw1p/rCXQWhMk= 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=nd54Q3Rj; arc=none smtp.client-ip=209.85.215.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nd54Q3Rj" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-ca913a601fbso837286a12.3 for ; Wed, 05 Aug 2026 06:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785935736; x=1786540536; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tIcTi6kuyQcSUxNPVhSjqqVVaDVKUW/1s+uq3qhElCE=; b=nd54Q3RjPW2jNgUDPVCcFnBk6Y7c42MK1y9DNLA8cfjL7mDOb2daj9QGGEC7wdUoJO Kh7ocunx74h9ldBpU/ir+/hXXM3YJ9+92L3Ny2VYuTcXQlnh1y3u3kI5zFNbKInQitOB MPV3o61IgADWZYOoz3pQv133I8MuFEl/0SLF0PY+BOkV2I03Gow1IbI7zXuJ/Pf5nbMm Ndx52iIdFSH4aZj6pVy7VQ+QsEhubkvysdinr5kFCrMSd9DTO+QruqILWGBBXCrz5TQn fwhRfIe95v+QQZ28BtASvc9L4RWTN5ZlByx2Z6nZ1v4LeXj/Ft1UnnJFz1Fs5yP3IqM+ ImaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785935736; x=1786540536; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=tIcTi6kuyQcSUxNPVhSjqqVVaDVKUW/1s+uq3qhElCE=; b=Ns1tcV9SknHXEG6qiAc7qEaV1c341LWpc4Yhv/QjL+87sEvme1zSwFnYfyPni5dG5K 7v22Z7/wV5kNW6fKEk5FcxyGwPakG3j1wiUO4YAh6jf3MV5d5RpAVC2Wy8n6h3aSK8WP BLlDHiCcB4nbGkQMj7hRzT8W9IzD1N0zVbfWtCnDMgDPwcj2hLhPTVJf0ZJqiiqsy5ry s/jfGFWsc16InwHWZc4d8eCgABhbwEfuSDrQB+hs4LJg0JsyVo8CGe+ZpZrn5kzqH9F5 JXKxoZ4HmY5X68EdOW0o9fcx7JCmitU+PVYe4Nkx8H2rqA2RHLr3UCT789gfRal970jE p57g== X-Forwarded-Encrypted: i=1; AHgh+RqgdaFvm2kuzzZMeCWU2BJyBtcHyo7dsGE6dcqsc9x+Xh+xOXrpIACm7ZDjlAC84o/k7inZcdNwIUmT6bg=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5DP8JH4xmmaNVqfHqZYEBYR757EdaXx0bzvegbqKnEeWMjDTL m7af6Rwx2cnWIelLiGkWrkcMrSDTVjVi8Xn8PU4PF7OjvrS3o1V8lRbH X-Gm-Gg: AR+sD10ESYjX1yg0wo3zDfpMp4AAiigXuTTQWARovN/EswJzykq4pOsuzjDyShAZ7d9 f9T2vxX/RnpFp2+zO38/yVnU4M2JggKBllpb8CIXjvaIZshlnGbB40LpwrZDz/uq7XR+8ibHtgL /+eoJr3gJP3+54jpGKihCySUFq3fGNngdKYJToei+In1+FMUFT5nygH2wr9fvIvir1WtOwDBPqo CoGfxSGyeQgDfjcLhbMZ6qe99irzdHX5e9GiKZRcpQHooPKLz0KNiLWur0tc3SkvyZWGcbwnJtp xh+Ilx2mZt+KKz3KPTAgNmrT7dwVG6DZ09vWmrVJAr7XO3nt1Kdc2sq8Lne1SiR/HeeF+2swGdR G+zmUqsvGh1wKj0Km47PAs6rQGG42GrJNuISt6fi3FbTaKJoMipqv3/kRy86SDvrO2p5WFcOkSA Z7Wyi5Snkkp0Yxt/3h6Q9a9gPX52pozC9v+PiZqN9TxMf3wdUj8TdQjxRB0tVE/T1yvO0NfMji X-Received: by 2002:a05:6a21:164a:b0:3c3:a08d:5b44 with SMTP id adf61e73a8af0-3cb85ef9234mr8477121637.23.1785935735832; Wed, 05 Aug 2026 06:15:35 -0700 (PDT) Received: from tresc054937.tre-sc.gov.br ([189.4.123.18]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3158673a9e4sm18292261eec.18.2026.08.05.06.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 06:15:34 -0700 (PDT) From: Luiz Angelo Daros de Luca Subject: [hwmon-next PATCH v6 0/4] hwmon: (adt7470) Add PWM provider and thermal sensor support Date: Wed, 05 Aug 2026 10:15:16 -0300 Message-Id: <20260805-adt7470_thermalzone-v6-0-5605a5f95467@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAGQ3c2oC/33RUW+EIAwA4L9y4XksgBRkT/sfy2VBqCfLqRty7 raL/32oL8aYPTalX2n7IAPGgAN5OT1IxDEMoe9yoJ5OxDW2uyANPsdEMKGY5opan7TU7D01GFt 7/e07pGAsZ0Lo0mtBcuVnxDrcF/WNNN9t39EO74mc19xwqz7QpZmdXzdhSH38Wb4w8qXm324jp 4w6B4B1Aeg9vl5aG67Prm+XDqPYGvrYENmwAFxqA2Vt/d4oNoYoj40iG15CqaQuna/s3pBbwxw bcp6FS1YYX1uGam/AxijYsQHZkMIYsKqqSgdbY1pXHvHrlm+b1pucp+kPitblmPkBAAA= X-Change-ID: 20260716-adt7470_thermalzone-59a102278d72 To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chris Packham , Andrew Morton , "Darrick J. Wong" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luiz Angelo Daros de Luca , linux-pwm@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 The ADT7470 is a temperature monitor and PWM fan controller capable of monitoring up to ten external temperature sensors and controlling up to four PWM outputs. Currently, the driver exposes these sensors and PWM controls only through the hwmon sysfs interface. This patch series integrates the ADT7470 driver with the kernel's thermal and PWM subsystems. This allows temperature sensors to participate in Device Tree thermal zones while exposing the PWM outputs as generic PWM providers for consumers such as pwm-fan. Patch 1 adds the YAML device tree binding documentation. Patch 2 introduces the ADT7470_PWM_MAX macro. Patch 3 registers the four PWM channels as a generic PWM provider. Patch 4 registers the external temperature sensors with the thermal framework. Signed-off-by: Luiz Angelo Daros de Luca --- Changes in v6: - dt-bindings: hwmon: add adi,adt7470: - Move allOf: block after required: (DT schema ordering). - Collect Reviewed-by tag from Krzysztof Kozlowski. - Link to v5: https://patch.msgid.link/20260730-adt7470_thermalzone-v5-0-42995a6bb8c5@gmail.com Changes in v5: - Hide hwmon PWM sysfs attributes if "#pwm-cells" is present in DT. - Register PWM chip before hwmon in probe() to correctly initialize sysfs visibility. - Fix waveform rounding math to strictly satisfying CONFIG_PWM_DEBUG expectations. - Return 1 in round_waveform_tohw when the requested period is too short for the hardware. - Link to v4: https://patch.msgid.link/20260729-adt7470_thermalzone-v4-0-c14039dfa0e6@gmail.com Changes in v4: - dt-bindings: Dropped redundant descriptions for standard properties (#pwm-cells and #thermal-sensor-cells). - dt-bindings: Conditionally referenced thermal-sensor.yaml to preserve ABI compatibility. - dt-bindings: Switched to unevaluatedProperties due to the imported $ref. - Link to v3: https://patch.msgid.link/20260728-adt7470_thermalzone-v3-0-d4586478cdba@gmail.com Changes in v3: - Migrated from the `.apply` callback to the PWM Waveform API. - Moved fixes to another patch series: 20260727-adt7470_thermalzone-v3-0-21424d550c3d@gmail.com - Use guard(mutex) for simpler locking. - Link to v2: https://patch.msgid.link/20260717-adt7470_thermalzone-v2-0-a55147958fad@gmail.com Changes in v2: - Fixed 2 previous bugs uncovered by Sashiko-bot during review. - Dropped the thermal cooling device registration for the PWM channels. - Implemented generic PWM provider support using the PWM subsystem. - Updated Kconfig to safely handle the PWM subsystem dependency (depends on PWM || PWM=n). - Updated Device Tree bindings to require #pwm-cells instead of #cooling-cells. - Link to v1: https://patch.msgid.link/20260716-adt7470_thermalzone-v1-0-cc55ef35edde@gmail.com To: Guenter Roeck To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Luiz Angelo Daros de Luca To: Chris Packham To: Andrew Morton To: "Darrick J. Wong" To: Uwe Kleine-König Cc: linux-hwmon@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-pwm@vger.kernel.org --- Luiz Angelo Daros de Luca (4): dt-bindings: hwmon: add adi,adt7470 hwmon: (adt7470) Add ADT7470_PWM_MAX macro hwmon: (adt7470) Expose fan control via PWM framework hwmon: (adt7470) Add thermal zone sensor support .../devicetree/bindings/hwmon/adi,adt7470.yaml | 58 ++++++ drivers/hwmon/Kconfig | 1 + drivers/hwmon/adt7470.c | 203 ++++++++++++++++++++- 3 files changed, 258 insertions(+), 4 deletions(-) --- base-commit: 4c2e8c377915496fbe9cc1c9d91a7297aaa01783 change-id: 20260716-adt7470_thermalzone-59a102278d72 Best regards, -- Luiz Angelo Daros de Luca