Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp25972lqj; Sat, 1 Jun 2024 06:48:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBo1V44q+PAN870Svnh9Yj0LsUnnjadMIupybut97j1Ysm6NlV5nx3F2PdIWHorZsArvQPZ83y00GRH0id5ewh3kZ0VBfUtJzXyJf6+w== X-Google-Smtp-Source: AGHT+IFD/hZ3EqIJCKI1ksMjuzAbSdpEVwoijhRTp23xmjndGj2DipnR/J8zWm7PcdYKQ3gD2eG0 X-Received: by 2002:a05:6a20:da95:b0:1b0:c39:f41d with SMTP id adf61e73a8af0-1b26f275926mr4969674637.50.1717249723874; Sat, 01 Jun 2024 06:48:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717249723; cv=pass; d=google.com; s=arc-20160816; b=ufXj61ZraQqGaaverGKuwwe4AxKi6vY6RER8r9D2MghBpnbuYA27bOeRDdtQL58NzG Q6Jj0ZMuA3gnvrwQhpw+/ASqfu6MGLKhRI69YwJRNfqy8t56rIJ2EJhMjIRyQ59X4gaa McZjvIf2fh0BKxXwhBQkVSWvYVQ7Xz4e7gqwz6MqtTeZoXAi9+90nnCDpVtu999UwvMY mbUfHU9iO38KtlqFJXr0nHV5XVwMvNGvyxwdC7jy7gfjxhu+sgPmb3qJU1/ft5r0KEK4 y2QIdqBNJgEZ02Rgy1hUabbAIGPRKhJTfphe2WQG1FIGch7uL0QNYXcbBNkA+i1NtBKW YVNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=QoCW09jr3jVeTddViA4yageOc6j/1e0Ds9tGi/4QtGQ=; fh=nwjEFfVSt579+FZxA9jmghjnpBy35YzopOjUZrTgRyA=; b=Et/0rxb86b1t8Dp+vhxBUz2eMukLgSfvD+a39EbgrS4ydI0dj3IZD8FwgT7cKA4lcR X+oPr0D9fkDI5q31h7fXaVKrOSNb0OiRfVdmHrC2tBllUyNr2LuTMAIAb8M+LKMhqbPk MBgaJDNyUNWQyi2r2/t1I6r5AHpnmwNch2SSgUUuXCvJGe+iNNm+0w+/g5AFTXL/NpC+ i0/udo14VdP3PNEttprEKF7iA0BS25w3+35b5Mawi0OvrKjezXYn6+oh+qhi4MTR7vBX VwUi8isQe9/fOAhoecRuxxKod1I0RFv+T1t7KV4CNEDTa6MbrfryBYJ+Y7VcIXg1IxM1 /gFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PJdUat70; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-197878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197878-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-702425e45c9si3323238b3a.47.2024.06.01.06.48.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 06:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PJdUat70; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-197878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197878-linux.lists.archive=gmail.com@vger.kernel.org" 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 7CE3F283671 for ; Sat, 1 Jun 2024 13:48:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9669915216F; Sat, 1 Jun 2024 13:48:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PJdUat70" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 1B2F114267; Sat, 1 Jun 2024 13:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717249714; cv=none; b=F3Ieb+BpIL2ydy+VTBGGdRyn9a3zziJnKdTCOsYcIVl7iQPnYxvh0ODhMfFPjE5/YKySYnSM8krA73FHRZjDsQ1r1RxBqW8zd2K1FutBxoHaDdMsDW9eo9kUZ2G7wda5yM4tfprFlWj6JroIMaMFbZzKrPbkYW+NlHQ9CiPn5Xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717249714; c=relaxed/simple; bh=YHM4E/Qtjr3WJltOS928HYUCDOSCEdmRJxSslboKT4A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fW/I8CBZIL6tTTYlPXdZa4DoiHvud8R0Qqe8StwgTYVsDaBJtAJrE9KdJbstLzSaT9nhte6bfyxXZL/MhlzCY5y64mHN5kKz1VZVlFPXPcp/oLZoVRR1tzuN1SxPuZQ2UoLeDsrOcP8ZpBHPiV+oBJQi4+/N6DPiETowj/I2wOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PJdUat70; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-6c9e8c0a15bso96749a12.3; Sat, 01 Jun 2024 06:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717249712; x=1717854512; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=QoCW09jr3jVeTddViA4yageOc6j/1e0Ds9tGi/4QtGQ=; b=PJdUat70fC6VL7G5Fl4Pl38Rb1FCHfiZf8L9jy/hM4GTqoem8P7tAbGk2sAYuBWy+k WjLxxuAZ+bb17zPsGi1q/LJwlejsWAz1lJ4+gsaptXVeO6v49yjsU3xprMn91v85jpSO FIpc0FrxDuBZdSvTBxC8P7/8GwKPFJGPWZciJ3UDaBulTXpyYAO/hhUfErJfKRrgi41v NYDSXJcX0Huyyu9ABxV65AJ1iONi2wdfI6FdkQ/nk8yusYF8tyny/P1GL+1Onxjtagl6 GK3IPCVsZSFIy5IIAnXQ7xV2mcUEUivoTfTZ+cjqyGL5YDkDMtbB3GH1liR8m1yzrBh2 Mi3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717249712; x=1717854512; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QoCW09jr3jVeTddViA4yageOc6j/1e0Ds9tGi/4QtGQ=; b=oeMbEUVUqZ4Po1hH1dO7o27w//qQ0nEg/0wqQUlhynOgE8QciHGl2GymdMGe3lf5Tv T2ZvOBH5EEWBJfD0sBsh+nqqoorQavLS5/dUJzSF5s5lxVn84r1XypA1H5qoRBN2FBMZ hclhNiBrvNnKIzh0y4wekq5gYpQVC2vwo2e58zbx05oBmbgicPfETMIPgg4eiJgG5tg1 C7b4uO3V1WzckxEoM95OnbuTiiUPZR/phaNCloZX8g8e93GvXwtA7rQmUbGrrSO/HlDW 2U9RzkhsWTMvhE3/UsEJ1nshRU0a1vH8LlWAYwvHbtjuV4P7Aw6AkfYfpOHBmkoq0L4W 3X8Q== X-Forwarded-Encrypted: i=1; AJvYcCW/3uZDu0zFFKAYLAiBh7hcE+ElbhHaxgKLmSHxQu80DDISn5nzGR0UHeEGC9bDHtfARJbyBxdQBZAnWoq8Zw2EScspKTaU/lzutp0VmgwSVXP2iJYpOYetmxF6uw5Z7kgBMQiznUvhJg== X-Gm-Message-State: AOJu0Ywk0k+Tx90hXjuemtpSSPkUqQNF+pbEmqmbCPrcKa37dViKEIbk KZHgU6iR9bpIc8V8jYivL5rM35Pk1Ypu8KmYetQdR7wAvfteFpSbee7rBw== X-Received: by 2002:a05:6a20:7f89:b0:1b0:25b6:a749 with SMTP id adf61e73a8af0-1b26f275972mr4762950637.48.1717249712133; Sat, 01 Jun 2024 06:48:32 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c1c6482dc7sm3082846a91.44.2024.06.01.06.48.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jun 2024 06:48:31 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Sat, 1 Jun 2024 06:48:29 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFT v3 4/4] hwmon: (spd5118) Add support for reading SPD data To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= 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?Q?Ren=C3=A9_Rebe?= , Wolfram Sang References: <20240531230556.1409532-1-linux@roeck-us.net> <20240531230556.1409532-5-linux@roeck-us.net> <4cc979c3-3ce0-4f31-b5d0-508e1af5fdf4@roeck-us.net> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv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5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/1/24 03:41, Thomas Weißschuh wrote: > 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. > Makes sense. Another question: This: + struct nvmem_config nvmem_config = { + .type = NVMEM_TYPE_EEPROM, + .name = dev_name(dev), + .id = NVMEM_DEVID_AUTO, results in: $ ls /sys/bus/nvmem/devices 0-00501 0-00512 0-00523 0-00534 cmos_nvram0 ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ which really doesn't look good. My current plan is to go with NVMEM_DEVID_NONE, which results in $ ls /sys/bus/nvmem/devices 0-0050 0-0051 0-0052 0-0053 cmos_nvram0 We could also used fixed strings, but "spd" results in "spd[1-4]" which I think would be a bit misleading since the DDR3/4 SPD data format is different, and "spd5118" would result in "spd5118[1-4]" which again would look odd. Any suggestions ? Thanks, Guenter