linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OPP: how to get the all frequency list?
       [not found] <CGME20170821085332epcas2p2e06a9d81a79ab5e71804db41bf349833@epcas2p2.samsung.com>
@ 2017-08-21  8:53 ` Chanwoo Choi
  2017-08-29 10:08   ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Chanwoo Choi @ 2017-08-21  8:53 UTC (permalink / raw)
  To: Viresh Kumar, nm@ti.com, Stephen Boyd
  Cc: linux-pm@vger.kernel.org, 함명주

Dear all,

I have a question that how to get the all frequency list
by using the OPP interface. (It doesn't matter whether frequency is available or not.)

OPP has following three functions in order to find the proper frequency.
- dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, bool available);
- dev_pm_opp_find_freq_floor(struct device *dev, unsigned long freq);
	: Search for a rounded floor freq (if opp->available is true)
- dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long freq);
	: Search for a rounded ceil freq if (opp->available is true)

In this case,
when the device using OPP tries to find the all frequencies,
the device can't find them. The device can just find the available frequencies.

If the some frequency of the device might be disabled by dev_pm_opp_disable()
and also the device doesn't know the correct frequency value,
the device cannot find the all frequencies by using the dev_pm_opp_find_freq_floor/ceil()

It is just able to find the available frequencies if opp->available is true.

Or
When proving the device driver and then before disabling the OPP by dev_pm_opp_disable(),
each device driver have to store the frequency lists on the private data structure.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OPP: how to get the all frequency list?
  2017-08-21  8:53 ` OPP: how to get the all frequency list? Chanwoo Choi
@ 2017-08-29 10:08   ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2017-08-29 10:08 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: Viresh Kumar, nm@ti.com, Stephen Boyd, linux-pm@vger.kernel.org,
	함명주

On 21-08-17, 17:53, Chanwoo Choi wrote:
> Dear all,
> 
> I have a question that how to get the all frequency list
> by using the OPP interface. (It doesn't matter whether frequency is available or not.)
> 
> OPP has following three functions in order to find the proper frequency.
> - dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, bool available);
> - dev_pm_opp_find_freq_floor(struct device *dev, unsigned long freq);
> 	: Search for a rounded floor freq (if opp->available is true)
> - dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long freq);
> 	: Search for a rounded ceil freq if (opp->available is true)
> 
> In this case,
> when the device using OPP tries to find the all frequencies,
> the device can't find them. The device can just find the available frequencies.
> 
> If the some frequency of the device might be disabled by dev_pm_opp_disable()
> and also the device doesn't know the correct frequency value,
> the device cannot find the all frequencies by using the dev_pm_opp_find_freq_floor/ceil()
> 
> It is just able to find the available frequencies if opp->available is true.

You can add the 'available' argument to the other APIs as well, just that you
need to justify them with proper examples.

-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-29 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20170821085332epcas2p2e06a9d81a79ab5e71804db41bf349833@epcas2p2.samsung.com>
2017-08-21  8:53 ` OPP: how to get the all frequency list? Chanwoo Choi
2017-08-29 10:08   ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).