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:	Tue, 16 Apr 2013 09:32:49 +0000
From:	"Opensource [Anthony Olech]" <anthony.olech.opensource@...semi.com>
To:	Mark Brown <broonie@...nel.org>,
	"Opensource [Anthony Olech]" <anthony.olech.opensource@...semi.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	David Dajun Chen <david.chen@...semi.com>
Subject: RE: [NEW DRIVER V4 7/7] DA9058 REGULATOR driver

> -----Original Message-----
> From: Mark Brown [mailto:broonie@...nel.org]
> Sent: 12 April 2013 14:27
> To: Opensource [Anthony Olech]
> Cc: Liam Girdwood; Guenter Roeck; Jean Delvare; Randy Dunlap; LKML; David
> Dajun Chen
> 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

I will resubmit later after re-testing, fixing the 3 points you raised in this driver.

> Acked-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
> Please use subject lines reflecting the subsystem.

I assume you mean "regulator" for drivers in "drivers/regulator",
"misc" for drivers in "drivers/input/misc" etc etc ??

> > +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...

Yes, I did not notice that the generic regmap operation "reulator_set_voltage_sel_regmap()"
supports a trigger/go. I will change to using it.
 
> > +	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.

Yes, I will include the value of "ret" in the dev_err message

Tony Olech
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ