devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markuss Broks <markuss.broks@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 4/4] regulator: sm5703-regulator: Add regulators support for SM5703 MFD
Date: Thu, 14 Apr 2022 21:02:49 +0300	[thread overview]
Message-ID: <37fb7d5b-dbaa-0b8c-2ed6-6f1a462d7a62@gmail.com> (raw)
In-Reply-To: <YlhfMkBqst87qvtD@sirena.org.uk>

Hi Mark,

On 4/14/22 20:51, Mark Brown wrote:
> On Thu, Apr 14, 2022 at 08:06:15PM +0300, Markuss Broks wrote:
>
>> +++ b/drivers/regulator/Makefile
>> @@ -173,5 +173,6 @@ obj-$(CONFIG_REGULATOR_WM831X) += wm831x-ldo.o
>>   obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
>>   obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
>>   obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
>> +obj-$(CONFIG_REGULATOR_SM5703) += sm5703-regulator.o
>>   
> Please keep the Kconfig and Makefile sorted.
>
>> +static const int sm5703_buck_voltagemap[] = {
>> +	1000000, 1000000, 1000000, 1000000,
>> +	1000000, 1000000, 1000000, 1000000,
>> +	1000000, 1000000, 1000000, 1100000,
>> +	1200000, 1300000, 1400000, 1500000,
>> +	1600000, 1700000, 1800000, 1900000,
>> +	2000000, 2100000, 2200000, 2300000,
>> +	2400000, 2500000, 2600000, 2700000,
>> +	2800000, 2900000, 3000000, 3000000,
>> +};
> Are the repeated values at the ends of the array actually valid or do
> they indicate the part being driven out of spec?  If it's out of spec
> then it's better to exclude them since otherwise we might choose one of
> those values when configuring a voltage which may not actually work as
> desired.

I am pretty sure those values are valid. This voltage map is taken 
directly from the downstream driver (I wish I had actual 
documentation...) , which also backs it by saying 32 voltage levels are 
supported. However, I find it rather improper to have separate values 
which result in same voltage level. Still, I'm not sure something like 
selector offset exists in struct regulator_desc or elsewhere.

- Markuss


      reply	other threads:[~2022-04-14 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 17:06 [PATCH 0/4] Add support for Silicon Mitus SM5703 MFD Markuss Broks
2022-04-14 17:06 ` [PATCH 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators Markuss Broks
2022-04-14 17:06 ` [PATCH 2/4] dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD Markuss Broks
2022-04-14 18:59   ` Rob Herring
2022-04-14 17:06 ` [PATCH 3/4] mfd: sm5703: Add support for " Markuss Broks
2022-04-14 17:06 ` [PATCH 4/4] regulator: sm5703-regulator: Add regulators " Markuss Broks
2022-04-14 17:51   ` Mark Brown
2022-04-14 18:02     ` Markuss Broks [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=37fb7d5b-dbaa-0b8c-2ed6-6f1a462d7a62@gmail.com \
    --to=markuss.broks@gmail.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).