lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Apr 2013 14:26:52 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Anthony Olech <anthony.olech.opensource@...semi.com>
Cc:	Liam Girdwood <lrg@...com>, Guenter Roeck <linux@...ck-us.net>,
	Jean Delvare <khali@...ux-fr.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	LKML <linux-kernel@...r.kernel.org>,
	David Dajun Chen <david.chen@...semi.com>
Subject: Re: [NEW DRIVER V4 7/7] DA9058 REGULATOR driver

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@...nsource.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(&reg->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.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ