From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Doug Anderson <dianders@chromium.org>,
Ravi Kumar Bokka <rbokka@codeaurora.org>
Cc: Rob Herring <robh+dt@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
dhavalp@codeaurora.org, mturney@codeaurora.org,
sparate@codeaurora.org, c_rbokka@codeaurora.org,
mkurumel@codeaurora.org
Subject: Re: [RFC v2 2/3] drivers: nvmem: Add QTI qfprom-efuse support
Date: Mon, 15 Jun 2020 11:44:35 +0100 [thread overview]
Message-ID: <472dc7d7-2e23-0f1a-8e1a-839c4c9c1f7a@linaro.org> (raw)
In-Reply-To: <CAD=FV=XSfMPehyCLB25hct+GE8JtU=5J=04KyU4AoHfg9cs50A@mail.gmail.com>
On 13/06/2020 21:33, Doug Anderson wrote:
> Hi,
>
> On Thu, Jun 11, 2020 at 2:49 AM Ravi Kumar Bokka <rbokka@codeaurora.org> wrote:
>>
>> This patch adds support for QTI qfprom-efuse controller. This driver can
>> access the raw qfprom regions for fuse blowing.
>>
>> The current existed qfprom driver is only supports for cpufreq, thermal sensors
>> drivers by read out calibration data, speed bins..etc which is stored
>> by qfprom efuses.
>>
>> Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
>> ---
>
> It makes all your code reviewers much happier (and much more likely to
> take the time to review your patches) if you include a changelog with
> what changed from one version to the next. If you would like some
> help maintaining such a thing, might I suggest "patman":
>
> https://gitlab.denx.de/u-boot/u-boot/-/blob/master/tools/patman/README
>
> ...pay no mind that it's hosted in the U-Boot repo--it's really quite
> a great tool.
>
>
>> drivers/nvmem/Kconfig | 1 +
>> drivers/nvmem/qfprom.c | 405 ++++++++++++++++++++++++++++++++++++++++++++++---
>> 2 files changed, 385 insertions(+), 21 deletions(-)
>>
>> diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
>> index d7b7f6d..623d59e 100644
>> --- a/drivers/nvmem/Kconfig
>> +++ b/drivers/nvmem/Kconfig
>> @@ -117,6 +117,7 @@ config QCOM_QFPROM
>> help
>> Say y here to enable QFPROM support. The QFPROM provides access
>> functions for QFPROM data to rest of the drivers via nvmem interface.
>> + And this driver provides access QTI qfprom efuse via nvmem interface.
>
> I'm not sure it was necessary to add that line, but I won't object if
> you/others really like it.
>
NAK from my side!
>
>> This driver can also be built as a module. If so, the module
>> will be called nvmem_qfprom.
>> diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
>> index 8a91717..312318c 100644
>> --- a/drivers/nvmem/qfprom.c
>> +++ b/drivers/nvmem/qfprom.c
>
> You've still mostly not addressed most of the review feedback I've now
> given you 3 times. Rather than repeating comments, I have simply
> provided a patch that makes the driver into a state that I'm happy
> with:
>
> https://crrev.com/c/2244932
>
> Rough summary:
>
> * There should be no reason to provide "reset" values for things. For
> anything that you change for fuse blowing, just save and restore
> after.
>
> * Use the major/minor version read from 0x6000 to pick the parameters
> to use. Please double-check that I got this right.
>
> * Reading should still read "corrected", not "raw". Added a sysfs
> knob to allow you to read "raw", though.
We could create an additional nvmem read-only provider in future if
required to read raw!.
>
> * Simplified the SoC data structure.
>
> * No need for quite so many levels of abstraction for setting clocks /
> regulator.
>
> * Don't set regulator voltage. Rely on device tree to make sure it's right.
>
> * Properly undo things in the case of failure.
>
> * Don't just keep enabling the regulator over and over again.
>
> * Enable / disable the clock each time; now we don't need a .remove
> function and yet we still don't leave the clock enabled/prepared.
>
> * Polling every 100 us but timing out in 10 us didn't make sense.
> Swap those. Also no reason for 100 us to be SoC specific.
>
> * No need for reg-names.
>
> * We shouldn't be creating two separate nvmem devices.
>
>
> In general I'm happy to post my series to the list myself to get
> review feedback. For now I'm expecting that you can squash my changes
> in and send the next version.
>
>
> -Doug
>
next prev parent reply other threads:[~2020-06-15 10:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 9:47 [RFC v2 0/3] Add QTI QFPROM-Efuse driver support Ravi Kumar Bokka
2020-06-11 9:48 ` [RFC v2 1/3] dt-bindings: nvmem: Add devicetree bindings for qfprom-efuse Ravi Kumar Bokka
2020-06-11 12:18 ` Rajendra Nayak
2020-06-12 21:58 ` Rob Herring
2020-06-12 21:59 ` Doug Anderson
2020-06-12 23:15 ` Doug Anderson
2020-06-15 10:44 ` Srinivas Kandagatla
2020-06-15 14:17 ` Rob Herring
2020-06-15 14:27 ` Doug Anderson
2020-06-15 14:28 ` Srinivas Kandagatla
2020-06-11 9:48 ` [RFC v2 2/3] drivers: nvmem: Add QTI qfprom-efuse support Ravi Kumar Bokka
2020-06-13 20:33 ` Doug Anderson
2020-06-15 10:44 ` Srinivas Kandagatla [this message]
2020-06-15 17:13 ` Doug Anderson
2020-06-17 14:54 ` Doug Anderson
2020-06-15 9:56 ` Srinivas Kandagatla
2020-06-11 9:48 ` [RFC v2 3/3] arm64: dts: qcom: sc7180: Add qfprom-efuse Ravi Kumar Bokka
2020-06-13 20:23 ` Doug Anderson
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=472dc7d7-2e23-0f1a-8e1a-839c4c9c1f7a@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=c_rbokka@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dhavalp@codeaurora.org \
--cc=dianders@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkurumel@codeaurora.org \
--cc=mturney@codeaurora.org \
--cc=rbokka@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=sparate@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).