From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kernel@pengutronix.de
Subject: Re: [PATCH 1/2] regulator: tps65910: Add backup battery regulator
Date: Thu, 19 Dec 2013 09:23:40 +0100 [thread overview]
Message-ID: <20131219082340.GD23493@pengutronix.de> (raw)
In-Reply-To: <20131218162452.GX28455@sirena.org.uk>
On Wed, Dec 18, 2013 at 04:24:52PM +0000, Mark Brown wrote:
> On Wed, Dec 18, 2013 at 03:50:07PM +0100, Markus Pargmann wrote:
>
> > @@ -771,7 +794,7 @@ static struct regulator_ops tps65910_ops = {
> > .get_voltage_sel = tps65910_get_voltage_sel,
> > .set_voltage_sel = tps65910_set_voltage_sel,
> > .list_voltage = regulator_list_voltage_table,
> > - .map_voltage = regulator_map_voltage_ascend,
> > + .map_voltage = regulator_map_voltage_iterate,
> > };
>
> You should make separate ops for this rather than make all the other
> regulators take the performance hit.
Fixed.
>
> > static struct regulator_ops tps65911_ops = {
> > @@ -944,6 +967,7 @@ static struct of_regulator_match tps65910_matches[] = {
> > { .name = "vaux2", .driver_data = (void *) &tps65910_regs[10] },
> > { .name = "vaux33", .driver_data = (void *) &tps65910_regs[11] },
> > { .name = "vmmc", .driver_data = (void *) &tps65910_regs[12] },
> > + { .name = "vbb", .driver_data = (void *) &tps65910_regs[13] },
> > };
>
> Ugh, these numbered tables aren't good. Not a problem from this patch
> though.
>
> > - pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;
> > + if (tps65910_chip_id(tps65910) == TPS65910 &&
> > + i == TPS65910_REG_VBB)
> > + pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK;
> > + else
> > + pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;
>
> switch statements please - it means if additional things need
> customising they can drop right in.
Fixed.
Thank you,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2013-12-19 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 14:50 [PATCH 1/2] regulator: tps65910: Add backup battery regulator Markus Pargmann
2013-12-18 14:50 ` [PATCH 2/2] ARM: dts: tps65910 " Markus Pargmann
2013-12-18 16:25 ` Mark Brown
2013-12-19 8:25 ` Markus Pargmann
2013-12-18 16:24 ` [PATCH 1/2] regulator: tps65910: Add " Mark Brown
2013-12-19 8:23 ` Markus Pargmann [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=20131219082340.GD23493@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@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;
as well as URLs for NNTP newsgroup(s).