Re: [PATCH v6 1/2] PM / Domains: Add support for 'required-opps' to set default perf state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/10/2021 8:13 AM, Viresh Kumar wrote:
On 09-08-21, 16:38, Rajendra Nayak wrote:
Sure, I can do that, apart from the error print, the function currently also
returns a -EINVAL in case of the missing 'required-opps', are we suggesting
we change that to not return an error also?

No.

Since this is completely optional in the device node, we would want the function to
ideally not return error and only do so in case 'required-opps' exists and the
translation to performance state fails.

Not really. The function should return failure if the property isn't
there, but it shouldn't be EINVAL but ENODEV.

In my case I don't want to error out if the property is missing, I want to error out
only when the property exists but can't be translated into a performance state.

So currently I check if the property exists and *only then* try to translate it, Ulf asked
me to skip the check. If I do that and I call of_get_required_opp_performance_state()
unconditionally, and if it errors out I will need to put in additional logic (check for
return value of ENODEV) to distinguish between the property-does-not-exist vs
property-exists-but-cannot-be-translated case.
It just seems more straight-forward to call this only when the property exists, Ulf?
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux