- 31 1月, 2017 3 次提交
-
-
由 Chanwoo Choi 提交于
Until now, the trans_stat information of passive devfreq is not updated. This patch updates the trans_stat information after setting the target frequency of passive devfreq device. Fixes: 99613311 ("PM / devfreq: Add new passive governor") Cc: stable@vger.kernel.org Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
The devfreq using passive governor is not able to change the governor. So, the user can not change the governor through 'available_governor' sysfs entry. Also, the devfreq which don't use the passive governor is not able to change to 'passive' governor on the fly. Fixes: 99613311 ("PM / devfreq: Add new passive governor") Cc: stable@vger.kernel.org Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Chanwoo Choi 提交于
This patch just fixes the checkpatch warnings. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 03 1月, 2017 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch fixes the bug of devfreq_add_device(). The devfreq device must have the default governor. If find_devfreq_governor() returns error, devfreq_add_device() fail to add the devfreq instance. Fixes: 1b5c1be2 (PM / devfreq: map devfreq drivers to governor using name) Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 17 11月, 2016 1 次提交
-
-
由 MyungJoo Ham 提交于
The function name in the comment was incorrect. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 11 10月, 2016 2 次提交
-
-
由 Tobias Jakobi 提交于
In case devfreq->previous_freq is still uninitialized in devfreq_update_status(), i.e. it has value '0', the lookups in that function fail, eventually leading to some error message: [ 3.041292] devfreq bus_dmc: Couldn't update frequency transition information. Just skip the statup update in this situation. Signed-off-by: NTobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Axel Lin 提交于
Use devfreq_list_lock around list_del() to prevent list corruption. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 06 7月, 2016 2 次提交
-
-
由 Peter Chen 提交于
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 Paul Gortmaker 提交于
The Kconfig currently controlling compilation of this code is: menuconfig PM_DEVFREQ bool "Generic Dynamic Voltage and Frequency Scaling (DVFS) support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. This code wasn't using module_init, so we don't need to be concerned with altering the initcall level here. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file already has that. But we do add export.h since this file does export some symbols. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
- 24 6月, 2016 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch sends the DEVFREQ_POSTCHANGE notification when devfreq->profile->targer() is failed. The PRECHANGE/POSTCHANGE should be paired. Fixes: 0fe3a664 (PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier) Reported-by: NLin Huang <hl@rock-chips.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 22 6月, 2016 5 次提交
-
-
由 Lukasz Luba 提交于
Some systems need current frequency from last_status for calculation but it is zeroed during initialization. When the device starts there is no history, but we can assume that the last frequency was the same as the initial frequency (which is also used in 'previous_freq'). The log shows the result of this misinterpreted value. [ 2.042847] ... Failed to get voltage for frequency 0: -34 Signed-off-by: NLukasz Luba <lukasz.luba@arm.com> Reviewed-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
-
由 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>
-