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] [day] [month] [year] [list]
Date:	Fri, 29 Jan 2016 00:24:57 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Georgi Djakov <georgi.djakov@...aro.org>
Cc:	lgirdwood@...il.com, andy.gross@...aro.org, lina.iyer@...aro.org,
	sboyd@...eaurora.org, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2] regulator: qcom-saw2: Add support for SAW2 regulators

On Thu, Jan 28, 2016 at 04:59:02PM +0200, Georgi Djakov wrote:

> +static int saw2_regulator_get_voltage(struct regulator_dev *rdev)
> +{
> +	struct saw2_vreg *vreg = rdev_get_drvdata(rdev);
> +
> +	return regulator_list_voltage_linear_range(rdev, vreg->selector);
> +}

Implement regulator_get_voltage_sel() instead.

> +	do {
> +		regmap_read(vreg->regmap, SPM_REG_STS_1, &new_val);
> +		new_val &= 0xff;
> +		if (new_val == val)
> +			break;
> +		udelay(1);
> +	} while (--timeout_us);

A cpu_relax() in here might be friendly.

> +	if (sel > vreg->selector) {
> +		/* PMIC internal slew rate is 1250 uV/us */
> +		udelay((sel - vreg->selector) * 10);
> +	}

The core already does this for you.

> +	vreg->rdesc.name = of_get_property(np, "regulator-name", NULL);

Don't open code standard properties and don't add new use of legacy
properties like regulator-name.  Just assign a sensible name.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ