public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0
Date: Wed, 17 Apr 2013 11:24:44 +0800	[thread overview]
Message-ID: <1366169084.10398.4.camel@phoenix> (raw)

hi Laxman,

Currently we have below code in tps80031_ldo_set_voltage_sel():

        /* Check for valid setting for TPS80031 or TPS80032-ES1.0 */
        if ((ri->rinfo->desc.id == TPS80031_REGULATOR_LDO2) &&
                        (ri->device_flags & TRACK_MODE_ENABLE)) {
                unsigned nvsel = (sel) & 0x1F;
                if (((tps80031_get_chip_info(parent) == TPS80031) ||
                        ((tps80031_get_chip_info(parent) == TPS80032) &&
                        (tps80031_get_pmu_version(parent) == 0x0))) &&
                        ((nvsel == 0x0) || (nvsel >= 0x19 && nvsel <= 0x1F))) {
                                dev_err(ri->dev,
                                        "Invalid sel %d in track mode LDO2\n",
                                        nvsel);
                                return -EINVAL;
                }
        }

However, list_voltage() still show these invalid selectors have supported voltage.
Besides, having the code "nvsel = (sel) & 0x1F" looks a bit odd, because currently
n_voltages is set to 57 when TRACK_MODE_ENABLE is set.

I'm wondering if below comment is still true for LDO2 TRACK_MODE_ENABLE of
"TPS80031/TPS80032-ES1.0"?

/* TRACK mode the ldo2 varies from 600mV to 1300mV */

What is the register value && voltage mapping for LDO2 TRACK_MODE_ENABLE of
TPS80031 or TPS80032-ES1.0?

Regards,
Axel


             reply	other threads:[~2013-04-17  3:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  3:24 Axel Lin [this message]
2013-04-17  6:44 ` regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0 Laxman Dewangan

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=1366169084.10398.4.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=ldewangan@nvidia.com \
    --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