From nobody Fri Oct 2 13:10:15 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 709D43C1D72 for ; Fri, 31 Jul 2026 11:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497439; cv=none; b=cTHcfND4TEaecpQCr/DyoFqWw5PB+CM/HyczwCdEJQX33eDlb/hyIVeO6nL8x9/8ZuuzvbOOIWxbiZi+q2LyPi7rs/y/A5c0tRwpn39C/K0bdIpZ9wRg36aOaVD/E9F89JGYGUS/ftJLYdi/vvXPfYY1dBU2YHtHSvJC8BtZb5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497439; c=relaxed/simple; bh=4hhsAxAJjA9CnHKxIGE5+DUar4FrPizlIRDXYPMfD4I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MZwtN/Y0iEoFxVakZkpXJP7OgBlFlV7g4tXniiCzzSN1K+jAHggZ6duR7P2UO5eD5MgOZ1ss8AP6fv+8FJ1adaERrucKZ5C1gHUZiD8DOW+c0qxOzu+AgsTkIS8ILjxIgBXTBodhL++dzQPZjrhlzTWndWqzkzQtlXi2pV1rzZw= 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=eJwI8Vhm; arc=none smtp.client-ip=209.85.221.45 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="eJwI8Vhm" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-47ddf7b09e5so1076193f8f.1 for ; Fri, 31 Jul 2026 04:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785497434; x=1786102234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ge4jOwru2gdBik+03SVRNyiDvso3mpjCVgnlsYEIFrM=; b=eJwI8VhmB8kgbnrQL/JvPfkJykn3pUGgk0NIyUN2PVYAMA0sB9z0QjbxYkkn03WAu/ m8i4V0FdKNDyp4IxBvzHfdTQR9h9ICpZfxSFxAaSYOtlxDXRcOb+QlyvYzdrus+NBqTQ 3z+VZ4r9Ly7DbwtDDi20EHSMZskStBHuhYdCnJIUF1V8/cLiElzjGdh1RApB0+zkiQMd HOW4FYMV4npwTaIHxdJCxOWDZSoUWdm5t5cFiMSoc36NBhu3wnpSGGN/Gs+HMneMOQ3L citJLv2bWF8gYK/z+Zvha9ffmCyPikYGRhlqpWoa4zDPiqbxdi/PBTF8ksSOd2ntbH3+ wz7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785497434; x=1786102234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ge4jOwru2gdBik+03SVRNyiDvso3mpjCVgnlsYEIFrM=; b=TKcL8NNxbhf93mSSRKk86XtYCRrc20Vmvm6vR3ni8e18M8WNc5OY6OIAPa5HqwCNYA XamTey9zSW3PRpBygL9IUFXBNkSYuuggti8rmFlhN0qTeTRFY1fW9zcvW0zL4obYxMxJ V2vXRPY1e7wUgr38SXPGFBJWamtshcRfzybESfwZCBgs36vP3bf8FHySnF04wX/6AUD8 V1p0oLkpvA3uLBeFDC+iljRfc6Rrf5cvbCRvD8AozcZYXARU6pmmOHQPnJdPFfocSHzh 28oEg3TwNfb2sQYOvLinlUDy52SWoJbaR21jx1cN2G90sv82Q3BPAuoRBNSSNZjRwW4b A0cg== X-Forwarded-Encrypted: i=1; AHgh+Rr3mK525rr4EIEIV7mn8FDPU/BwtSTMb87SBYbwb2VQEoA3l/AN9dMYR0+BjPagGtjG+Bhxhm8HdXmUXfo=@vger.kernel.org X-Gm-Message-State: AOJu0YzWbsuVZ7MUvDc7AvkRVJCBOuYzd0U9Hq8qtusd3H34GNej/CRq /vAVDJoWwNoA+9D9Gl70QlMZHJVqsH86KR2FXeHRxgrupHamYfhwsuCl X-Gm-Gg: AR+sD11u2FkUOo9GBr2k1ZdDfeH9K/9WSWKlBzNIVFwsyXhYMD2+/fB+Xf3pBwTQFFo aiWgMWpZIkCdo86Qt72OdgreE2/5DvHPcVf30JzyuFhsWIq1ekll+Y8ulJsXr4cXNK2Qb9SM0lH 0qnZzac88xcwXuRrrVWGyIkSF17tVmuk9OC/9ymE5HvlPo/gMw3KiXnUeJcvGLx/StJ7a8DFmbu k2zlQWiqBIgRhZ/UmF/P7Ds8hbgrTxNgAHHzMWQnccag0JehYXOqxrCGMrgScAVFAUS6RMNO/JW JyhtcPPMj19QC/2B6YT2YBN9hJmpF305OofEo2RLaB+zhTwRwvtVFiR8AqNAdkYDFjWhgsH2mvI 3CqX2GNz85r5pm02c0KGaO+rdoQbsE5+ZRQnjiA8vrC5d37lyKU1yahyMVZGDdTIPC+2sFaf9uZ laC2J/HzsQZDEMeVHmKgb84DwlgFXBpUA+fj9GJNbUW3N7SA54cPS/kp3ieLGzIp+WAsUuNzx/A /egfU9Uqw== X-Received: by 2002:a05:6000:2308:b0:47f:8b75:2520 with SMTP id ffacd0b85a97d-47fd2b4dbfemr3609854f8f.42.1785497433804; Fri, 31 Jul 2026 04:30:33 -0700 (PDT) Received: from xeon ([188.163.112.51]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6besm3823656f8f.22.2026.07.31.04.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 04:30:32 -0700 (PDT) From: Svyatoslav Ryhel To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Svyatoslav Ryhel Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/3] dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428 Date: Fri, 31 Jul 2026 14:30:05 +0300 Message-ID: <20260731113007.145322-2-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260731113007.145322-1-clamor95@gmail.com> References: <20260731113007.145322-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Document the basic hardware layout of SMSC (now Microchip) EMC1402/1403/1404/1428 thermal sensors. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) --- .../bindings/hwmon/smsc,emc1403.yaml | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/smsc,emc1403.ya= ml diff --git a/Documentation/devicetree/bindings/hwmon/smsc,emc1403.yaml b/Do= cumentation/devicetree/bindings/hwmon/smsc,emc1403.yaml new file mode 100644 index 0000000000000..d7873a37c3295 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/smsc,emc1403.yaml @@ -0,0 +1,203 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/smsc,emc1403.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SMSC EMC1402/1403/1404/1428 thermal sensors + +maintainers: + - Svyatoslav Ryhel + +properties: + compatible: + oneOf: + - enum: + - smsc,emc1402 + - smsc,emc1403 + - smsc,emc1404 + - smsc,emc1428 + + - items: + - enum: + - smsc,emc1412 + - smsc,emc1422 + - smsc,emc1442 + - const: smsc,emc1402 + + - items: + - enum: + - smsc,emc1413 + - smsc,emc1423 + - const: smsc,emc1403 + + - items: + - enum: + - smsc,emc1414 + - smsc,emc1424 + - const: smsc,emc1404 + + - items: + - enum: + - smsc,emc1438 + - const: smsc,emc1428 + + interrupts: + items: + - description: Sensors "ALERT" pin output. + + reg: + maxItems: 1 + + "#thermal-sensor-cells": + const: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + vdd-supply: true + +required: + - compatible + - reg + +patternProperties: + "^channel@([0-7])$": + type: object + description: Represents channels of the device and their specific conf= iguration. + + properties: + reg: + description: The channel number. 0 is local channel, 1-7 are remot= e channels. + items: + minimum: 0 + maximum: 7 + + label: + description: A descriptive name for this channel, like "ambient" o= r "psu". + + required: + - reg + + additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - smsc,emc1402 + then: + patternProperties: + "^channel@([0-7])$": + properties: + reg: + items: + maximum: 1 + + - if: + properties: + compatible: + contains: + enum: + - smsc,emc1403 + then: + patternProperties: + "^channel@([0-7])$": + properties: + reg: + items: + maximum: 2 + + - if: + properties: + compatible: + contains: + enum: + - smsc,emc1404 + then: + patternProperties: + "^channel@([0-7])$": + properties: + reg: + items: + maximum: 3 + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + sensor@4c { + compatible =3D "smsc,emc1412", "smsc,emc1402"; + reg =3D <0x4c>; + + interrupt-parent =3D <&gpio>; + interrupts =3D <4 IRQ_TYPE_LEVEL_LOW>; + + vdd-supply =3D <&vdd_3v3_sys>; + #thermal-sensor-cells =3D <1>; + }; + }; + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + sensor@29 { + compatible =3D "smsc,emc1428"; + reg =3D <0x29>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + channel@0 { + reg =3D <0x0>; + label =3D "local"; + }; + + channel@1 { + reg =3D <0x1>; + label =3D "chan1"; + }; + + channel@2 { + reg =3D <0x2>; + label =3D "chan2"; + }; + + channel@3 { + reg =3D <0x3>; + label =3D "chan3"; + }; + + channel@4 { + reg =3D <0x4>; + label =3D "chan4"; + }; + + channel@5 { + reg =3D <0x5>; + label =3D "chan5"; + }; + + channel@6 { + reg =3D <0x6>; + label =3D "chan6"; + }; + + channel@7 { + reg =3D <0x7>; + label =3D "chan7"; + }; + }; + }; --=20 2.53.0 From nobody Fri Oct 2 13:10:15 2026 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 1BBA83F4DDB for ; Fri, 31 Jul 2026 11:30:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497443; cv=none; b=uBbd+VLw2Fh/9XYmdCAHWa/Eo5PX+X7sGecKa8vyVGjziLoTkrFz5PoFWCyxbelbmqkUc5Kn+lQtyOyKeqrCBtvryipHIq+Tw54Aadx8iiN+QeXHCJ0oZGKB7rIRPSVRHxDQYAFGPMsEahCqf+TMXOAsgCm6/MC8a31DQcz29ww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497443; c=relaxed/simple; bh=oQIlCSYbzFuJWn5utFRqj8+nwniiWc+T5MOM5nbizn0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qwX6xdBVjEoQJSa4f5EjJ0Ty/5Dfay3sJ3UVLZUpNGlDl2kN+es1kbooSWPm2YB5k+sX6CJMLM67sQp5XmBPn10ThRpQrfOvxj28lQ6IngKPTA71wZW+h+kjwGojZCGTS2GEfyjKyXZ0X+Ww5DEgAbtY0jfKQ4zD/qHKFhaDjEQ= 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=F0RzHYZr; arc=none smtp.client-ip=209.85.221.53 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="F0RzHYZr" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47df43bfb07so337765f8f.1 for ; Fri, 31 Jul 2026 04:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785497436; x=1786102236; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=e9ih1Dp51xXbcXFgDzJBaGz1U3HD+6rRl2YFWuxnzhs=; b=F0RzHYZryhxN0GsGnes+k+tvnTyEZk7np/w3qqrBDBB8xquFCMF3Rg3dymULlBl1Je AfRgSWbJ7MCI4sXYcIsD5EnEL5HEGOqfbmfdNLMM8J3TJCRkzDXTQv71NKRrEcxeJhQc wkEVqIlbv73wi5hnys9AGPOFb+PUQ7UnnkKkXofJYqb3E2B1tPsm0RuJRoosXK+rYyAI VlPjRHYHn3ldBrWy3qYiv7Hkoc0AEAcWv6SvoekYg04ufunl0SD/kWNoyKAPNxTJ5wbk 86cGb8xg4KelD9cLUKatJf4Rl+eNjLXAfErSC0CQqqGN43p6YHqcM+C3ueKWmwWHMJ5j r0Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785497436; x=1786102236; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=e9ih1Dp51xXbcXFgDzJBaGz1U3HD+6rRl2YFWuxnzhs=; b=dnZGo0H3eh2DUCQRZ4aWHWAFquxcEJhE2JYE7f0/f9jGV1X3NeFC7v+k/XWXXnBNbz oTAyIBCi7vafQhvz4rxgSnkQYrByXKjjRzvV51O8yTaNeXJ1RtwXwXqJamuO3zmtqbpH nejmvL04imrzdo8xmqTQ/HlPH9gUkwtjjO9Kegw9fNEoHu1QLdpfohAciTVzioQ+QwUA 0pnRiN5cHcuaXqZfeyaKDBIDwqMxbevsMGxDNHmtX1myKWeCn1rnR30LD+zVOq3J6ZnZ KuaodYNJnIpwNtRIyGxYAjQnyrduQEQfxZ7sVRgKYEojHc0BEh0j5PNV7WJo+cIvSN+g pBaQ== X-Forwarded-Encrypted: i=1; AHgh+Rog27s15PhtzmGqYM0/sKY8zFY2a7+fAuxDMskN9AOxgZ4rutuaMD2d2qjdfKgpeEeSyAvTb17PlyhvKMU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz2GHabqIMufaEHEIGUlfuvstz5MCk5vUYC9eiHvhJlUlbjau+D o0VbYkEkcuLp3MjTLmfXZQnpaOlf8n4dRp7ucsJWYfYWEYuR8FSSt5eR X-Gm-Gg: AR+sD13oF//S2zctNT0C310fnX+52ONtVsCwWCLsxgUmtt9iBNs87HvwnIUXjzwPIQa D4DReGGTXs4qA+mgYnlPjHpIiQb9UPPLpvTwnFQZwQ0+eskKXeR2aZfWpd8Ei5xW0OtWaAlycfS 1Hb+FgXEJ/+eJ1jtU91fkmdV/FihFFhaf4W9h55gEOVvYpFDo2jYCHrl8TpreC1Xg/EnjEEgyrv Va+vP5g7Z44S71XYGE7r2VRCh5yA/lx1K60+GAylgEm157UlaQLdzjKUvtvMC3C5h71cylk5847 h/xz7/e+8a4ftCk5YnxdZjaCiIroEdEMGP8ey0TZxVdGC0q31Qkql2bq4c+5Rn2TlNXyaznKYWH dWiWjUY9xMBxbaPqTBGF/YgiyTMq9KObX8FCutKwaflsAFvUR2BXtF/zCBMXxEmCgvf27CSIfsB mv5/DKuX/0LPFzZx0MSaVYEflckU8Z7YtHWGVPoYBz2aWUVcZspMZyE3ViIkq4t7yjV9Yzd8uP/ VB76XlvOA== X-Received: by 2002:a05:6000:18a8:b0:47d:fc23:abe8 with SMTP id ffacd0b85a97d-47fd2b2ee28mr4206060f8f.28.1785497435794; Fri, 31 Jul 2026 04:30:35 -0700 (PDT) Received: from xeon ([188.163.112.51]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6besm3823656f8f.22.2026.07.31.04.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 04:30:34 -0700 (PDT) From: Svyatoslav Ryhel To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Svyatoslav Ryhel Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings Date: Fri, 31 Jul 2026 14:30:06 +0300 Message-ID: <20260731113007.145322-3-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260731113007.145322-1-clamor95@gmail.com> References: <20260731113007.145322-1-clamor95@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: quoted-printable From: Jonas Schw=C3=B6bel Add OF match compatible table to be able to use this driver with Device Trees. Signed-off-by: Jonas Schw=C3=B6bel Reviewed-by: Guenter Roeck Signed-off-by: Svyatoslav Ryhel --- drivers/hwmon/emc1403.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index cd753b38709f2..8b3173da25973 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c @@ -659,14 +659,14 @@ static int emc1403_probe(struct i2c_client *client) { struct thermal_data *data; struct device *hwmon_dev; - const struct i2c_device_id *id =3D i2c_match_id(emc1403_idtable, client); =20 data =3D devm_kzalloc(&client->dev, sizeof(struct thermal_data), GFP_KERNEL); if (!data) return -ENOMEM; =20 - data->chip =3D id->driver_data; + data->chip =3D (uintptr_t)i2c_get_match_data(client); + data->regmap =3D devm_regmap_init_i2c(client, &emc1403_regmap_config); if (IS_ERR(data->regmap)) return PTR_ERR(data->regmap); @@ -682,10 +682,20 @@ static const unsigned short emc1403_address_list[] = =3D { 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END }; =20 +static const struct of_device_id emc1403_of_match[] =3D { + { .compatible =3D "smsc,emc1402", .data =3D (void *)emc1402 }, + { .compatible =3D "smsc,emc1403", .data =3D (void *)emc1403 }, + { .compatible =3D "smsc,emc1404", .data =3D (void *)emc1404 }, + { .compatible =3D "smsc,emc1428", .data =3D (void *)emc1428 }, + { } +}; +MODULE_DEVICE_TABLE(of, emc1403_of_match); + static struct i2c_driver sensor_emc1403 =3D { .class =3D I2C_CLASS_HWMON, .driver =3D { .name =3D "emc1403", + .of_match_table =3D emc1403_of_match, }, .detect =3D emc1403_detect, .probe =3D emc1403_probe, --=20 2.53.0 From nobody Fri Oct 2 13:10:15 2026 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 F011A326928 for ; Fri, 31 Jul 2026 11:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497446; cv=none; b=GFJjualf5ODeGihx0ooEa5STsvYygcoSbNJhALsRcGh2rhh5B79fX0f9DX4Phva/KcEKk1leO5UTuiLpFyLlEEv6IyUDHwDlz0aSUiWo1do5fMdN9G8uR//hcejNYT1VCdB53nPvH86Q8WNScY8+hDBliDFJVcf1COipUdwGl5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785497446; c=relaxed/simple; bh=gxL7KiVYuyQ+WBQ7itimHHbc/gK0nyv2aG47P7bsJn0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LXJ93IfFGkprTGYF/ks/5gX3Kw+gj/BRMB+Cg0sbzo6i73v3L9J2OJ5NKh9gOABSRHIwZRYp0G084p516mxFdZ/fBf+6n+flZBPRg+VMsjLS1fOi8SbxRH53g9QauPISd8VvytZOvVbgym0kf3IPWc0g+UPxGjak4j/s4MY21Qc= 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=iLYQ8VQY; arc=none smtp.client-ip=209.85.221.43 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="iLYQ8VQY" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-47db714766aso1161680f8f.0 for ; Fri, 31 Jul 2026 04:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785497438; x=1786102238; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=p6MkhrXl+YCwODYjVYYcDB6PaHtllobFn/tSmynvwR4=; b=iLYQ8VQYZ2xmXonuPHHoKYtC0KFywenSLp+edG7IYA4jwYtuemhO1hkEQYUleD7pUS MKJGAAFp21zf2XpXi0cCKz0QhUoXrdExYUtpjPcwxwJrC/EBTK0xPRogofdkkx491j2N m6B1rKA1tY5vnmpPSJWOLNz6RKo5QdY3avpQ34j4crk3Yvi2yI3BtQvI2FQp+UwpkZ5P vgbYtwn96+OaaNcuw24sSYuWNhT6CP9EEf2R0o0tMFTLUQ1slLo6kkS6FpDKmRtWUKpr IPJyHvC7ujeUh4p8DxbfCsTUu7FS3WZ6iPmRNsEFwZ2pir0vHR5QbTCzGcLyOrI8qKx0 RJhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785497438; x=1786102238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=p6MkhrXl+YCwODYjVYYcDB6PaHtllobFn/tSmynvwR4=; b=UgWvavu0uVqry62fRQsKiBZott5Sl/RNP+W0t227PvCU2URupY09EnCw5lTwq67Zlj 9gvgrARCAvBpIrnKKGIwMK1WcqrZN0G/1Tz4Vgt93m2qu0eABYaDha77RHFhidOuz0Aj WQ4LV/zfMv24Lj82d80wT7HGwUo5owMJil1PYW9FitxcroBimKhwrUyXs49J8QAE0VuP Rm60OOC73Lb1guoetOiLILO+O+lZgr2zuiDnPS02whzJMvZVZuGP7u/2YiafzTeFDFhx U0k0PJ7kdM1fynGycAWLiW4rVQxMiu6LtPkGYCSSmsqTl5wm2wKutLak7Sd8rvHnhnaC /5Ig== X-Forwarded-Encrypted: i=1; AHgh+RoCYZoQkZ2CikjOwTRNMWngFioXC4VAksfSB/Ztn3PqSKLTugMqklcmASLaPDdk4SQXY2Rk0T7XnEtm5L0=@vger.kernel.org X-Gm-Message-State: AOJu0YwU0TrwqINo0x2zmNb9boT228t8cy2gM2+z7A4ZQ8AxoY7rl0P+ /3nwCHdruCjg0yXPMLX3Tp0D/KyKln6+Y8B9vFzgUOhleO9Zhfhjy+fS X-Gm-Gg: AR+sD10rn+lTVT2QSBeW6QRpcGp03nV6pXRfKQkdbAd2AzntF2Wh1MN7lW2pcel6KH/ bERUNUAUUMOgVqTrecsJxw+y1Jt/5vmk0HlV0IaxHJ8PvR18KVTI6qH/gs0VE+PYX2DXH+GNFkX iNjpBlMN0n2U6N7IeWfAKNIV0PaQaFKfgSR2SyYwDV88vjyMCdCPaz4O3iXK/8mz42X4lCLxgR+ J501iQ+i6GOdpFrcWG+RCWt98FEZG1ET4P7aUosyMYSJIkitWq2OVoQd+oqv2TIbUOax3y8OnG4 /vrmqxUHWNQ3oAb+KBtncOa/N9Jaz7hpA2n/fC+S22Ttt57h/JNd2BmDyzc27/dGf++8O5yesL0 M+IvFxzikwXPJxExWMBGqBZuIoiD4euDHzVIypM+spJhftsU5BqCWcLGlLZK81tIN1hdQLhyj5i weyBQ7VGAUa12Pyj6PyjDyHiDQuVZ7E6Z50G5LxbSwYw0H1q69AstxDcid0HZ5e1ybzbwnsk9Ch a2HGHq0fQ== X-Received: by 2002:a05:6000:41f1:b0:47f:96e3:5322 with SMTP id ffacd0b85a97d-47fd33839b4mr3064738f8f.7.1785497438291; Fri, 31 Jul 2026 04:30:38 -0700 (PDT) Received: from xeon ([188.163.112.51]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6besm3823656f8f.22.2026.07.31.04.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 04:30:37 -0700 (PDT) From: Svyatoslav Ryhel To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Svyatoslav Ryhel Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/3] hwmon: (emc1403) Add regulator support Date: Fri, 31 Jul 2026 14:30:07 +0300 Message-ID: <20260731113007.145322-4-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260731113007.145322-1-clamor95@gmail.com> References: <20260731113007.145322-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for VDD power supply for this sensor. It is required on some devices for the sensor to start up and work properly. Reviewed-by: Guenter Roeck Signed-off-by: Svyatoslav Ryhel --- drivers/hwmon/emc1403.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index 8b3173da25973..a0f8d29eb6c76 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c @@ -18,6 +18,7 @@ #include #include #include +#include #include =20 #define THERMAL_PID_REG 0xfd @@ -659,6 +660,12 @@ static int emc1403_probe(struct i2c_client *client) { struct thermal_data *data; struct device *hwmon_dev; + int ret; + + ret =3D devm_regulator_get_enable(&client->dev, "vdd"); + if (ret) + return dev_err_probe(&client->dev, ret, + "Failed to enable regulator\n"); =20 data =3D devm_kzalloc(&client->dev, sizeof(struct thermal_data), GFP_KERNEL); --=20 2.53.0