From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Cc: linux-kernel@vger.kernel.org, lrg@ti.com, sameo@linux.intel.com,
Graeme Gregory <gg@slimlogic.co.uk>
Subject: Re: [PATCHv3 4/4] TPS65910: Add tps65910 regulator driver
Date: Wed, 20 Apr 2011 16:17:26 +0100 [thread overview]
Message-ID: <20110420151726.GA9869@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <BAB49D4A-084E-4290-AF99-118A172F0ED6@slimlogic.co.uk>
On Tue, Apr 19, 2011 at 08:27:35PM -0500, Jorge Eduardo Candelaria wrote:
> From: Graeme Gregory <gg@slimlogic.co.uk>
>
> The regulator module consists of 3 DCDCs and 8 LDOs. The output
> voltages are configurable and are meant to supply power to the
> main processor and other components
>
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
This looks good except for some small nits:
> + //voltage = pmic->info[id]->table[srvsel] * 100;
> + voltage = (srvsel * 125 + 6000) * 100;
> + //voltage = pmic->info[id]->table[opvsel] * 100;
> + voltage = (opvsel * 125 + 6000) * 100;
Delete the old code.
> + value = tps65910_reg_read(pmic, reg);
> + if (value < 0)
> + return value;
> +
> + switch (id) {
> + case TPS65910_REG_VIO:
> + case TPS65910_REG_VDIG1:
> + case TPS65910_REG_VDIG2:
> + case TPS65910_REG_VPLL:
> + case TPS65910_REG_VDAC:
> + case TPS65910_REG_VAUX1:
> + case TPS65910_REG_VAUX2:
> + case TPS65910_REG_VAUX33:
> + case TPS65910_REG_VMMC:
> + value &= ~(LDO_SEL_MASK);
> + value |= (selector << LDO_SEL_SHIFT);
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + return tps65910_reg_write(pmic, reg, value);
This looks like you need a read/modify/write operation for setting
arbatrary bits rather than specifically setting or clearing.
prev parent reply other threads:[~2011-04-20 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 1:27 [PATCHv3 4/4] TPS65910: Add tps65910 regulator driver Jorge Eduardo Candelaria
2011-04-20 15:17 ` Mark Brown [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=20110420151726.GA9869@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=jedu@slimlogic.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=sameo@linux.intel.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