mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Sean Anderson <sean.anderson@seco.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Michael Walle <michael@walle.cc>
Subject: Re: [PATCH v2] doc: nvmem: Remove references to regmap
Date: Mon, 14 Feb 2022 10:44:41 +0000	[thread overview]
Message-ID: <e1dd400d-0b8c-8bcd-d729-5f07976e468a@linaro.org> (raw)
In-Reply-To: <20220208162657.724119-1-sean.anderson@seco.com>

Hi Sean,
Thanks for the patch,

On 08/02/2022 16:26, Sean Anderson wrote:
> Since commit 795ddd18d38f ("nvmem: core: remove regmap dependency"),
> nvmem devices do not use the regmap API. Remove references to it from
> the documentation. Additionally, update the example to reflect the new
> API.  I have chosen the brcm-nvram driver since it seems to be simpler
> than the qfprom driver.
> 

Please split this into two patches.


--srini

> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
> 
> Changes in v2:
> - Replace spaces with tabs
> 
>   Documentation/driver-api/nvmem.rst | 28 ++++++++++++----------------
>   1 file changed, 12 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/driver-api/nvmem.rst b/Documentation/driver-api/nvmem.rst
> index 287e86819640..a8a58b61709b 100644
> --- a/Documentation/driver-api/nvmem.rst
> +++ b/Documentation/driver-api/nvmem.rst
> @@ -26,9 +26,7 @@ was a rather big abstraction leak.
>   
>   This framework aims at solve these problems. 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. This
> -framework is based on regmap, so that most of the abstraction available in
> -regmap can be reused, across multiple types of buses.
> +Addresses, SoC/Revision ID, part numbers, and so on) from the NVMEMs.
>   
>   NVMEM Providers
>   +++++++++++++++
> @@ -45,24 +43,22 @@ nvmem_device pointer.
>   
>   nvmem_unregister(nvmem) is used to unregister a previously registered provider.
>   
> -For example, a simple qfprom case::
> +For example, a simple nvram case::
>   
> -  static struct nvmem_config econfig = {
> -	.name = "qfprom",
> -	.owner = THIS_MODULE,
> -  };
> -
> -  static int qfprom_probe(struct platform_device *pdev)
> +  static int brcm_nvram_probe(struct platform_device *pdev)
>     {
> +	struct nvmem_config config = {
> +		.name = "brcm-nvram",
> +		.reg_read = brcm_nvram_read,
> +	};
>   	...
> -	econfig.dev = &pdev->dev;
> -	nvmem = nvmem_register(&econfig);
> -	...
> +	config.dev = &pdev->dev;
> +	config.priv = priv;
> +	config.size = resource_size(res);
> +
> +	devm_nvmem_register(&econfig);
>     }
>   
> -It is mandatory that the NVMEM provider has a regmap associated with its
> -struct device. Failure to do would return error code from nvmem_register().
> -
>   Users of board files can define and register nvmem cells using the
>   nvmem_cell_table struct::
>   

      reply	other threads:[~2022-02-14 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 16:26 Sean Anderson
2022-02-14 10:44 ` Srinivas Kandagatla [this message]

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=e1dd400d-0b8c-8bcd-d729-5f07976e468a@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=sean.anderson@seco.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

all inboxes | Powered by JetHome®