Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp959552lqh; Sat, 1 Jun 2024 03:41:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3u0PxJBswFX7VP5bJmLree5VLzXeAjlc5H3LcGxzRTFC1X5cX9BV6iYVAAeojXK9UhNRwtXMUDdqqlvxxtCeILxY9iyuP9g7kzx+mfQ== X-Google-Smtp-Source: AGHT+IF1ZQ+90WrMiwT/PEAOg+nfqiuFVKt6A5L09Or43OJL9YuQKeS6glgm3UpDHFZXdXA74GTZ X-Received: by 2002:a05:6a20:1584:b0:1b0:c1:d8be with SMTP id adf61e73a8af0-1b26f0ec8bdmr7135072637.1.1717238483069; Sat, 01 Jun 2024 03:41:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717238483; cv=pass; d=google.com; s=arc-20160816; b=AK0h5pOM0WjkBWqEk/w/2RkrB8hOCa551bcg49ajT/X6mnAB/gUa8oAU2gCQPfJ1LB NbLjtTJh0SPYGGPv9i2GgUl+9GejiDL53NM6jXU/sLHPTBP+02ykZpR1sG2UZr/0jc/X Lsy913nCBFRyWIS8HKPb5KeEUCg04PCfsQ5vrl3Fw7cJaxGv56y5VqIHyzQkixYVf3nV pbiAaDc/w4DG9nLmx3qbzcgFGVzSvhRwAJvgw9o0jzlXOIdAf2QZ5/BsNF66dHYV/woG X+s038g7ynzYsj7y1JW1AuerlVCrwdqL05HEIIhMP1SIorEVAzZUx9ihHsGdXxkRzZ1C GxXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A8xDEhmQO6uSBKFaek1JW03qLMjL0zrm2CG7qX9hv2g=; fh=/Tm6R0wpW0somhKyi6CjgVFLgzD6IIQQk1NkPTa2bMs=; b=bwczBuZkPLq1xH5K7LIqCkQUh226NIdpF7pLL1bexfN1XvZa9Cn2a8cVM11Jn5VAq4 eztmo1Lf2k+tr2MkQNq4Iu6nRnJRE93hKoW91S6I4uP2L947/i8cf5riD04kiIAa7b0F lLPcrZ/9WGU4LDhmwU6DMxiiZS7Yo7DkuOnZIU34TEJn7sxWR73L0Cfn6QaDin9e5Ss8 /2iLhMsvBPO7y0/QCqDNsYPziZVPXL1zTNYXds9M/712id31jhele11RCt2sDidrSZ42 lnIVIakNGBgjNP2naWq3hofiNG4iInUxJBXFadGv9us7E3Jy0VgI1KuAxiCNnzomF6GJ dMOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=gKtw9kXx; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-197801-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-7024c332736si2432611b3a.201.2024.06.01.03.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 03:41:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197801-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=gKtw9kXx; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-197801-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8938A282C41 for ; Sat, 1 Jun 2024 10:41:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DDED14EC48; Sat, 1 Jun 2024 10:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="gKtw9kXx" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69F0D1DDEA; Sat, 1 Jun 2024 10:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717238474; cv=none; b=GCk35K3XoGiv0pK/B0aTYteFLlt8HLHlnVnqkF5BlfnYBBhWpb5G3fk0dleALwzyC/DxGwAmOmjt/VQ3IHouODhcrBuSNLeZ7/bz9RJVey8g6mRHx/9uPWB2SAQMqBOlPOYmmE6ogF+CJ3U9nh4HNDLbudQ05nPQk9Hw5jbeYwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717238474; c=relaxed/simple; bh=nyxSrVcpxbGL5iI/vXuDn01y3NgVDhxDhqhSgyZeYyI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oT6dr35MypPgcUOLMTmbmLCNcOOUS8CN/FUA0DZH+yLoYk214rz2biomFnXyBrDK8/IZRnd50NdqkX6XAZMkE5f540waxAoDwMDRsi/1+ml3cSpdzS7GJVEehvkeZx2Nxox9fY4wR9/rDWA3RYKlZ3N2XnrbQ0d53WwX2KI9lb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=gKtw9kXx; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1717238461; bh=nyxSrVcpxbGL5iI/vXuDn01y3NgVDhxDhqhSgyZeYyI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gKtw9kXxtAF3HxhCIXp/6uu0k66j2vOZJSvHgKe8M84aY8Ne5MhHy8rdUzQyTeS5h OczKrBMt5Y9jgqT66Fs6T2e3imtWc1T4kgrOYkxudkyRwoHY8KnWBrQCj9eJe/EjUS YWv5Bql1TEAQ1NoS4QsOMA13xeefRzatMxc/bPU8= Date: Sat, 1 Jun 2024 12:41:00 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, Armin Wolf , =?utf-8?B?UmVuw6k=?= Rebe , Wolfram Sang Subject: Re: [PATCH RFT v3 4/4] hwmon: (spd5118) Add support for reading SPD data Message-ID: References: <20240531230556.1409532-1-linux@roeck-us.net> <20240531230556.1409532-5-linux@roeck-us.net> <4cc979c3-3ce0-4f31-b5d0-508e1af5fdf4@roeck-us.net> 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=us-ascii Content-Disposition: inline In-Reply-To: <4cc979c3-3ce0-4f31-b5d0-508e1af5fdf4@roeck-us.net> On 2024-05-31 22:42:24+0000, Guenter Roeck wrote: > On 5/31/24 16:05, Guenter Roeck wrote: > > Add support for reading SPD NVRAM data from SPD5118 (Jedec JESD300) > > compliant memory modules. NVRAM write operation is not supported. > > > > Signed-off-by: Guenter Roeck > > --- > > v3: New patch > > > > RFT: I'd like to get some more test coverage before moving forward > > with this patch. decode-dimms doesn't recognize the 'spd5118' > > driver. > > Looks good to me. Spot-checking against JSED400-5B and the embedded CRC are as expected. > > Looking for feedback: > > [ ... ] > > > + > > + nvmem = devm_nvmem_register(dev, &nvmem_config); > > This returns ERR_PTR(-EOPNOTSUPP) if CONFIG_NVRAM=n. We have two options: > > - Ignore -EOPNOTSUPP and continue registering the hwmon device > > or > > - Add > select NVRAM > select NVRAM_SYSFS > to the driver's Kconfig entry. s/NVRAM/NVMEM/g > Any preferences ? It seems reasonable to support the module without the eeprom logic. When used in a fixed, embedded environment, the eeprom is of limited value as it's known beforehand, while the hwmon functionality is still useful. EEPROM dump in case anyone wants it: 00000000: 3010 1203 0400 2062 0000 0000 b212 0d00 0..... b........ 00000010: 0000 0000 6501 f203 7aaf 0000 0000 c837 ....e...z......7 00000020: c837 c837 906f 80bb 3075 2701 a000 8200 .7.7.o..0u'..... 00000030: 0000 0000 0000 d400 0000 d400 0000 d400 ................ 00000040: 0000 d400 0000 8813 0888 1308 204e 2010 ............ N . 00000050: 2710 1534 2010 2710 c409 044c 1d0c 0000 '..4 .'....L.... 00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000000c0: 1000 8632 8015 8a8c 8213 0000 0000 0000 ...2............ 000000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000000e0: 0000 0000 0000 0f11 0171 0822 0000 0000 .........q.".... 000000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000001f0: 0000 0000 0000 0000 0000 0000 0000 a14d ...............M 00000200: 0198 0823 328e 0a9b e84b 4635 3536 5334 ...#2....KF556S4 00000210: 302d 3332 2020 2020 2020 2020 2020 2020 0-32 00000220: 2020 2020 2020 2000 80ad 4100 0831 3030 ...A..100 00000230: 3139 3738 3700 0000 0000 0000 0000 0000 19787........... 00000240: 0000 4100 0000 0000 0001 0000 0000 0000 ..A............. 00000250: 0100 0000 0000 0000 0000 0000 0000 0000 ................ 00000260: 0000 0001 0100 0000 0000 0000 0000 0088 ................ 00000270: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000280: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000290: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000002f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000300: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000310: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000320: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000330: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000340: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000350: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000360: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000370: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000380: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000390: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000003f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................