[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5f28ef1-53ef-4f82-abb3-2b60dc468793@roeck-us.net>
Date: Sat, 1 Jun 2024 06:48:29 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-kernel@...r.kernel.org,
Armin Wolf <W_Armin@....de>, René Rebe <rene@...ctcode.de>,
Wolfram Sang <wsa+renesas@...g-engineering.com>
Subject: Re: [PATCH RFT v3 4/4] hwmon: (spd5118) Add support for reading SPD
data
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 <linux@...ck-us.net>
>>> ---
>>> 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
Powered by blists - more mailing lists