- 22 6月, 2016 4 次提交
-
-
由 MyungJoo Ham 提交于
When device_register() returns with error, it has already done put_device() on the input device pointer. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Cai Zhiyong 提交于
1295 */ 1296 void device_unregister(struct device *dev) 1297 { 1298 pr_debug("device: '%s': %s\n", dev_name(dev), __func__); 1299 device_del(dev); 1300 put_device(dev); 1301 } 1302 EXPORT_SYMBOL_GPL(device_unregister); 1303 device_unregister is called put_device, there is no need to call put_device(&devfreq->dev) again. Signed-off-by: NCai Zhiyong <caizhiyong@huawei.com> Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 MyungJoo Ham 提交于
device_unregister() calls kfree already. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 MyungJoo Ham 提交于
devm_kzalloc of devfreq's statistics data structure has been using its parent device as the dev allocated for. If a device's devfreq is disabled in run-time, such allocated memory won't be freed. Desginating more precisely with the devfreq device pointer fixes the issue. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 03 5月, 2016 2 次提交
-
-
由 Chanwoo Choi 提交于
This patch adds the new DEVFREQ_TRANSITION_NOTIFIER notifier to send the notification when the frequency of device is changed. This notifier has two state as following: - DEVFREQ_PRECHANGE : Notify it before chaning the frequency of device - DEVFREQ_POSTCHANGE : Notify it after changed the frequency of device And this patch adds the resourced-managed function to release the resource automatically when error happen. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board] Tested-by: NMarkus Reichl <m.reichl@fivetechno.de> Tested-by: NAnand Moon <linux.amoon@gmail.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
-
由 Chanwoo Choi 提交于
This patch adds the new devfreq_get_devfreq_by_phandle() OF helper function which can find the instance of devfreq device by using phandle ("devfreq"). Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board] Tested-by: NMarkus Reichl <m.reichl@fivetechno.de> Tested-by: NAnand Moon <linux.amoon@gmail.com> Acked-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
-
- 13 1月, 2016 4 次提交
-
-
由 MyungJoo Ham 提交于
Before this patch for a device without statistics support, $ cat trans_stat From : To : time(ms) Total transitions : 0 $ After this patch applied for such a device, $ cat trans_stat Not Supported. $ Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch modifies the indentation of 'trans_stat' sysfs to improve readability. The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit. - Before apply this patch, -sh-3.2# cat trans_stat From : To :50000000100000000133000000200000000400000000 time(ms) *50000000: 0 0 0 0 7 1817635 100000000: 4 0 0 0 4 1590 133000000: 1 4 0 0 7 975 200000000: 2 2 7 0 1 2655 400000000: 0 2 5 12 0 1860 Total transition : 58 - After apply this patch, -sh-3.2# cat trans_stat From : To : 50000000 100000000 133000000 200000000 400000000 time(ms) * 50000000: 0 0 0 0 7 14405 100000000: 4 0 0 0 3 2015 133000000: 2 3 0 0 7 1020 200000000: 1 2 7 0 0 2970 400000000: 0 2 5 10 0 1575 Total transition : 53 Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch initialize the freq_table array of each devfreq device by using the devfreq_set_freq_table(). If freq_table is NULL, the devfreq framework is not able to support the frequency transtion information through sysfs. The OPP core uses the integer type for the number of opps in the opp list and uses the 'unsigned long' type for each frequency. So, this patch modifies the type of some variable as following: - the type of freq_table : unsigned int -> unsigned long - the type of max_state : unsigned int -> int - Corrected types, format strings, mutex usages by MyungJoo Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch adds the 'show_one' macro to simplify the duplicate code of both max_freq_show() and min_freq_show(). Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 02 10月, 2015 1 次提交
-
-
由 Geliang Tang 提交于
When device_register() fails, kfree(devfreq) is called already in devfreq_dev_release(), hence there is no need to call kfree(devfreq) in err_dev again. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 30 9月, 2015 1 次提交
-
-
由 Tobias Jakobi 提交于
Writing the currently set governor into sysfs currently seems to fail. Fix this by setting the return code to zero before leaving governor_store(). Signed-off-by: NTobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 11 9月, 2015 3 次提交
-
-
由 Xiaolong Ye 提交于
time_in_state in struct devfreq is defined as unsigned long, so devm_kzalloc should use sizeof(unsigned long) as argument instead of sizeof(unsigned int), otherwise it will cause unexpected result in 64bit system. Signed-off-by: NXiaolong Ye <yexl@marvell.com> Signed-off-by: NKevin Liu <kliu5@marvell.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Javi Merino 提交于
The thermal infrastructure should use the devfreq cooling device, which uses the OPP library to disable OPPs as necessary. Fix a couple of typos in the same comment while we are at it. Signed-off-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Viresh Kumar 提交于
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 30 3月, 2015 1 次提交
-
-
由 MyungJoo Ham 提交于
_remove_devfreq() does not have @skip anymore after 3.16. The comment for _remove_devfreq() has been updated correspondingly. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 29 9月, 2014 1 次提交
-
-
由 Ãrjan Eide 提交于
These functions are indended for use by drivers and should be available also when the driver is built as a module. Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NÃrjan Eide <orjan.eide@arm.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 24 5月, 2014 3 次提交
-
-
由 Chanwoo Choi 提交于
This patch add resource-managed function for devfreq opp as following functions. The devm_devfreq_register_opp_notifier() manages automatically the registration of devfreq opp using device resource management. - devm_devfreq_register_opp_notifier - devm_devfreq_unregister_opp_notifier() Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch add resource-managed function for devfreq device as following functions. The devm_devfreq_add_device() manages automatically the memory of devfreq device using device resource management. - devm_devfreq_add_device() - devm_devfreq_remove_device() Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch modify devfreq_remove_device() to improve the sequence of resource free. If executing existing devfreq_remove_device(), this function always executes _remove_devfreq() twice. In result, second _remove_devfreq() always return error value. So, This patch resolves complicated function sequence as following: [Flow sequence before modification] devfreq_remove_device() _remove_devfreq(devfreq, false) kfree(devfreq); /* Free devfreq */ if (!skip ...) { /* skip is false */ device_unregister(&devfreq->dev) put_device(&devfreq->dev); ... dev->release() devfreq_dev_release() _remove_devfreq(devfreq, true) <- Recall to free devfreq /* * Always return error without freeing resource because * already _remove_devfreq() frees the memory of devfreq. */ } [Flow sequence after modification] devfreq_remove_device device_unregister(&devfreq->dev) put_device(&devfreq->dev); .. dev->release() devfreq_dev_release() _remove_devfreq() kfree(devfreq); /* Free devfreq */ Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> [Merge conflict resolved by MyungJoo] Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 21 3月, 2014 1 次提交
-
-
由 Saravana Kannan 提交于
The current devfreq_update_status() has the following bugs: - If previous frequency doesn't have a valid level, it does an out of bounds access into the trans_table and causes memory corruption. - When the new frequency doesn't have a valid level, the time spent in the new frequency is counted towards the next valid frequency switch instead of being ignored. - The time spent on the previous frequency is added to the new frequency's stats instead of the previous frequency's stats. This patch fixes all of this. Signed-off-by: NSaravana Kannan <skannan@codeaurora.org> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 28 10月, 2013 1 次提交
-
-
由 Dan Carpenter 提交于
The create_freezable_workqueue() function returns a NULL on error and not an ERR_PTR. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 26 10月, 2013 3 次提交
-
-
由 Nishanth Menon 提交于
Since Operating Performance Points (OPP) functions are specific to device specific power management, be specific and rename opp.h to pm_opp.h Reported-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Nishanth Menon 提交于
Since Operating Performance Points (OPP) data structures are specific to device specific power management, be specific and rename opp_* data structures in OPP library with dev_pm_opp_* equivalent. Affected structures are: struct opp enum opp_event Minor checkpatch warning resulting of this change was fixed as well. Reported-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Nishanth Menon 提交于
Since Operating Performance Points (OPP) functions are specific to device specific power management, be specific and rename opp_* accessors in OPP library with dev_pm_opp_* equivalent. Affected functions are: opp_get_voltage opp_get_freq opp_get_opp_count opp_find_freq_exact opp_find_freq_floor opp_find_freq_ceil opp_add opp_enable opp_disable opp_get_notifier opp_init_cpufreq_table opp_free_cpufreq_table Reported-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NNishanth Menon <nm@ti.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 20 8月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
The dev_attrs field of struct class is going away soon, dev_groups should be used instead. This converts the devfreq_class code to use the correct field. Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 7月, 2013 1 次提交
-
-
由 Kees Cook 提交于
Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 03 6月, 2013 2 次提交
-
-
由 MyungJoo Ham 提交于
- Added missing ABI documents - Added comments to clarify the objectives of functions Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: NNishanth Menon <nm@ti.com> Acked-by: NRajagopal Venkat <rajagopal.venkat@linaro.org>
-
由 Rajagopal Venkat 提交于
devfreq stats is not taking device suspend and resume into account. Fix it. Signed-off-by: NRajagopal Venkat <rajagopal.venkat@linaro.org> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 22 1月, 2013 1 次提交
-
-
由 Nishanth Menon 提交于
OPP pointers are protected by RCU locks, the pointer validity is permissible only under the section of rcu_read_lock to rcu_read_unlock Add documentation to the effect. Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 29 11月, 2012 1 次提交
-
-
由 MyungJoo Ham 提交于
Governors compiled as modules may use these functions. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 26 11月, 2012 3 次提交
-
-
由 Sachin Kamat 提交于
Use the value obtained from the function instead of -EINVAL. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Sachin Kamat 提交于
'g' is cast to the error return code. Hence gives the following error which is fixed by this patch. drivers/devfreq/devfreq.c:645 devfreq_remove_governor() error: 'g' dereferencing possible ERR_PTR() Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 MyungJoo Ham 提交于
opp_get_notifier() uses find_device_opp(), which requires to held rcu_read_lock. In order to keep the notifier-header valid, we have added rcu_read_lock(). Reported-by: NKees Cook <keescook@chromium.org> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 20 11月, 2012 6 次提交
-
-
由 Nishanth Menon 提交于
Now that governor list can be variable, knowing the available governors is useful to be able to select a governor using relevant sysfs node. Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kevin Hilman <khilman@ti.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Nishanth Menon 提交于
This allows us to select governor runtime from the default configuration without having to rebuild kernel or the devfreq driver using the sysfs node: /sys/class/devfreq/.../governor cat of the governor will return valid governor and an echo 'governor_name'>governor will switch governor Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kevin Hilman <khilman@ti.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NNishanth Menon <nm@ti.com> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Nishanth Menon 提交于
Allow devfreq drivers to register a preferred governor name and when the devfreq governor loads itself at a later point required drivers are managed appropriately, at the time of unload of a devfreq governor, stop managing those drivers as well. Since the governor structures do not need to be exposed anymore, remove the definitions and make them static NOTE: devfreq_list_lock is now used to protect governor start and stop - as this allows us to protect governors and devfreq with the proper dependencies as needed. As part of this change, change the registration of exynos bus driver to request for ondemand using the governor name. Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kevin Hilman <khilman@ti.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NNishanth Menon <nm@ti.com> [Merge conflict resolved by MyungJoo Ham] Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Nishanth Menon 提交于
Add devfreq_add_governor and devfreq_remove_governor which can be invoked by governors to register with devfreq. This sets up the stage to dynamically switch governors and allow governors to be dynamically loaded as well. Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kevin Hilman <khilman@ti.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NNishanth Menon <nm@ti.com> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Nishanth Menon 提交于
Allow update_devfreq to be used by devfreq governor built as modules Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kevin Hilman <khilman@ti.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NNishanth Menon <nm@ti.com> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Jonghwa Lee 提交于
This patch adds sysfs node which can be used to get information of frequency transition. It represents transition table which contains total number of transition of each freqeuncy state and time spent. It is inspired CPUFREQ's status driver. Signed-off-by: NJonghwa Lee <jonghwa3.lee@samsung.com> [Added Documentation/ABI entry, updated kernel-doc, and resolved merge conflict] Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-