From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: OPP: how to get the all frequency list? Date: Tue, 29 Aug 2017 12:08:26 +0200 Message-ID: <20170829100826.GD3101@ubuntu> References: <599A9F8D.6080508@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wm0-f43.google.com ([74.125.82.43]:34366 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbdH2KIg (ORCPT ); Tue, 29 Aug 2017 06:08:36 -0400 Received: by mail-wm0-f43.google.com with SMTP id f13so18866021wme.1 for ; Tue, 29 Aug 2017 03:08:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <599A9F8D.6080508@samsung.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Chanwoo Choi Cc: Viresh Kumar , "nm@ti.com" , Stephen Boyd , "linux-pm@vger.kernel.org" , =?utf-8?B?7ZWo66qF7KO8?= 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