From: Laxman Dewangan <ldewangan@nvidia.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Graeme Gregory <gg@slimlogic.co.uk>,
Liam Girdwood <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/RFT][PATCH] regulator: palmas: Convert to use regulator_set_voltage_time_sel()
Date: Sun, 21 Apr 2013 14:18:25 +0530 [thread overview]
Message-ID: <5173A7D9.8030300@nvidia.com> (raw)
In-Reply-To: <1366459972.3833.2.camel@phoenix>
On Saturday 20 April 2013 05:42 PM, Axel Lin wrote:
> Use regulator_set_voltage_time_sel() instead of open coded.
>
> If rdev->constraints->ramp_delay is specified, the setting will be used in
> regulator_set_voltage_time_sel(). And then pmic->ramp_delay[] is not used and
> can be removed.
>
> There is a different behavior change here:
> regulator_set_voltage_time_sel() always returns
> DIV_ROUND_UP(abs(new_volt - old_volt), ramp_delay);
>
> palma_smps_set_voltage_smps_time_sel() actually returns
> DIV_ROUND_UP(abs(new_volt - old_volt), modified_ramp_delay);
> where the modified_ramp_delay is not exactly specified by
> rdev->constraints->ramp_delay but a value from pmic->ramp_delay[id].
>
> So palma_smps_set_voltage_smps_time_sel() may return a smaller delay than
> regulator_set_voltage_time_sel() depend on rdev->constraints->ramp_delay value.
>
> I think the delay in both version are *safe* for the operation.
>
Nack,
This approach does not look good and the reason for which I did not use
this core api here was:
- The palma device support ramp of 10mV/us, 5mV/us and 2.5mV/us. So if
client pass the other than this value then register is programmed to
nearest high value.
In this case, the constraint->ramp_delay is not much accurate with
register level programming and need to update with actual register
programmed. Hence we need to have local equivalent to the register
programmed and use this new value instead of constraints->ramp_delay.
- Second reason is that TPS65913 ES1.0/ES2.0 has the hw errata on which
the output voltage become slow ramp near to final value. TI suggested to
use 1.5x as SWAR. So we need to use the local implementation to adjust this.
The changes for this errata is not there because we will need to read
the version register and Ian has posted the series which is not merged
yet. So waiting for his series to be merged for this errata implementation.
prev parent reply other threads:[~2013-04-21 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-20 12:12 [RFC/RFT][PATCH] regulator: palmas: Convert to use regulator_set_voltage_time_sel() Axel Lin
2013-04-21 8:48 ` Laxman Dewangan [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=5173A7D9.8030300@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.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