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]
Message-ID: <bf55d126-cee2-2762-9285-c143ff321bc9@arm.com>
Date:   Thu, 24 Feb 2022 09:34:39 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linux-kernel@...r.kernel.org, dietmar.eggemann@....com,
        rafael@...nel.org, daniel.lezcano@...aro.org, nm@...com,
        sboyd@...nel.org, mka@...omium.org, dianders@...omium.org,
        robh+dt@...nel.org, devicetree@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v3 2/4] OPP: Add "opp-microwatt" supporting code



On 2/24/22 09:03, Viresh Kumar wrote:
> On 24-02-22, 08:11, Lukasz Luba wrote:
>> +/**
>> + * dev_pm_opp_get_power() - Gets the power corresponding to an opp
>> + * @opp:	opp for which power has to be returned for
>> + *
>> + * Return: power in micro watt corresponding to the opp, else
>> + * return 0
>> + *
>> + * This is useful only for devices with single power supply.
>> + */
>> +unsigned long dev_pm_opp_get_power(struct dev_pm_opp *opp)
>> +{
>> +	if (IS_ERR_OR_NULL(opp)) {
>> +		pr_err("%s: Invalid parameters\n", __func__);
>> +		return 0;
>> +	}
>> +
>> +	return opp->supplies[0].u_watt;
> 
> What about returning the total of all u_watts for this OPP here ?
> Surely it doesn't make sense to do the same for voltage and current,
> but power is different.
> 

OK, I'll do the summation of all used supplies' power here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ