From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.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 5621132E6BE for ; Sat, 31 Jan 2026 01:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769824468; cv=none; b=uNKdZV7e1B7w+WIZTYVhBWw7FRa96HTz+QWMNEN4YWg1oESOGCEyux8Xm+9FN2bG9WdkHchHAOjb8WOthqAZ/1xiad2utno3sdcS01QzPIDH6yGrnwhtJ6X9JNdbzvJWjOO3DSFDKmJbUoZUVPD4HxQ6Ov8yT3Ar+WlAxalIlIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769824468; c=relaxed/simple; bh=b89r8oNyxy1f9uIIykaRIblOj8oqKw7wVVQlUEVUVUU=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=kmr3UaC1TEDquCFcfJjVnmGwhuC3b8IoLWyMlqV70914ceAz8kahztf8blBIvXdc9ddV6mRK6sYis3/zMONcy09TLRAhBGEkdzwJ/38vyKNF5RQLi5AJjlao3BSID6zmpNWaXAJPbYFRmswCZu+Ja0e76RKadGGrRjwTqGMHXf8= 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=jA1FSprI; arc=none smtp.client-ip=209.85.217.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="jA1FSprI" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-5f52e500e89so1963823137.0 for ; Fri, 30 Jan 2026 17:54:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769824466; x=1770429266; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=e7HwHD9oJM+lpMAOjIcUYMNhaahqoW4TeyZpr/y0yGY=; b=jA1FSprIyLilP5kkHQxTw/fKYXuAZHs7sPvKPaY+O4LAao0o6DhuUakeEipcpWGnAm 9QCOHDDkDs6AbrXTRNxF97wbhGnxaA3bjOADHmqy6XGt7mos2STP4y4+MREpnziEs1YA iNaYclXWvDaHS6YfTY1WZlgtxIjHR/biPyaGBDq8ieDG1RaJdtZMWkcJ+TNtUmtZH3RQ 9JO4Yr0n/y7yMLGxxooTxrti8gD/b4INic4QDDXl4moohQxPQPlrPl8dtH0DsQrnnyE+ PqfjNUlSAcTu+wx7p96241MdM0AVgGRSuYu09rAwvJjw+9W1CraQgZF2Wl/Sav+H+A9H c5YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769824466; x=1770429266; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=e7HwHD9oJM+lpMAOjIcUYMNhaahqoW4TeyZpr/y0yGY=; b=SmNEQ4LQ9vxdNN0n2FD95IGwHq4n9YJ8clP1UfMH2vIM/XqoLZmeKxcO35yxISuUJc o5RODU5m7NrvaVbQ55YD181v7L0X7x6L4Uf8opsyhR84TxkJi/eaFLNnjxz7ZXDg65Np RwgmM5Xkf9u1HFcaS90YOLrQbxae5Y8sVE0KalZTm0S0Sx/pklsU3Tu4a9nycrp3kmMP He0vwj4Bon5l217Izn5FLZValCTtruaOSq2avgi+W9DOm8Rjrgf9j1T0/ihyq5JIkp+k giHFGFF9Nj0O7ZL1FyQTJZ8ypYZEoh7ya96L7tpO93fPIxX9Maj4lgI2LEdHIB8TpfPD FDTw== X-Forwarded-Encrypted: i=1; AJvYcCWJn53VTaKMFBzT4dXm/AN80y/zsufoh5fnFT355py1AtlxmFZIWA3zWF6WwKnQj22ZlLPKN6FHI4C2cjE=@vger.kernel.org X-Gm-Message-State: AOJu0YzkG5Strj4ad5LFkRZhn8BdzdotybPfKWvJcPOYnrRJdICFERZq 29bRoVVOrXl/C/TZ5n+xXdZs0+yJTk3SvJaWe1cxKqIkdt2v4MmGy4SIuksd5w== X-Gm-Gg: AZuq6aLogztJeJS71RUrFyid9PTyMO+DXEWXndqHWYEF/2ndFH5aqCSEIa7Xbo8s4cH ZNTAwzV9JX6XBEIMOLx+fSu+zxCPqBGAHlCJyukjvn2kHebS8Viu24QHI/ZBbR/zzXdQfGkVfEm XvXJ9S9MgnA/AIeA++TegQIleEsnSsryGvuDU8D/RRfHeSTjmhZBXs90RysjuDB+ya7zZFZZlJ2 PAlH4Ix+UiL6QjKD2qSzYc+KFclJmYDExAKN2QpuiUD+B9gAaE3POewVUWGbpre/B/xUKE+y9Ek m7qnzXPP/s8rfe6zQ1oRI6q25n7I72/JE5mdTqVoKK9xUbn9lN8ozljSMDpUbcCTKOHmYjxYjot Xg9VyAjmuNgxUqAuDBeNt1vWL9JoMUkvCogDRngthAH5rly+XjFVK0C8MICHsIlCfcnPech9d0M mxQIBKrQ== X-Received: by 2002:a05:6102:370a:b0:5f7:24e9:ece2 with SMTP id ada2fe7eead31-5f8e25eab13mr1493517137.28.1769824466299; Fri, 30 Jan 2026 17:54:26 -0800 (PST) Received: from localhost ([2800:bf0:150:1112:fd48:bce3:7e1d:77e2]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-9489e3bfa6csm579444241.1.2026.01.30.17.54.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jan 2026 17:54:25 -0800 (PST) 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 Date: Fri, 30 Jan 2026 20:54:23 -0500 Message-Id: Cc: "Armin Wolf" , "linux-hwmon@vger.kernel.org" , , "Guenter Roeck" Subject: Re: [PATCH 1/3] hwmon: spd5118: Do not fail resume on temporary I2C errors From: "Kurt Borja" To: "Guenter Roeck" , "Kurt Borja" , "TINSAE TADESSE" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <39b48803-e236-4acc-84e9-18162770f9ae@roeck-us.net> <5ecc96da-0c87-45f6-ab57-c3ea8eb28de1@gmx.de> <6249756d-7e49-464e-bb7e-11dfba3085f3@roeck-us.net> In-Reply-To: On Fri Jan 30, 2026 at 8:21 PM -05, Guenter Roeck wrote: > Hi Kurt, > > On 1/30/26 16:55, Kurt Borja wrote: >> On Tue Jan 27, 2026 at 6:41 PM -05, Guenter Roeck wrote: >>> Hi, >>> >>> On Tue, Jan 27, 2026 at 10:23:24PM +0300, TINSAE TADESSE wrote: >>>> >>>> Disabling CONFIG_SENSORS_SPD5118_DETECT completely avoids the issue on >>>> affected platforms, >>>> even without any code changes. This confirms that the failures are >>>> triggered specifically by automatic >>>> SPD5118 instantiation on systems where the i801 controller enforces >>>> SPD Write Disable. >>> >>> Thanks for confirming. Can you try if the patch below fixes the problem= ? >>> It is a wild shot, but it might be worth a try. >>> >>> Thanks, >>> Guenter >>> >>> --- >>> From b44c31c2c779a67827e3144b818cf21f5efacea1 Mon Sep 17 00:00:00 2001 >>> From: Guenter Roeck >>> Date: Tue, 27 Jan 2026 15:32:32 -0800 >>> Subject: [PATCH] hwmon: (spd5118) Explicitly enable temperature sensor = in >>> probe function >>> >>> Instantiating the driver does not make sense if the temperature sensor >>> is disabled, so enable it unconditionally in the probe function. >>> >>> If that fails, write operations to the chip are likely disabled >>> by the I2C controller. Bail out with an eror message if that happens. >>> >>> Signed-off-by: Guenter Roeck >>> --- >>> drivers/hwmon/spd5118.c | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/drivers/hwmon/spd5118.c b/drivers/hwmon/spd5118.c >>> index 5da44571b6a0..3e0e780014f9 100644 >>> --- a/drivers/hwmon/spd5118.c >>> +++ b/drivers/hwmon/spd5118.c >>> @@ -552,6 +552,11 @@ static int spd5118_common_probe(struct device *dev= , struct regmap *regmap, >>> if (!spd5118_vendor_valid(bank, vendor)) >>> return -ENODEV; >>> =20 >>> + if (regmap_update_bits(regmap, SPD5118_REG_TEMP_CONFIG, >>> + SPD5118_TS_DISABLE, 0) < 0) >>> + return dev_err_probe(dev, -ENODEV, >>> + "Failed to enable temperature sensor\n"); >>> + >>> data->regmap =3D regmap; >>> mutex_init(&data->nvmem_lock); >>> dev_set_drvdata(dev, data); >>=20 >> Hi Guenter, >>=20 >> I'm experiencing the same issue reported in this thread. This patch does >> not fix it for me :(. >>=20 > Thanks for a note. Well, it was a wild shot, so it is not entirely surpri= sing > that it didn't work. I suspect regmap doesn't actually write the register > if the value is unchanged. Another option might be to try writing a value I tried forcing the write with bool change; err =3D regmap_update_bits_base(regmap, SPD5118_REG_TEMP_CONFIG, SPD5118_TS_DISABLE, 0, &change, false, true); if (err) return dev_err_probe(dev, err, "Failed to enable temperature sensor\n"); and it fails to probe spd5118 17-0051: error -ENXIO: Failed to enable temperature sensor spd5118 17-0053: error -ENXIO: Failed to enable temperature sensor > (e.g., 0x01) into register 0x13 or 0x14. Those are "clear status" registe= rs. > If that fails, we would know that the chip is write protected. I'll try this later too. > > Thanks, > Guenter --=20 Thanks, ~ Kurt