12 Jun, 2017
3 commits
-
The ppmu_events array is accessed only in this compilation unit so it
can be made static.Signed-off-by: Krzysztof Kozlowski
Acked-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav
Signed-off-by: MyungJoo Ham -
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav
Signed-off-by: MyungJoo Ham
12 Apr, 2017
1 commit
-
This patch moves the struct devfreq_governor from header file
to the devfreq directory because this structure is private data
and it have to be only accessed by the devfreq core.Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
28 Feb, 2017
1 commit
-
Fix typos and add the following to the scripts/spelling.txt:
followings||following
While we are here, add a missing colon in the boilerplate in DT binding
documents. The "you SoC" in allwinner,sunxi-pinctrl.txt was fixed as
well.I reworded "as the followings:" to "as follows:" for
drivers/usb/gadget/udc/renesas_usb3.c.Link: http://lkml.kernel.org/r/1481573103-11329-32-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Feb, 2017
1 commit
-
* pm-devfreq:
PM / devfreq: Modify the device name as devfreq(X) for sysfs
PM / devfreq: Simplify the sysfs name of devfreq-event device
PM / devfreq: Remove unnecessary separate _remove_devfreq()
PM / devfreq: Fix wrong trans_stat of passive devfreq device
PM / devfreq: Fix available_governor sysfs
PM / devfreq: exynos-ppmu: Show the registred device for ppmu device
PM / devfreq: Fix the wrong description for userspace governor
PM / devfreq: Fix the checkpatch warnings
PM / devfreq: exynos-bus: Print the real clock rate of bus
PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registers
PM / devfreq: exynos-bus: Add the detailed correlation for Exynos5433
PM / devfreq: Don't delete sysfs group twice
31 Jan, 2017
11 commits
-
This patch modifies the device name as devfreq(X) for sysfs by using the 'devfreq'
prefix word instead of separate device name. On user-space aspect, user would
find the some devfreq drvier with 'devfreq(X)' pattern. So, this patch modify the
device name as following:
- /sys/class/devfreq/[non-standard device name] -> /sys/class/devfreq/devfreq(X)Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch just removes '.' character from the sysfs name of devfreq-event
device as following. Usually, the subsystem uses the similiar naming style
such as {framework name}{Number}.
- old : /sys/class/devfreq-event/event.(X)
- new : /sys/class/devfreq-event/event(X)And this patch initializes the value of 'event_no' with -1
in order to remove the unneeded operation (-1) when calling
the atomic_inc_return(&event_no).Lastly, this patch adds the ABI document for devfreq-event class.
Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
The _remove_devfreq() releases the all resources of the devfreq
device. This function is only called in the devfreq_dev_release().
For that reason, the devfreq core doesn't need to leave the
_remove_devfreq() separately. This patch releases the all
resources in the devfreq_dev_release() and then removes the
_remove_devfreq().Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
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: 996133119f57 ("PM / devfreq: Add new passive governor")
Cc: stable@vger.kernel.org
Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
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: 996133119f57 ("PM / devfreq: Add new passive governor")
Cc: stable@vger.kernel.org
Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch just adds the simple log to show the PPMU device's registration
during the kernel booting.Cc: Kukjin Kim
Cc: Krzysztof Kozlowski
Cc: Javier Martinez Canillas
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch fixes the wrong description of governor_userspace.c
and removes the unneeded blank line.Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch just fixes the checkpatch warnings.
Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch shows the real clock rate after calling clk_set_rate()
to debug it.Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
This patch uses the regmap interface to read and write the registers for exynos
PPMU device instead of the legacy memory map functions.Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
The 'userspace' governor adds a sysfs entry, which is removed when
the governor is changed, or the devfreq device is released. However,
when the latter occurs via device_unregister(), device_del() is
called first, which removes the sysfs entries recursively and deletes
the kobject.This means we get an Oops when the governor calls
sysfs_remove_group() on the deleted kobject. Fix this by only doing
the call when kobj *hasn't* been kobject_del()'d.Note that we can't just remove the call to sysfs_remove_group()
entirely - it's needed for when the governor is changed to one which
doesn't need a sysfs entry.Signed-off-by: Chris Diamand
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
30 Jan, 2017
1 commit
-
This patch updates dev_pm_opp_find_freq_*() routines to get a reference
to the OPPs returned by them.Also updates the users of dev_pm_opp_find_freq_*() routines to call
dev_pm_opp_put() after they are done using the OPPs.As it is guaranteed the that OPPs wouldn't get freed while being used,
the RCU read side locking present with the users isn't required anymore.
Drop it as well.This patch also updates all users of devfreq_recommended_opp() which was
returning an OPP received from the OPP core.Note that some of the OPP core routines have gained
rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
within them.Signed-off-by: Viresh Kumar
Reviewed-by: Chanwoo Choi [Devfreq]
Signed-off-by: Rafael J. Wysocki
27 Jan, 2017
1 commit
-
Let the OPP core provide helpers to register notifiers for any device,
instead of exposing srcu_head outside of the core.Signed-off-by: Viresh Kumar
Acked-by: MyungJoo Ham
Reviewed-by: Stephen Boyd
Signed-off-by: Rafael J. Wysocki
03 Jan, 2017
2 commits
-
This patch fixes the wrong return value. If devfreq driver requires the wrong
and non-available governor, it is fail. So, this patch returns the error
insead of -EPROBE_DEFER.Fixes: 403e0689d2a9 (PM / devfreq: exynos: Add support of bus frequency of sub-blocks using passive governor)
Signed-off-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki -
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: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name)
Signed-off-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki
08 Dec, 2016
3 commits
-
The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.In short, the OPP pointer saved in 'rk3399_dmcfreq' can become invalid
under your nose, as the OPP core may free it.Fix various abuses around OPP structures and calls.
Reviewed-by: Chanwoo Choi
Signed-off-by: Viresh Kumar
Signed-off-by: Rafael J. Wysocki -
This call never had the rcu_read_lock() counterpart. Remove the unlock
part as well.Signed-off-by: Viresh Kumar
Reviewed-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki -
The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.In short, the OPP pointer saved 'struct exynos_bus' can become invalid
under your nose, as the OPP core may free it.Fix various abuses around OPP structures and calls.
Signed-off-by: Viresh Kumar
Acked-by: Chanwoo Choi
Tested-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki
17 Nov, 2016
8 commits
-
This patch uses the resource-managed to add the devfreq device.
This function will make it easy to handle the devfreq device.- struct devfreq *devm_devfreq_add_device(struct device *dev,
struct devfreq_dev_profile *profile,
const char *governor_name,
void *data);Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
The function name in the comment was incorrect.
Signed-off-by: MyungJoo Ham
Reviewed-by: Chanwoo Choi -
The mutex is not used at all, remove it.
Signed-off-by: Axel Lin
Acked-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
The rest of the code uses ARRAY_SIZE to count the number of entries in
ppmu_events array. The NULL terminated entry makes ARRAY_SIZE return
off-by-one value.Signed-off-by: Axel Lin
Acked-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/devfreq/event/exynos-ppmu.ko | grep alias
$After this patch:
$ modinfo drivers/devfreq/event/exynos-ppmu.ko | grep alias
alias: of:N*T*Csamsung,exynos-ppmu-v2C*
alias: of:N*T*Csamsung,exynos-ppmu-v2
alias: of:N*T*Csamsung,exynos-ppmuC*
alias: of:N*T*Csamsung,exynos-ppmuSigned-off-by: Javier Martinez Canillas
Signed-off-by: MyungJoo Ham -
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/devfreq/event/rockchip-dfi.ko | grep alias
$After this patch:
$ modinfo drivers/devfreq/event/rockchip-dfi.ko | grep alias
alias: of:N*T*Crockchip,rk3399-dfiC*
alias: of:N*T*Crockchip,rk3399-dfiSigned-off-by: Javier Martinez Canillas
Signed-off-by: MyungJoo Ham -
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/devfreq/event/exynos-nocp.ko | grep alias
$After this patch:
$ modinfo drivers/devfreq/event/exynos-nocp.ko | grep alias
alias: of:N*T*Csamsung,exynos5420-nocpC*
alias: of:N*T*Csamsung,exynos5420-nocpSigned-off-by: Javier Martinez Canillas
Signed-off-by: MyungJoo Ham -
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
$After this patch:
$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
alias: of:N*T*Crockchip,rk3399-dmcC*
alias: of:N*T*Crockchip,rk3399-dmcSigned-off-by: Javier Martinez Canillas
Signed-off-by: MyungJoo Ham
11 Oct, 2016
4 commits
-
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: Tobias Jakobi
Acked-by: MyungJoo Ham
Signed-off-by: Rafael J. Wysocki -
Use devfreq_list_lock around list_del() to prevent list corruption.
Signed-off-by: Axel Lin
Acked-by: MyungJoo Ham
Signed-off-by: Rafael J. Wysocki -
load_count/total_count are reset by devfreq_event_get_event(), so
remove the redundant code in exynos_nocp_get_event().Signed-off-by: Axel Lin
Acked-by: Chanwoo Choi
[ rjw: Subject/changelog ]
Signed-off-by: Rafael J. Wysocki -
This driver uses devm_regmap_init_mmio(), so select REGMAP_MMIO to avoid
build failure.Signed-off-by: Axel Lin
Acked-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki
19 Sep, 2016
2 commits
-
Current code uses devm_regulator_get() in .probe so a regulator_put() will
be automatically called when unload the module. Remove the explictly
regulator_put() call and then we can also remove rk3399_dmcfreq_remove().Signed-off-by: Axel Lin
Reviewed-by: Chanwoo Choi
Acked-by: MyungJoo Ham
Signed-off-by: Rafael J. Wysocki -
The newly added ARM_RK3399_DMC_DEVFREQ driver requires the
DEVFREQ_EVENT_ROCKCHIP_DFI driver and tries to turn that on through
a 'select' statement, and that in turn has a dependency on
PM_DEVFREQ_EVENT, which may be disabled here:warning: (ARM_RK3399_DMC_DEVFREQ) selects DEVFREQ_EVENT_ROCKCHIP_DFI which has unmet direct dependencies (PM_DEVFREQ && PM_DEVFREQ_EVENT && ARCH_ROCKCHIP)
We probably want a 'depends on' here, but other drivers use 'select'
too, so for consistency I'm doing the same.Signed-off-by: Arnd Bergmann
Fixes: 5a893e31a636 (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
Acked-by: Chanwoo Choi
Acked-by: MyungJoo Ham
Signed-off-by: Rafael J. Wysocki
15 Sep, 2016
1 commit
-
This reverts the Tegra part of commit 797da5598f3a (PM / devfreq: Add
COMPILE_TEST for build coverage) that introduced a build failute in
in linux-next.[ rjw: Changelog ]
Signed-off-by: Stephen Rothwell
Signed-off-by: Rafael J. Wysocki
06 Sep, 2016
1 commit
-
base on dfi result, we do ddr frequency scaling, register
dmc driver to devfreq framework, and use simple-ondemand
policy.Signed-off-by: Lin Huang
Signed-off-by: MyngJoo Ham
Reviewed-by: Chanwoo Choi