From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) (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 0362A36F421 for ; Wed, 20 May 2026 17:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297019; cv=none; b=gwgPqLN+u+t8IPRbFMVxQ4AOJk9yme6VqWP6ATC7zclgt2PLUuN/f3KumYII/c8pzqaCkYT9XcytMQJw3IGdSrSLTwpPTjUFjco3p6DwrXjRc6d34TLyrivQOK4S/bQy2LX6k6CuiG3eUY2Ue66XOoh2buaYaLDEcHx4pfc3c0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297019; c=relaxed/simple; bh=WRjV1fblvYAQ22vZ0eqwhU4cl3qJbPBDiN5/spvOquc=; h=Content-Type:Date:Message-Id:Cc:Subject:From:To:Mime-Version: References:In-Reply-To; b=ZNiBaQNFzTBYe3xYIiI2Y7MEmJl6hKjd7JhMA6KEf+RyhIKWVaoZnqbp2tmE0uZnbVDzFIkUnn5Sn07JsbAHqjfWlAE9mnshBj0sD6gqi8tEARmm1RBLK+fROXrML5/pZlgGLE/d7E7Knzu9RpZWCnxhJaoIzwTQkSKLEMJoiAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nexthop.ai; spf=pass smtp.mailfrom=nexthop.ai; dkim=pass (2048-bit key) header.d=nexthop.ai header.i=@nexthop.ai header.b=kgOTCnr4; arc=none smtp.client-ip=74.125.82.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nexthop.ai Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nexthop.ai Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nexthop.ai header.i=@nexthop.ai header.b="kgOTCnr4" Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-12c8f9846c8so6116189c88.0 for ; Wed, 20 May 2026 10:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexthop.ai; s=google; t=1779297017; x=1779901817; darn=vger.kernel.org; h=in-reply-to:references:content-transfer-encoding:mime-version:to :from:subject:cc:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=WRjV1fblvYAQ22vZ0eqwhU4cl3qJbPBDiN5/spvOquc=; b=kgOTCnr4iddIuKdp+BhE9fK9Mt2bZ3S3aRzEufl6VclCT6WQtDrrHJfXV4ylSnT/DP p2tClAHROUpnRwN2haiaCqw+Z6RELm3JvNYSD/X96OOPV3//cYAfxYFbjb1anueF55d9 /4x9oyv5mAMU7NG0lN/mhqcpIkjiJNZCPd3iUsB0bLVv2Rhw8XdsstEGPgRwwHCTMxaQ MF5IwEaekIEZbTBawcb2d3f3iuciQYU489ZUNWyNUWg0Ez5PeIRSGjd42jxUQdX10Hso PLZZv0U2C91V+3R4gyRlfp0Ziu/jF4jokg1K/X+TO662jk53gvw3g0gurppH+E7989Su kSHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779297017; x=1779901817; h=in-reply-to:references:content-transfer-encoding:mime-version:to :from:subject:cc:message-id:date:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WRjV1fblvYAQ22vZ0eqwhU4cl3qJbPBDiN5/spvOquc=; b=A1bSIVFRQzMklswjhs7r1AyAjQfwVv0Odr10eEm8SntteZD15SDJG2/afs9JU/FYod Ps7bsqLHR658t/GqJAxrnBh+zN9+Tun9HpHNahHL4YdRGkduzeLu/HMcgWiHsppHvQpf qHX86PrnHZwHXoiseSp/01gpSrYJX1g7LDU5WeHQ401Uub6RMv7NE/YshBOg6eSuWQ3b IerhVhahWlexummqS4rrX4UmS9+UgbXrj4fUiiELgS3X/SY6N5gaJs9iQ8OzKc4WBVkY mRAW4azVY0O6JFfR4ere+MMDofk2pz1aPBZ4kCcn1diQRXCCyYu0LkezXbTaJpc+LqBD nahA== X-Forwarded-Encrypted: i=1; AFNElJ9AKgdKtDFHxZfA/95jbd21LjujijFcS81XYTOcWN0wXcEkFof08vBYm0f95H9RwtuPdO3BXAJhVRPfBqM=@vger.kernel.org X-Gm-Message-State: AOJu0YxXp4FlDIuizjrRrUxhoVDUxx523R4epWl4q6sa8GpXoK6OPmKW IXoVRK2TOY6Nkofc6L2vAyB0moZpRdJdaJFWPeJM2S/95bHhCl/Eip4u5YhX9D2HPtw= X-Gm-Gg: Acq92OEL5sso32m97D49Vi66WIGIpk6rbeTHPkAznA4uVEp8BFzd0eqeUEOs3bmhZKp KBpTiQqHyOvngC05AcXbNnbMkgK8fhex7jGfEqVga41BTQCL7nU7mDW0NxTsd6iFKYVHINMKTg1 bM02os834iqrC23z+Rm+35Ledqkzj/JPcIQF0uL5bfmZ24iUxh1cbCaw56Q6gX2g5qHLfkQYOVK rQdyqU2P9Uomo1fqMZFSE16+BNBAGg+gYbh0vnbLsE6YAxr/oEJZTa28fo68oACVjwNpy3fGFdc pkg+mB6dfsvaiLmoP3ner4KC4OZ3OZl8gBP+MlC+xwI7cedKPHFrh0Cb3YW0tHpiOvJDIhwV8ad WESLDZBexu2PiSLTklNYIcO5XsU79ov+UqXTtwXoY7Q+40ECs6n8TsMEKMobeFZ/3jg4OlBBTqa FPJ9OMj5C/N+nZZVAzEu+iTMA= X-Received: by 2002:a05:7022:40d:b0:135:31e7:4e62 with SMTP id a92af1059eb24-13531e75045mr8225611c88.13.1779297016998; Wed, 20 May 2026 10:10:16 -0700 (PDT) Received: from localhost ([50.145.100.174]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-134cbcb9ef5sm26085229c88.2.2026.05.20.10.10.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 May 2026 10:10:16 -0700 (PDT) Content-Type: text/plain; charset=UTF-8 Date: Wed, 20 May 2026 10:10:15 -0700 Message-Id: Cc: , , , "Guenter Roeck" Subject: Re: [PATCH v4 0/3] hwmon: (pmbus/adm1266) add clear_blackbox and powerup_counter debugfs entries From: "Abdurrahman Hussain" To: "Guenter Roeck" , "Abdurrahman Hussain" , "Alexandru Tachici" 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 X-Mailer: aerc 0.21.0 References: <20260516-adm1266-v4-0-1f8df4797258@nexthop.ai> In-Reply-To: On Wed May 20, 2026 at 7:10 AM PDT, Guenter Roeck wrote: > Hi, > > On 5/16/26 18:18, Abdurrahman Hussain wrote: >> This is what remains of the v3 series after Guenter applied patches >> 1/5 (firmware_revision) and 5/5 (GPIO line label) to hwmon-next, and >> asked for patch 4/5 (rtc_class) to be dropped. >>=20 >> Patch 1 adds a write-only clear_blackbox debugfs file. Devices >> configured for single-recording mode (BLACKBOX_CONFIG[0] =3D 0) need >> an explicit clear once the 32-record buffer fills; the documented >> sub-command ({0xFE, 0x00} block-write to 0xDE) wasn't reachable >> from userspace. The patch also acquires pmbus_lock at the >> adm1266_nvmem_read() callback boundary so the memset of >> data->dev_mem, the blackbox refill, and the memcpy to userspace run >> as a single critical section -- the nvmem core does not serialize >> concurrent reg_read calls. >>=20 >> Patch 2 exposes the non-volatile POWERUP_COUNTER (0xE4) via debugfs. >> The same value is embedded in every blackbox record, so the live >> value lets userspace match a captured record back to the boot it >> came from when correlating logs. The block-read is taken under >> pmbus_lock to serialise against any pmbus_core PAGE+register >> sequence on the device. >>=20 >> Patch 3 takes pmbus_lock in adm1266_state_read() (the pre-existing >> sequencer_state debugfs handler) for the same defensive-locking >> reason that motivates the new debugfs files in patches 1 and 2: >> any direct device access from outside pmbus_core should be ordered >> with respect to pmbus_core's own PAGE+register sequences. >>=20 >> Signed-off-by: Abdurrahman Hussain > > The series no longer applies after applying the bug fix series. > Please rebase it on top of the hwmon-next branch of > git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git > and resubmit. > > Sorry for the trouble, and thanks a lot for fixing all the problems > with the driver. > > Guenter Will do, thank you for your support! Abdurrahman