From: Stefan Wahren <stefan.wahren@i2se.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-arm-kernel@lists.infradead.org
Cc: wxt@rock-chips.com, linux-api@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Kumar Gala <galak@codeaurora.org>,
arnd@arndb.de, sboyd@codeaurora.org, s.hauer@pengutronix.de,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
mporter@konsulko.com, pantelis.antoniou@konsulko.com,
ezequiel@vanguardiasur.com.ar, Mark Brown <broonie@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v7 0/9] Add simple NVMEM Framework via regmap.
Date: Mon, 13 Jul 2015 22:11:10 +0200 (CEST) [thread overview]
Message-ID: <139301016.164015.1436818270753.JavaMail.open-xchange@oxbsltgw04.schlund.de> (raw)
In-Reply-To: <55A4131C.7040700@linaro.org>
Hi Srinivas,
> Srinivas Kandagatla <srinivas.kandagatla@linaro.org> hat am 13. Juli 2015 um
> 21:35 geschrieben:
>
> On 13/07/15 19:54, Stefan Wahren wrote:
> > Hi Srinivas,
> >
> >> [...]
> >>
> >> Providers APIs:
> >> nvmem_register/unregister();
> >
> > How do i get the cell info from the devicetree into the nvmem_config?
> >
> Not sure what is the real use-case here, But this is how it is supposed
> to work.
>
> cellinfo in nvmem_config is used to pass cell information in non-dt
> style to the core. The core would parse it and convert into nvmem-cells.
> Am not sure why would you want to do other way round. Could you explain
> the real use case here?
>
my question comes from porting mxs_ocotp to NVMEM framework.
Here is the devicetree part:
ocotp: ocotp@8002c000 {
compatible = "fsl,imx28-ocotp", "fsl,ocotp";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x8002c000 0x2000>;
clocks = <&clks 25>;
read-only;
/* Data cells */
ocotp_customer: costumer@20 {
reg = <0x20 0x10>;
};
ocotp_rom0: rom0@1a0 {
reg = <0x1a0 0x4>;
};
};
After calling nvmem_register() in the provider driver [1] no data cell is
registered. So
i looked at the core code and i thought that retrieving the cell info and put it
into the nvmem_config
is job of the provider driver.
Did i missed something?
[1] -
https://github.com/lategoodbye/fsl_ocotp/commit/7c98e19755b69f761885b0e1ceb2c258a7c47ade
>
>
> >
> ...
>
> >> userspace interface: binary file in /sys/bus/nvmem/devices/*/nvmem
> >>
> >> ex:
> >> hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
> >>
> >> 0000000 0000 0000 0000 0000 0000 0000 0000 0000
> >> *
> >> 00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00
> >> 0000000 0000 0000 0000 0000 0000 0000 0000 0000
> >> ...
> >> *
> >> 0001000
> >
> > Since we're entering userspace the behavior should be clear.
> >
> > How do we treat register gaps? Fill them with zero?
> nvmem file would read full nvmem size which is passed to it as regmap.
> So It would dump whatever the provider returns.
Sure, but wouldn't it be nice if different provider behave the same?
>
>
> --srini
> >
> > Best regards
> > Stefan
> >
next prev parent reply other threads:[~2015-07-13 20:11 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 9:43 [PATCH v7 0/9] Add simple NVMEM Framework via regmap Srinivas Kandagatla
2015-07-10 9:44 ` [PATCH v7 2/9] nvmem: Add a simple NVMEM framework for consumers Srinivas Kandagatla
[not found] ` <1436521495-10728-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 10:42 ` Joe Perches
2015-07-13 19:06 ` Stefan Wahren
2015-07-13 19:24 ` Srinivas Kandagatla
2015-07-10 9:45 ` [PATCH v7 3/9] nvmem: Add nvmem_device based consumer apis Srinivas Kandagatla
[not found] ` <1436521505-10779-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 10:49 ` Joe Perches
2015-07-14 22:06 ` Stephen Boyd
[not found] ` <20150714220607.GP30412-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-07-15 8:21 ` Srinivas Kandagatla
2015-07-10 9:45 ` [PATCH v7 4/9] nvmem: Add bindings for simple nvmem framework Srinivas Kandagatla
[not found] ` <1436521513-10838-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 19:04 ` Rob Herring
[not found] ` <CAL_JsqKYT-+T=D=TKCb1TcydOvBTE8_yc-EEe1cwdmhr1B0dHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-13 10:21 ` Srinivas Kandagatla
2015-07-10 9:45 ` [PATCH v7 5/9] Documentation: nvmem: add nvmem api level and how-to doc Srinivas Kandagatla
[not found] ` <1436521521-10889-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-14 21:32 ` Stephen Boyd
2015-07-14 22:00 ` Srinivas Kandagatla
2015-07-10 9:45 ` [PATCH v7 6/9] nvmem: qfprom: Add Qualcomm QFPROM support Srinivas Kandagatla
[not found] ` <1436521529-10931-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-14 21:18 ` Stephen Boyd
[not found] ` <20150714211831.GN30412-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-07-14 22:02 ` Srinivas Kandagatla
2015-07-10 9:45 ` [PATCH v7 8/9] nvmem: sunxi: Move the SID driver to the nvmem framework Srinivas Kandagatla
2015-07-10 9:46 ` [PATCH v7 9/9] nvmem: Add to MAINTAINERS for " Srinivas Kandagatla
[not found] ` <1436521427-10568-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 9:44 ` [PATCH v7 1/9] nvmem: Add a simple NVMEM framework for nvmem providers Srinivas Kandagatla
[not found] ` <1436521486-10682-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 10:29 ` Joe Perches
2015-07-10 10:39 ` Srinivas Kandagatla
2015-07-13 16:50 ` Philipp Zabel
2015-07-10 9:45 ` [PATCH v7 7/9] nvmem: qfprom: Add bindings for qfprom Srinivas Kandagatla
2015-07-13 18:54 ` [PATCH v7 0/9] Add simple NVMEM Framework via regmap Stefan Wahren
2015-07-13 19:35 ` Srinivas Kandagatla
2015-07-13 20:11 ` Stefan Wahren [this message]
[not found] ` <139301016.164015.1436818270753.JavaMail.open-xchange-0SF9iQWekqKZU4JK52HgGMgmgJlYmuWJ@public.gmane.org>
2015-07-13 21:39 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=139301016.164015.1436818270753.JavaMail.open-xchange@oxbsltgw04.schlund.de \
--to=stefan.wahren@i2se.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mporter@konsulko.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=wxt@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox