All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Stefan Wahren <stefan.wahren@i2se.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org, arnd@arndb.de,
	ezequiel@vanguardiasur.com.ar, linux-api@vger.kernel.org,
	s.hauer@pengutronix.de, sboyd@codeaurora.org,
	linux-kernel@vger.kernel.org, pantelis.antoniou@konsulko.com,
	Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	mporter@konsulko.com, linux-arm-msm@vger.kernel.org,
	wxt@rock-chips.com
Subject: Re: [PATCH v7 0/9] Add simple NVMEM Framework via regmap.
Date: Mon, 13 Jul 2015 20:35:56 +0100	[thread overview]
Message-ID: <55A4131C.7040700@linaro.org> (raw)
In-Reply-To: <1984575203.163267.1436813665815.JavaMail.open-xchange@oxbsltgw06.schlund.de>



On 13/07/15 19:54, Stefan Wahren wrote:
> Hi Srinivas,
>
> [add Ezequiel Garcia to CC]
>
>> Srinivas Kandagatla <srinivas.kandagatla@linaro.org> hat am 10. Juli 2015 um
>> 11:43 geschrieben:
>>
>>
>> Hi Greg,
>>
>> This patchset adds a new simple NVMEM framework to kernel, and it is tested
>> with various drivers like "QCOM thermal sensors", "QCOM cpr driver",
>> "begal bone cape manager" and few more on the way.
>>
>> Thankyou all for providing inputs and comments on previous versions of this
>> patchset. Here is the v7 of the patchset addressing all the issues raised as
>> part of previous versions review.
>>
>> Up until now, NVMEM drivers like eeprom were stored in drivers/misc, where
>> they
>> all had to duplicate pretty much the same code to register a sysfs file, allow
>> in-kernel users to access the content of the devices they were driving, etc.
>> This was also a problem as far as other in-kernel users were involved, since
>> the solutions used were pretty much different from on driver to another, there
>> was a rather big abstraction leak.
>
> i only want to mention that there are more places of NVMEM drivers like:
>
> drivers/mfd/ab3100-otp.c
> drivers/soc/tegra/fuse/*.c

Thanks for mentioning.

>
>>
>> Introduction of this framework aims at solving this. It also introduces DT
>> representation for consumer devices to go get the data they require (MAC
>> Addresses, SoC/Revision ID, part numbers, and so on) from the NVMEMs.
>>
>> After learning few things about QCOM qfprom and other eeprom/efuses, which
>> has packed fields at bit level. Which makes it important to add support to
>> such memories. This version adds support to this type of non volatile
>> memories by adding support to bit level nvmem-cells.
>>
>> Having regmap interface to this framework would give much better
>> abstraction for nvmems on different buses.
>>
>> patch 1-4 Introduces the NVMEM framework.
>> Patch 5-6 Adds Qualcomm specific qfprom driver.
>> Patch 7 migrates an existing driver to nvmem framework.
>> Patch 8 adds entry in MAINTAINERS.
>>
>> Its also possible to migrate other nvmem drivers to this framework, and I
>> think
>> some of them already posted patches based on this framework.
>>
>> 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?


> I expected a function something like of_nvmem_cell_info_get() in the Providers
> API.


>
...

>> 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.


--srini
>
> Best regards
> Stefan
>

WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Stefan Wahren <stefan.wahren@i2se.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org
Cc: wxt@rock-chips.com, linux-api@vger.kernel.org,
	Kumar Gala <galak@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	sboyd@codeaurora.org, arnd@arndb.de, s.hauer@pengutronix.de,
	linux-kernel@vger.kernel.org, mporter@konsulko.com,
	linux-arm-msm@vger.kernel.org, pantelis.antoniou@konsulko.com,
	Mark Brown <broonie@kernel.org>,
	devicetree@vger.kernel.org, ezequiel@vanguardiasur.com.ar
Subject: Re: [PATCH v7 0/9] Add simple NVMEM Framework via regmap.
Date: Mon, 13 Jul 2015 20:35:56 +0100	[thread overview]
Message-ID: <55A4131C.7040700@linaro.org> (raw)
In-Reply-To: <1984575203.163267.1436813665815.JavaMail.open-xchange@oxbsltgw06.schlund.de>



On 13/07/15 19:54, Stefan Wahren wrote:
> Hi Srinivas,
>
> [add Ezequiel Garcia to CC]
>
>> Srinivas Kandagatla <srinivas.kandagatla@linaro.org> hat am 10. Juli 2015 um
>> 11:43 geschrieben:
>>
>>
>> Hi Greg,
>>
>> This patchset adds a new simple NVMEM framework to kernel, and it is tested
>> with various drivers like "QCOM thermal sensors", "QCOM cpr driver",
>> "begal bone cape manager" and few more on the way.
>>
>> Thankyou all for providing inputs and comments on previous versions of this
>> patchset. Here is the v7 of the patchset addressing all the issues raised as
>> part of previous versions review.
>>
>> Up until now, NVMEM drivers like eeprom were stored in drivers/misc, where
>> they
>> all had to duplicate pretty much the same code to register a sysfs file, allow
>> in-kernel users to access the content of the devices they were driving, etc.
>> This was also a problem as far as other in-kernel users were involved, since
>> the solutions used were pretty much different from on driver to another, there
>> was a rather big abstraction leak.
>
> i only want to mention that there are more places of NVMEM drivers like:
>
> drivers/mfd/ab3100-otp.c
> drivers/soc/tegra/fuse/*.c

Thanks for mentioning.

>
>>
>> Introduction of this framework aims at solving this. It also introduces DT
>> representation for consumer devices to go get the data they require (MAC
>> Addresses, SoC/Revision ID, part numbers, and so on) from the NVMEMs.
>>
>> After learning few things about QCOM qfprom and other eeprom/efuses, which
>> has packed fields at bit level. Which makes it important to add support to
>> such memories. This version adds support to this type of non volatile
>> memories by adding support to bit level nvmem-cells.
>>
>> Having regmap interface to this framework would give much better
>> abstraction for nvmems on different buses.
>>
>> patch 1-4 Introduces the NVMEM framework.
>> Patch 5-6 Adds Qualcomm specific qfprom driver.
>> Patch 7 migrates an existing driver to nvmem framework.
>> Patch 8 adds entry in MAINTAINERS.
>>
>> Its also possible to migrate other nvmem drivers to this framework, and I
>> think
>> some of them already posted patches based on this framework.
>>
>> 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?


> I expected a function something like of_nvmem_cell_info_get() in the Providers
> API.


>
...

>> 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.


--srini
>
> Best regards
> Stefan
>

WARNING: multiple messages have this Message-ID (diff)
From: srinivas.kandagatla@linaro.org (Srinivas Kandagatla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 0/9] Add simple NVMEM Framework via regmap.
Date: Mon, 13 Jul 2015 20:35:56 +0100	[thread overview]
Message-ID: <55A4131C.7040700@linaro.org> (raw)
In-Reply-To: <1984575203.163267.1436813665815.JavaMail.open-xchange@oxbsltgw06.schlund.de>



On 13/07/15 19:54, Stefan Wahren wrote:
> Hi Srinivas,
>
> [add Ezequiel Garcia to CC]
>
>> Srinivas Kandagatla <srinivas.kandagatla@linaro.org> hat am 10. Juli 2015 um
>> 11:43 geschrieben:
>>
>>
>> Hi Greg,
>>
>> This patchset adds a new simple NVMEM framework to kernel, and it is tested
>> with various drivers like "QCOM thermal sensors", "QCOM cpr driver",
>> "begal bone cape manager" and few more on the way.
>>
>> Thankyou all for providing inputs and comments on previous versions of this
>> patchset. Here is the v7 of the patchset addressing all the issues raised as
>> part of previous versions review.
>>
>> Up until now, NVMEM drivers like eeprom were stored in drivers/misc, where
>> they
>> all had to duplicate pretty much the same code to register a sysfs file, allow
>> in-kernel users to access the content of the devices they were driving, etc.
>> This was also a problem as far as other in-kernel users were involved, since
>> the solutions used were pretty much different from on driver to another, there
>> was a rather big abstraction leak.
>
> i only want to mention that there are more places of NVMEM drivers like:
>
> drivers/mfd/ab3100-otp.c
> drivers/soc/tegra/fuse/*.c

Thanks for mentioning.

>
>>
>> Introduction of this framework aims at solving this. It also introduces DT
>> representation for consumer devices to go get the data they require (MAC
>> Addresses, SoC/Revision ID, part numbers, and so on) from the NVMEMs.
>>
>> After learning few things about QCOM qfprom and other eeprom/efuses, which
>> has packed fields at bit level. Which makes it important to add support to
>> such memories. This version adds support to this type of non volatile
>> memories by adding support to bit level nvmem-cells.
>>
>> Having regmap interface to this framework would give much better
>> abstraction for nvmems on different buses.
>>
>> patch 1-4 Introduces the NVMEM framework.
>> Patch 5-6 Adds Qualcomm specific qfprom driver.
>> Patch 7 migrates an existing driver to nvmem framework.
>> Patch 8 adds entry in MAINTAINERS.
>>
>> Its also possible to migrate other nvmem drivers to this framework, and I
>> think
>> some of them already posted patches based on this framework.
>>
>> 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?


> I expected a function something like of_nvmem_cell_info_get() in the Providers
> API.


>
...

>> 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.


--srini
>
> Best regards
> Stefan
>

  reply	other threads:[~2015-07-13 19:35 UTC|newest]

Thread overview: 75+ 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:43 ` Srinivas Kandagatla
2015-07-10  9:44 ` [PATCH v7 2/9] nvmem: Add a simple NVMEM framework for consumers Srinivas Kandagatla
2015-07-10  9:44   ` 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-10 10:42       ` Joe Perches
2015-07-10 10:42       ` Joe Perches
2015-07-13 19:06     ` Stefan Wahren
2015-07-13 19:06       ` Stefan Wahren
2015-07-13 19:06       ` Stefan Wahren
2015-07-13 19:24       ` Srinivas Kandagatla
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
2015-07-10  9:45   ` Srinivas Kandagatla
2015-07-10  9:45   ` 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-10 10:49       ` Joe Perches
2015-07-10 10:49       ` Joe Perches
2015-07-14 22:06   ` Stephen Boyd
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-15  8:21         ` Srinivas Kandagatla
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
2015-07-10  9:45   ` Srinivas Kandagatla
     [not found]   ` <1436521513-10838-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-10 19:04     ` Rob Herring
2015-07-10 19:04       ` Rob Herring
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-13 10:21           ` Srinivas Kandagatla
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
2015-07-10  9:45   ` 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 21:32       ` Stephen Boyd
2015-07-14 21:32       ` Stephen Boyd
2015-07-14 22:00       ` Srinivas Kandagatla
2015-07-14 22:00         ` Srinivas Kandagatla
2015-07-10  9:45 ` [PATCH v7 6/9] nvmem: qfprom: Add Qualcomm QFPROM support Srinivas Kandagatla
2015-07-10  9:45   ` Srinivas Kandagatla
     [not found]   ` <1436521529-10931-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-07-14 21:18     ` Stephen Boyd
2015-07-14 21:18       ` Stephen Boyd
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-14 22:02           ` Srinivas Kandagatla
2015-07-14 22:02           ` 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
2015-07-10  9:44     ` Srinivas Kandagatla
2015-07-10  9:44     ` 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:29         ` Joe Perches
2015-07-10 10:29         ` Joe Perches
2015-07-10 10:39         ` Srinivas Kandagatla
2015-07-10 10:39           ` Srinivas Kandagatla
2015-07-13 16:50       ` Philipp Zabel
2015-07-13 16:50         ` Philipp Zabel
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-10  9:45     ` Srinivas Kandagatla
2015-07-10  9:45     ` Srinivas Kandagatla
2015-07-13 18:54   ` [PATCH v7 0/9] Add simple NVMEM Framework via regmap Stefan Wahren
2015-07-13 18:54     ` Stefan Wahren
2015-07-13 18:54     ` Stefan Wahren
2015-07-13 19:35     ` Srinivas Kandagatla [this message]
2015-07-13 19:35       ` Srinivas Kandagatla
2015-07-13 19:35       ` Srinivas Kandagatla
2015-07-13 20:11       ` Stefan Wahren
2015-07-13 20:11         ` Stefan Wahren
     [not found]         ` <139301016.164015.1436818270753.JavaMail.open-xchange-0SF9iQWekqKZU4JK52HgGMgmgJlYmuWJ@public.gmane.org>
2015-07-13 21:39           ` Srinivas Kandagatla
2015-07-13 21:39             ` Srinivas Kandagatla
2015-07-13 21:39             ` 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:45   ` Srinivas Kandagatla
2015-07-10  9:46 ` [PATCH v7 9/9] nvmem: Add to MAINTAINERS for " Srinivas Kandagatla
2015-07-10  9:46   ` 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=55A4131C.7040700@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --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=stefan.wahren@i2se.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.