From: Mark Brown <broonie@kernel.org>
To: Anthony Olech <anthony.olech.opensource@diasemi.com>
Cc: Liam Girdwood <lrg@ti.com>, Guenter Roeck <linux@roeck-us.net>,
Jean Delvare <khali@linux-fr.org>,
Randy Dunlap <rdunlap@xenotime.net>,
LKML <linux-kernel@vger.kernel.org>,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [NEW DRIVER V4 7/7] DA9058 REGULATOR driver
Date: Fri, 12 Apr 2013 14:26:52 +0100 [thread overview]
Message-ID: <20130412132651.GB12534@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201304121310.r3CDAJHh011814@latitude>
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
On Fri, Apr 12, 2013 at 02:05:28PM +0100, Anthony Olech wrote:
This looks good, I assume there's some dependencies on the MFD or other
earlier patches so I won't apply it, let me know if there aren't any and
I will:
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Please use subject lines reflecting the subsystem.
> +static int da9058_buck_ramp_voltage(struct regulator_dev *rdev,
> + unsigned int old_selector,
> + unsigned int new_selector)
> +{
> + struct da9058_regulator *regulator = rdev_get_drvdata(rdev);
> + struct da9058 *da9058 = regulator->da9058;
> + int ret;
> +
> + if (regulator->ramp_register == 0)
> + return -EINVAL;
> +
> + if (regulator->ramp_enable_mask == 0)
> + return -EINVAL;
> +
> + ret = da9058_set_bits(da9058, regulator->ramp_register,
> + regulator->ramp_enable_mask);
> +
> + if (ret)
> + return ret;
> +
> + return 2200; /* micro Seconds needed to ramp to new voltage*/
> +}
Hrm, this really should be implementable with a generic regmap
operation...
> + rdev = regulator_register(®->desc, &config);
> +
> + if (IS_ERR(rdev)) {
> + dev_err(&pdev->dev, "failed to register %s\n",
> + rpdata->regulator_name);
> + ret = PTR_ERR(rdev);
> + goto failed_to_register;
> + }
In general it's a bit better style to print out the return value to help
with diagnosis but it's no big deal.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-04-12 13:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 13:05 [NEW DRIVER V4 7/7] DA9058 REGULATOR driver Anthony Olech
2013-04-12 13:26 ` Mark Brown [this message]
2013-04-16 9:32 ` Opensource [Anthony Olech]
2013-04-12 13:32 ` Guenter Roeck
2013-04-15 15:00 ` Opensource [Anthony Olech]
2013-04-15 16:35 ` Guenter Roeck
2013-04-15 17:29 ` Opensource [Anthony Olech]
2013-04-15 17:46 ` Guenter Roeck
2013-04-16 9:17 ` Opensource [Anthony Olech]
2013-04-16 13:36 ` Guenter Roeck
2013-04-16 14:07 ` Opensource [Anthony Olech]
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=20130412132651.GB12534@opensource.wolfsonmicro.com \
--to=broonie@kernel.org \
--cc=anthony.olech.opensource@diasemi.com \
--cc=david.chen@diasemi.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lrg@ti.com \
--cc=rdunlap@xenotime.net \
/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