public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: "AnilKumar, Chimata" <anilkumar@ti.com>
Cc: "Girdwood, Liam" <lrg@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Nori, Sekhar" <nsekhar@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: RE: [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage
Date: Tue, 03 Jul 2012 13:26:08 +0800	[thread overview]
Message-ID: <1341293168.3241.7.camel@phoenix> (raw)
In-Reply-To: <331ABD5ECB02734CA317220B2BBEABC13E9E8CAB@DBDE01.ent.ti.com>


> Case 1:-
> ------
> 
> tps->info[rid]->min_uV = 600000;
> tps->info[rid]->max_uV = 1100000;
> 
> If we do regulator_set_voltage(reg, 550000, 1100000);
> 
> This results into error condition and how can we handle with this?

In original code, it returns error. ( I think which is wrong.)

What we want is to set the smallest voltage within the specified voltage
range.
With this patch, calling regulator_set_voltage(reg, 550000, 1100000);
is the same as calling regulator_set_voltage(reg, 600000, 1100000);
It will set the voltage to 600000 uV.

> 
> Case 2:-
> ------
> 
> I think the current code handles this case as well.
> 
> There might be a case where board/DT data is false like
> 
> tps->info[rid]->min_uV = 1100000;
> tps->info[rid]->max_uV = 600000;
> 
I don't get it.
You mean the case min_uV is greater than max_uV?

My understanding of current implementation is that the
tps->info[rid]->min_uV and tps->info[rid]->max_uV are not controlled by
board/DT data. They are defined in tps65217_pmic_regs[].

> regulator_set_voltage(reg, 650000, 1100000);
> 
> Regards
> AnilKumar



  reply	other threads:[~2012-07-03  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03  3:01 [PATCH 1/2] regulator: ad5398: Fix min/max current limit boundary checking Axel Lin
2012-07-03  3:05 ` [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage Axel Lin
2012-07-03  4:46   ` AnilKumar, Chimata
2012-07-03  5:26     ` Axel Lin [this message]
2012-07-03  6:48       ` AnilKumar, Chimata
2012-07-03  7:09         ` Axel Lin
2012-07-03  7:16           ` AnilKumar, Chimata

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=1341293168.3241.7.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=anilkumar@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=nsekhar@ti.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