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:	Thu, 30 Jul 2015 22:51:06 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Rafael Wysocki <rjw@...ysocki.net>, linaro-kernel@...ts.linaro.org,
	linux-pm@...r.kernel.org, rob.herring@...aro.org,
	arnd.bergmann@...aro.org, nm@...com, broonie@...nel.org,
	mturquette@...libre.com, Sudeep.Holla@....com,
	viswanath.puttagunta@...aro.org, l.stach@...gutronix.de,
	thomas.petazzoni@...e-electrons.com,
	linux-arm-kernel@...ts.infradead.org, ta.omasab@...il.com,
	kesavan.abhilash@...il.com, khilman@...aro.org,
	santosh.shilimkar@...cle.com, b.zolnierkie@...sung.com,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Len Brown <len.brown@...el.com>,
	open list <linux-kernel@...r.kernel.org>,
	Pavel Machek <pavel@....cz>
Subject: Re: [PATCH V3 07/16] PM / OPP: Add support to parse
 "operating-points-v2" bindings

On 07/29, Viresh Kumar wrote:
> This adds support in OPP library to parse and create list of OPPs from
> operating-points-v2 bindings. It takes care of most of the properties of
> new bindings (except shared-opp, which will be handled separately).
> 
> For backward compatibility, we keep supporting earlier bindings. We try
> to search for the new bindings first, in case they aren't present we
> look for the old deprecated ones.
> 
> There are few things marked as TODO:
> - Support for multiple OPP tables
> - Support for multiple regulators
> 
> They should be fixed separately.
> 
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>

Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>

One question below:

> @@ -679,6 +691,125 @@ static int _opp_add_dynamic(struct device *dev, unsigned long freq,
>  	return ret;
>  }
>  
> +/* TODO: Support multiple regulators */
> +static int opp_get_microvolt(struct dev_pm_opp *opp, struct device *dev)
> +{
> +	u32 microvolt[3] = {0};
> +	int count, ret;
> +
> +	count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> +	if (!count)
> +		return 0;
> +
> +	/* There can be one or three elements here */
> +	if (count != 1 && count != 3) {
> +		dev_err(dev, "%s: Invalid number of elements in opp-microvolt property (%d)\n",
> +			__func__, count);
> +		return -EINVAL;
> +	}
> +
> +	ret = of_property_read_u32_array(opp->np, "opp-microvolt", microvolt,
> +					 count);
> +	if (ret) {
> +		dev_err(dev, "%s: error parsing opp-microvolt: %d\n", __func__,
> +			ret);
> +		return -EINVAL;
> +	}
> +
> +	opp->u_volt = microvolt[0];
> +	opp->u_volt_min = microvolt[1];
> +	opp->u_volt_max = microvolt[2];

Should the default be 0 and ULONG_MAX for volt_min/volt_max when
there's on element?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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