On 19-09-15, 15:22, Stephen Boyd wrote:
> On 09/18, Viresh Kumar wrote:
> > On 17-09-15, 11:13, Stephen Boyd wrote:
> > > > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > > > + if (count < 0) {
> > >
> > > We can't test count for -EINVAL to detect the missing
On 19-09-15, 15:22, Stephen Boyd wrote:
> On 09/18, Viresh Kumar wrote:
> > On 17-09-15, 11:13, Stephen Boyd wrote:
> > > > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > > > + if (count < 0) {
> > >
> > > We can't test count for -EINVAL to detect the missing
On 09/18, Viresh Kumar wrote:
> On 17-09-15, 11:13, Stephen Boyd wrote:
> > > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > > + if (count < 0) {
> >
> > We can't test count for -EINVAL to detect the missing property
> > because -EINVAL is also returned on a non-multiple of
On 09/18, Viresh Kumar wrote:
> On 17-09-15, 11:13, Stephen Boyd wrote:
> > > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > > + if (count < 0) {
> >
> > We can't test count for -EINVAL to detect the missing property
> > because -EINVAL is also returned on a non-multiple of
On 17-09-15, 11:13, Stephen Boyd wrote:
> > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > + if (count < 0) {
>
> We can't test count for -EINVAL to detect the missing property
> because -EINVAL is also returned on a non-multiple of u32 length
> property? Maybe we
On 17-09-15, 11:13, Stephen Boyd wrote:
> > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > + if (count < 0) {
>
> We can't test count for -EINVAL to detect the missing property
> because -EINVAL is also returned on a non-multiple of u32 length
> property? Maybe we
On 09/17, Viresh Kumar wrote:
> +++ b/drivers/base/power/opp.c
> @@ -889,13 +889,22 @@ static int _opp_add_dynamic(struct device *dev,
> unsigned long freq,
> /* TODO: Support multiple regulators */
> static int opp_get_microvolt(struct dev_pm_opp *opp, struct device *dev)
> {
> + struct
of_property_count_u32_elems() will never return 0, but a -ve error value
of a positive count. And so the current !count check is wrong.
Also, a missing "opp-microvolt" property isn't a problem and so we need
to do of_find_property() separately to confirm that.
Fixes: 274659029c9d ("PM / OPP: Add
of_property_count_u32_elems() will never return 0, but a -ve error value
of a positive count. And so the current !count check is wrong.
Also, a missing "opp-microvolt" property isn't a problem and so we need
to do of_find_property() separately to confirm that.
Fixes: 274659029c9d ("PM / OPP: Add
On 09/17, Viresh Kumar wrote:
> +++ b/drivers/base/power/opp.c
> @@ -889,13 +889,22 @@ static int _opp_add_dynamic(struct device *dev,
> unsigned long freq,
> /* TODO: Support multiple regulators */
> static int opp_get_microvolt(struct dev_pm_opp *opp, struct device *dev)
> {
> + struct
10 matches
Mail list logo