29 Sep, 2020

1 commit

  • Previously, devfreq core support 'devfreq-events' property in order to get
    the devfreq-event device by phandle. But, 'devfreq-events' property name is
    not proper on devicetree binding because this name doesn't mean
    the any h/w attribute.

    The devfreq-event core hand over the rights to decide the property name
    for getting the devfreq-event device on devicetree. Each devfreq-event driver
    will decide the property name on devicetree binding and then pass
    the their own property name to devfreq_event_get_edev_by_phandle function.

    And change the prototype of devfreq_event_get_edev_count function
    because of used deprecated 'devfreq-events' property.

    Acked-by: Krzysztof Kozlowski
    Signed-off-by: Chanwoo Choi

    Chanwoo Choi
     

30 Jul, 2020

1 commit

  • Booting a recent kernel on a rk3399-based system (nanopc-t4),
    equipped with a recent u-boot and ATF results in an Oops due
    to a NULL pointer dereference.

    This turns out to be due to the rk3399-dmc driver looking for
    an *undocumented* property (rockchip,pmu), and happily using
    a NULL pointer when the property isn't there.

    Instead, make most of what was brought in with 9173c5ceb035
    ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters
    to TF-A.") conditioned on finding this property in the device-tree,
    preventing the driver from exploding.

    Cc: stable@vger.kernel.org
    Fixes: 9173c5ceb035 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.")
    Signed-off-by: Marc Zyngier
    Signed-off-by: Chanwoo Choi

    Marc Zyngier
     

30 Dec, 2019

2 commits


24 Aug, 2019

1 commit


05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms and conditions of the gnu general public license
    version 2 as published by the free software foundation this program
    is distributed in the hope it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 263 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

16 Apr, 2019

2 commits


18 Jul, 2018

4 commits

  • The opp table is not removed when the driver is unloaded neither when
    there is an error within probe, so if the driver is reloaded the opp
    core shows the following warning:

    rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
    200000000, volt: 900000, enabled: 1. New: freq: 200000000,
    volt: 900000, enabled: 1
    rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
    400000000, volt: 900000, enabled: 1. New: freq: 400000000,
    volt: 900000, enabled: 1
    rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
    666000000, volt: 900000, enabled: 1. New: freq: 666000000,
    volt: 900000, enabled: 1
    rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
    800000000, volt: 900000, enabled: 1. New: freq: 800000000,
    volt: 900000, enabled: 1
    rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
    928000000, volt: 900000, enabled: 1. New: freq: 928000000,
    volt: 900000, enabled: 1

    This patch fixes the error path in the probe function and adds a .remove
    function to properly cleanup the opp table on unloading.

    Fixes: 5a893e31a636c (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Enric Balletbo i Serra
     
  • Fix some spelling mistakes in error and debug messages.

    Signed-off-by: Enric Balletbo i Serra
    Signed-off-by: MyungJoo Ham

    Enric Balletbo i Serra
     
  • We just return -EPROBE_DEFER error code to caller and do not
    print error message when try to get center logic regulator
    and DMC clock defer.

    Signed-off-by: Lin Huang
    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Lin Huang
     
  • We have already wait dcf done in ATF, so don't need wait dcf irq
    in kernel, besides, clear dcf irq in kernel will import competiton
    between kernel and ATF, only handle dcf irq in ATF is a better way.

    Signed-off-by: Lin Huang
    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Enric Balletbo i Serra
     

26 Oct, 2017

1 commit

  • Prior to that, the devfreq device uses the governor name when adding
    the itself. In order to prevent the mistake used the wrong governor name,
    this patch defines the governor name as a constant and then uses them
    instead of using the string directly.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org

    Chanwoo Choi
     

06 Jul, 2017

1 commit

  • platform_get_irq() returns an error code, but the rk3399_dmc
    driver ignores it and always returns -EINVAL. This is not correct,
    and prevents -EPROBE_DEFER from being propagated properly.

    Notice that platform_get_irq() no longer returns 0 on error:
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af

    Print and propagate the return value of platform_get_irq on failure.

    Reviewed-by: Chanwoo Choi
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: MyungJoo Ham

    Gustavo A. R. Silva
     

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

    Viresh Kumar
     

08 Dec, 2016

2 commits


17 Nov, 2016

2 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

    Chanwoo Choi
     
  • 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-dmc

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: MyungJoo Ham

    Javier Martinez Canillas
     

19 Sep, 2016

1 commit


06 Sep, 2016

1 commit