Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5730957pxb; Mon, 14 Feb 2022 06:23:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlKFH00ZvVHiS7xJGQh0zZNDoBvqjJ6pQBlG19v92qM/+dVnRjGmuEQBPg+qmvXy0yKgNB X-Received: by 2002:a17:902:f548:: with SMTP id h8mr14558933plf.154.1644848606089; Mon, 14 Feb 2022 06:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644848606; cv=none; d=google.com; s=arc-20160816; b=IDq6itDZSdwumNalN5YuhLs4TKQGpklH2dYlASLdnmUkdEazVwsPLTCpwp4SwydX5R NR1ntx4wkuKqp9HZ63m0J5wVO5UTVbycYHe0XeErh0gfrHJfIVwpX7ZcbKrwOmHIv/mo acqnRYL/pr2C/9X6/NvvCuCe41HHyyHclzwRDjdDyJfKFBijSFZksfvLwc3f0GiCAJSS NMeubgabCpisyg8aZ4kV4xA85zc+R/wNZx4dD+pQ5LFuUDofVspy54752DFYlhGfC+DQ 5Snap5vqcdqBSZMWnyT3nUgN7VlH4nfclho8jaZ2xN01+YW6ptxVIGF4MocXlFcb8JBy h69g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wEYNEIYPdcnYLYEy0iaUdFs9a34YcPpJNldEuNyBzNY=; b=0dVAeClob625JS+iTIHDp5SAZO5NenEFTRO4f1I8kyBD6HIocDzDzHOTCd1wt77gLg yR2K+bC8yxJP65Dpsibd/3jBd/ae30B+ynjeeJ0UzZM2SiOGldkZB8U4JXa7xIJyjFt3 WbDNUpYZtzMgUt7AcefR5+1eUEtCFKM9zlS+pIQdUM7w4eLZDC/IROVIglCWZO2DjsbA 50s+EP1P4r8ub3/pt1KPl+9bCL2OzSgHGT5g9xkrPZp4AgtER54Yk+m3ur6X5CiW+j6g BfyXvzeJ0nh+aXcaOlVq+eSZljIh/0QASMv6gDXArsMrh+wVdYzIiz+M5dZw+KxB0RfN 4aTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cJ0oJ3rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az9si11669765plb.510.2022.02.14.06.23.07; Mon, 14 Feb 2022 06:23:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cJ0oJ3rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350006AbiBNLPi (ORCPT + 99 others); Mon, 14 Feb 2022 06:15:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350209AbiBNLPM (ORCPT ); Mon, 14 Feb 2022 06:15:12 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77556673CF for ; Mon, 14 Feb 2022 02:44:44 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id e3so26173007wra.0 for ; Mon, 14 Feb 2022 02:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=wEYNEIYPdcnYLYEy0iaUdFs9a34YcPpJNldEuNyBzNY=; b=cJ0oJ3rKrxXIhRNwAfNrvQ1ql3yhxuZMVcNb7XaPbDJK11oq6dEPOmugLzFs0HLWp4 tAPoqRAYetyA7fb1X9auua3A/pQABKYbLKzK52UfyWlYzt1oYNZeV7Okyi7qICzfg4Qm 5suMSeSlRY1dUlEFtAvAclAABcKe1PxLzPlWTdNq/idr8hzriDBYfKnH8FFg6D5tglBS kCIWOBmvpw0Na0Gu+o/5OgSMwfERrVeGBV7PzPa4tfo1moWdHR1Br6Lo9zLmwTwDZo2+ K1Die44/3JlbkEA9b0iwQsfpOMZiGQcpNIXP/1TAdTRoC0WYiNkFm2u+Apq3HmHq3JDh n3Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=wEYNEIYPdcnYLYEy0iaUdFs9a34YcPpJNldEuNyBzNY=; b=EY8LD5Uh3SFYAp/5wVoH8Au5c6v76uQbrJEW+hyKWLXthQ/YB28mfR5KxzUubOv5db PpAjkFb+usSf8GHie3p5MFs4j8053QbEBV7QfARg4BNuQQpJFqtZVqxR5u5VsIV7i4FQ yyWv2jhE/Poyeyh32rqUtI4EmJsk+6pjd/CmE8j9bdiQkumI6uSNpLT0KNjnXJXl0hKT Bo1P4UzBQ92DOWJ8CzuEt8A8av7kxPGZXWbbvhv9XqQSjAAgnifzmTlGiQPQxWNawDAh 1oqagQ4kC5zR3P+oKD9MC5PnlThHPlg9C8ucnORkLiIwz6KsQZ9HCIU46NyiyD6aBfyY STTQ== X-Gm-Message-State: AOAM533P+iy+1ebTP9Ud6ivqNFOsUlt9bO0InTrWaGdIC7hwcBF4IB81 GB/Td4ABh2c4Dd82eHQJXHcTjA== X-Received: by 2002:adf:f3d1:: with SMTP id g17mr9553978wrp.518.1644835483008; Mon, 14 Feb 2022 02:44:43 -0800 (PST) Received: from [192.168.86.34] (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.googlemail.com with ESMTPSA id z3sm13747208wmp.42.2022.02.14.02.44.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 02:44:42 -0800 (PST) Message-ID: Date: Mon, 14 Feb 2022 10:44:41 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2] doc: nvmem: Remove references to regmap Content-Language: en-US To: Sean Anderson , Jonathan Corbet , linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michael Walle References: <20220208162657.724119-1-sean.anderson@seco.com> From: Srinivas Kandagatla In-Reply-To: <20220208162657.724119-1-sean.anderson@seco.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > 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:: >