lkml.org 
[lkml]   [2020]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/2] nvmem: add ONIE NVMEM cells support
From
Date


On 01/06/2020 10:03, Vadym Kochan wrote:
>>> +
>>> + nvmem = of_nvmem_device_get(np, NULL);
>>> + if (IS_ERR(nvmem))
>>> + return PTR_ERR(nvmem);
>>> +
>> TBH, this looks completely incorrect way to do this and misuse of nvmem
>> consumer interface.
>>
>> Ideally nvmem provider driver should populate "cells" in struct nvmem_config
>> after decoding them and then register nvmem provider.
>>
>> That should just work!
>>
>>
>> --srini
> But this is not nvmem provider but just describes the cells for any
> nvmem device, because ONIE uses special TLV structure on the nvmem
> device. So from the nvmem device point it is a consumer but provides the cells
> for the given device.

That still falls under nvmem providers responsibility to parse these
cells before registering it.

BTW, where is the provider driver for this in kernel?


--srini

>

\
 
 \ /
  Last update: 2020-06-01 11:15    [W:0.090 / U:2.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site