From: Mark Brown <broonie@kernel.org>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: add a data summary tree in debugfs
Date: Mon, 6 Apr 2015 16:24:18 +0100 [thread overview]
Message-ID: <20150406152418.GG6023@sirena.org.uk> (raw)
In-Reply-To: <2348758.yHH02IHytj@diego>
[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]
On Mon, Apr 06, 2015 at 02:04:47AM +0200, Heiko Stübner wrote:
> + switch (rdev->desc->type) {
> + case REGULATOR_VOLTAGE:
> + seq_printf(s, "%8dmV ",
> + _regulator_get_voltage(rdev) / 1000);
> + break;
> + case REGULATOR_CURRENT:
> + seq_printf(s, "%8dmA ",
> + _regulator_get_current_limit(rdev) / 1000);
> + break;
> + }
We have current limits for voltage regulators too.
> + if (rdev->desc->type == REGULATOR_VOLTAGE)
> + seq_printf(s, "%35dmV %8dmV",
> + consumer->min_uV / 1000,
> + consumer->max_uV / 1000);
switch statements please.
> + list_for_each_entry(child, list, list) {
> + if (!child->supply || child->supply->rdev != rdev)
> + continue;
Shouldn't we be complaining if the supply of a child isn't the parent?
> +static int regulator_summary_show(struct seq_file *s, void *data)
> +{
> + struct list_head *list = s->private;
> + struct regulator_dev *rdev;
> +
> + seq_puts(s, " regulator use,open,bypass value min max\n");
I can't help but think that this would look better with spaces rather
than commas both here and in the table itself. We also seem to have too
much space for the voltages - we're unlikely to see voltages over 10V
but the space reserved looks to be enough for 10kV. I think users with
such regulators can probably tolerate a little misformatting.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-04-06 15:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 0:04 [PATCH] regulator: add a data summary tree in debugfs Heiko Stübner
2015-04-06 15:24 ` Mark Brown [this message]
2015-04-07 14:16 ` [PATCH v2] regulator: add a " Heiko Stübner
2015-04-08 17:38 ` Mark Brown
2015-04-08 23:33 ` Heiko Stübner
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=20150406152418.GG6023@sirena.org.uk \
--to=broonie@kernel.org \
--cc=heiko@sntech.de \
--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