Re: [RESEND RFC 1/3] nvmem: Add 'of_nvmem_cell_from_device_node()'

From: Andrey Smirnov
Date: Wed Mar 02 2016 - 13:11:42 EST


On Wed, Mar 2, 2016 at 5:58 AM, Srinivas Kandagatla
<srinivas.kandagatla@xxxxxxxxxx> wrote:
> Sorry for so late review comments,
>
>
> On 01/03/16 16:59, Andrey Smirnov wrote:
>>
>> Add 'of_nvmem_cell_from_device_node()' -- a function that allows to
>> obtain 'struct nvmem_cell' from a device tree node representing it. One
>> use-case for such a function would be to access nvmem cells with known
>> phandles.
>
>
> Totally missing the purpose of this new API, Why is of_nvmem_cell_get() not
> useful, its exactly doing same thing.
>
> Unless you randomly want to handle phandles without proper dt bindings.

That about sums up what I was trying to do. In my "composite" driver,
the way the layout of the cell is specified is a 3-element tuple
containing a phandle to nvmem cell, offset within that cell and the
size of the chunk to use, so in order to be able to use that phandle I
introduced this function.

Andrey