From nobody Tue Apr 7 17:15:30 2026 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 AB8B1328B7D for ; Thu, 26 Feb 2026 13:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772111506; cv=none; b=gx4wrH7kkYWgV8pIkYMPR+ydLCp+vQHIcbmm2rl8mK6EAe9AOd+vI5hl1lpgE0qfkmY2eUhjoxobfHWw8dytnKMtOKvfZVLiUzih6yK2PUBEomIWXxzoJydityaMgtenee3PI7vm5nfvKtSPewXVEfWhdEDndCGOIv0QFjSAwoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772111506; c=relaxed/simple; bh=ntS4fqPIioaK4GOorQ6OXd2YXpStLXdHLtH4yKTAvDM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pFjGWxrgvMp5/2gSO/k9pX+z4sKkZYMs7OYWnim7QtJTRvHPipQ3hTNwxFD7ghqSUNZW6fwUeZB6uOcCE4Eslzd8N9+jYROhizqy79DcSDUr8auyQtQHftQIKoToi3T11eMEzsPsjb6ap3XX3r9nxdJ09htcs63aoVRgafwn/kg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pQs3pBbL; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pQs3pBbL" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b8f992167dcso107181966b.1 for ; Thu, 26 Feb 2026 05:11:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772111503; x=1772716303; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=h6y+YqcmDlZaWuwEmsiNt0O5Q0Y06fca5UIfK5pVano=; b=pQs3pBbL+vdmdoEeSUwrdt85jxhVilgo+AXYsadcnFTojBGMHp03//aT3qdTquJs/q cXEAGtqZ2MbI4yvujLjd/memVs4KD4fFELt1htAMwhoPzOztEz0VFAIhnq1xA3Igligw IKDbjZk5Aw4mDGbGfvGqDDk10t8EUkAZ5UlbhWS/29FbbAIUs3x1kAu/dMp5WRaPdq1y ZeLAwGmlA34Rem6uM8yvXkAEYZ7Ji3mrLlWcfxfCiTOu2g+f/T94z7DO77vGUFuFlOnz iR9dDOzNSJIZrriud3TOAo9romiVk3/1K5T7rwSZHRbzvS5TGIvsdSjnMHQidJoPWrpd 5Vpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772111503; x=1772716303; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=h6y+YqcmDlZaWuwEmsiNt0O5Q0Y06fca5UIfK5pVano=; b=BsRx4qfIcSmwlvCWrYaKdeMiSjrOTghgA3dKhU/z33SuIw/LcSKvmwKNmMtzG4iPkX FsRFw0txuOH47V1PwQPrAvFwrKa/3zZwpaHoCHf78Fx6ME0Hyz+N4bMQNyOWmR30T/nq Rk/c9rYJr4uZoGPghndaq4hLphBzGfuMTZinxLG3EJY1SIAH5FcU8WtAAWMnxXIN5WrW c9ABK6N/AVLJs4GoAMsxTwnKYp9NTBuY7rD8qSTZsqEriUblgYYbjHfQhCjrGRICo3ac 29i1wl5Mfpt6ZADJKRZ7JAWSWXoGFuOHeMslYpjAUTIhwnZDoXF/4yuVHmYti3fNFB18 qaug== X-Forwarded-Encrypted: i=1; AJvYcCWALxMNGdw4r+qo4A/7d3g2d0ztM4nsOn5/P7ArCcnSs1onBNgyUrAyDMQXQlI4LRc8SHkPkIPpPl50s2U=@vger.kernel.org X-Gm-Message-State: AOJu0YzDXj5gPxD+wtEjgjk2MdqKRp236g2fDAq2MR4A/8IXE+30Twch Ec/AEmqTbL8W6yFV98dUpYqzc1PHDojfySRxKeRj4578ZgJZJV/JlLTEfp/WPrku3BG0A2Amt3f 2s1H3hAg= X-Gm-Gg: ATEYQzztetxAgJ0UQ6EhHoXZRHYEEcZLnB7m91oQNAMxr6K0O0TsMInm+PPff0nV+fL T+nBYctkCilm5z4vOjpENGtgr3xZ6tGod1FlnQLEauUGQBCK7PwUMRr1bksUpiXJUAi8WFPuGuU xQLlyumIpM/CWFFoqLHcJQ6aYSq+tKp6pasyeD9Fqka5pP7GQdUkpzMTuUec7LP1LwfkXal3Xiu 7mv/B1ry69SmnJFfWnwaaPwj2rESonlGH0OOolfztJ04Wmm64HU8M+k304YEOmlBkUpgoOJhxoK G088eFuE3HSXXV0KH3oB2m5QgeZcPO8CypJSkJG+D312tfGykMNsaUMb9wEhJRJSZhLVA2JBhgX k8Od/BC7g5/eA2/R7ZQnfoDuSiHsXlnEQdlSNK4LWZ8eAi16qGRGHW4DjeSAtYodtDzDwacxyGH 9bUk1wipUoIfGNPJENSZ0xEYpre0gy+t0HNRsZVe8LHjkstwyJrlfygjv0u4Won98f9mIs0mRPn pKYb2rNFS9H5eTQkR7iUa0ciPcy X-Received: by 2002:a17:907:d9f:b0:b8f:8660:3cb4 with SMTP id a640c23a62f3a-b935b4b8202mr125706466b.8.1772111502920; Thu, 26 Feb 2026 05:11:42 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b935ac73d2asm55125866b.26.2026.02.26.05.11.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 05:11:42 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Thu, 26 Feb 2026 13:11:42 +0000 Subject: [PATCH 08/11] power: supply: max17042: support standard shunt-resistor-micro-ohms DT property 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 Message-Id: <20260226-max77759-fg-v1-8-ff0a08a70a9f@linaro.org> References: <20260226-max77759-fg-v1-0-ff0a08a70a9f@linaro.org> In-Reply-To: <20260226-max77759-fg-v1-0-ff0a08a70a9f@linaro.org> To: Hans de Goede , Krzysztof Kozlowski , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Sebastian Reichel , Rob Herring , Conor Dooley Cc: Peter Griffin , Tudor Ambarus , Juan Yescas , Amit Sunil Dhamne , kernel-team@android.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.3 shunt-resistor-micro-ohms is a standard property used to describe the value of a shunt resistor required when measuring currents. Standard properties should be used instead of vendor-specific ones of similar intention when possible. Try to read it from DT, and fall back to the vendor-specific property maxim,rsns-microohm if unsuccessful for compatibility with existing DTs. Signed-off-by: Andr=C3=A9 Draszik --- drivers/power/supply/max17042_battery.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply= /max17042_battery.c index bae0670e2496..823533ea5a17 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -929,8 +929,12 @@ max17042_get_of_pdata(struct max17042_chip *chip) /* * Require current sense resistor value to be specified for * current-sense functionality to be enabled at all. + * maxim,rsns-microohm is the property name used by older DTs and kept + * for compatibility. */ - if (of_property_read_u32(np, "maxim,rsns-microohm", &prop) =3D=3D 0) { + if ((of_property_read_u32(np, "shunt-resistor-micro-ohms", + &prop) =3D=3D 0) || + (of_property_read_u32(np, "maxim,rsns-microohm", &prop) =3D=3D 0)) { pdata->r_sns =3D prop; pdata->enable_current_sense =3D true; } --=20 2.53.0.414.gf7e9f6c205-goog