Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp35820lqj; Sat, 1 Jun 2024 07:08:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUTT1DpnbGPO6OJQl5zSgr+KAR3sGs7lKqlUDvnWEgDg9CF0RagIODdFNX0NcQnjC23jAFIPN9HoJV3whYDOi2OSFArfMsVCo0no6eQw== X-Google-Smtp-Source: AGHT+IGmhQOOurglTpshBc/9WpZQumA6yv6J+8ef9dcYrANT3jjhjPlt0uDgVCZYJlopp+sATWmJ X-Received: by 2002:a05:6a20:12c3:b0:1af:9ee6:25c4 with SMTP id adf61e73a8af0-1b26f2cc341mr5085902637.42.1717250914842; Sat, 01 Jun 2024 07:08:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717250914; cv=pass; d=google.com; s=arc-20160816; b=qBkiSNl+v4kOrY2IRajvpeUx0tk3zdrS7N01hCjp6SjGPG64aiD54CX/CXG5d2KPEb sPTHJOFhtWIILPEvvrdPmGS36UN/+zpJGILUcVsgWcRQtwF0Vmuz0/Yk4oi7FxjTPI69 K+6Aw7i4cJbhTRCKxtiNXMBjkX0WLLuw/L1tcqachEr21oaZ2HsEKf4z+Z+ytJNuFmZr WiRvUwUPaQVz3cW0PYb1JWJiM/6bfvt01DzCP3kxvetAIDgaAP4GglwKKRebTyG25LVq tLDlbtoHvQvfTx8kXc0mFsDU6dWPAdMvIo0kjzEg0fbtnK8o3nAltIn/1dUzVdWy7sre 2jIw== 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=L+hktY9sZFkqhvTujVlIatRRepv0zhM8CIr5fl3d0+4=; fh=/Tm6R0wpW0somhKyi6CjgVFLgzD6IIQQk1NkPTa2bMs=; b=oYTBiHiEaQXihzRHVJZvIg7Q6Sui7BEOeTqNAGLvg2HvjQObJjS1twf+8Ktf5a+y2h hbhWmyknD2vR2jfVwDLDAfURhjs0h5mDZTMGaTg3pzqUjQVtpfWFj+HJN5D/0jtrctGs KMEh9/v8Ydo08ICYDl0jJpeDLkiExCzaJSVBfqtof7wSdjQykG22Wn/a2vDkokCZnunQ kFWpfAI1CV+XoLkG7959+zswIgjp6konmyqBJGBspMBHPpWsdUHuZEyKzF6Yci6aeXwy WWe+UI8WYsU/WAPrC0RfO/dw0YT9kmMc5T9jlnc7jXGbjMiKtwz15xDgP+Yjtwa3e/Xo JOew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=PLkAcVrs; 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-197887-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197887-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70242b09c8asi3509304b3a.147.2024.06.01.07.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 07:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197887-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=@weissschuh.net header.s=mail header.b=PLkAcVrs; 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-197887-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197887-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 750392836B9 for ; Sat, 1 Jun 2024 14:08:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A95E15218D; Sat, 1 Jun 2024 14:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="PLkAcVrs" 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 0E8E214F9D4; Sat, 1 Jun 2024 14:08:24 +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=1717250907; cv=none; b=fweGPyLsYbDGIlV/hrQTKVF8+UJCImnNh24jrCi8T2yEaLmTGme14+iqwr97T5Ayp17uMFeqFt9kki03etb/hmNZN/AUGfLmLCazYL31Iumz0IfdVfjkYWsY78YdiYQIRtAY3dv1jd5eeCOEL9D5yxquToO0nzhkwwtwzvu4yFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717250907; c=relaxed/simple; bh=XdHCjPgAtnKwKDYqo1E0YVPmLCGTMK96lhXNY+SzVns=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D0DrxT/qgOzXBWbt58LyXZQLfCChHniS7AO8gzfNhiBqw1RzSjvWnlIYlk6xPunkjeCdl+b4xbjRqrqpeUPmTkxF9AL8qtVpXNN8VkxalujxzeBVhk3M7nIYhI0IipPWq/cu2k25Uo8Q1EH2QWjfGMxxsquRLgtgKUGpSlJ2UIw= 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=PLkAcVrs; 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=1717250902; bh=XdHCjPgAtnKwKDYqo1E0YVPmLCGTMK96lhXNY+SzVns=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PLkAcVrsPQAN1EBg9x/4wvqUt5p5Id1LwI8nC3c5wwR0P/OUHRuV08TsRFq0Zbbe5 OJQki1bCdZrj7tZbVEWO6U84fXFvysezdplknjgHAzKIDJr0yb9VAA/HjPviid0o+g cEByXaibwcvvatbYJITBiQBAXLnEUa8Bi/p2ds2o= Date: Sat, 1 Jun 2024 16:08:22 +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: <4e4341e4-2165-40d4-909c-9d5164e97942@t-8ch.de> 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: On 2024-06-01 06:48:29+0000, Guenter Roeck wrote: > 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 ? In order of descending, personal preference: * spd-ddr5-[0-3] (.id = client->address - 0x50) * spd-ddr5-[0-3] (NVMEM_DEVID_AUTO) * Same with only "ddr5-" * spd5118-[0-3] * Your proposal from above * nvmem[0-3] (default handling) * 0-0050-[0-3] Also can't a user of the eeprom already figure out which kind of module it is by looking at the eeprom contents? The first few bytes used for that seem to be compatible between at least DDR4 and DDR5. So using plain spd[1-4] could be enough.