History log of /linux-master/drivers/devfreq/mtk-cci-devfreq.c
Revision Date Author Comments
# 6c29e29e 11-Oct-2023 Dan Carpenter <dan.carpenter@linaro.org>

PM / devfreq: mediatek: unlock on error in mtk_ccifreq_target()

Call mutex_unlock(&drv->reg_lock) before returning the error code.

Link: https://lore.kernel.org/all/1bada9b2-d276-4123-bfdf-03d165569543@moroto.mountain/
Fixes: d2805601988f ("PM / devfreq: mediatek: protect oop in critical session")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# d2805601 17-Aug-2023 Mark Tseng <chun-jen.tseng@mediatek.com>

PM / devfreq: mediatek: protect oop in critical session

mtk_ccifreq_opp_notifier is reenter function when policy0 / policy6
change freq, so mutex_lock should protect all OPP event.

Link: https://lore.kernel.org/lkml/20230818021741.6173-1-chun-jen.tseng@mediatek.com/T/
Signed-off-by: Mark Tseng <chun-jen.tseng@mediatek.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# 9027f2e7 14-Jul-2023 Rob Herring <robh@kernel.org>

PM / devfreq: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# a83bfdca 18-May-2023 Sukrut Bellary <sukrut.bellary@linux.com>

PM / devfreq: mtk-cci: Fix variable deferencing before NULL check

smatch warning:
drivers/devfreq/mtk-cci-devfreq.c:135 mtk_ccifreq_target()
warn: variable dereferenced before check 'drv' (see line 130)

This is based on static analysis only. Compilation tested.

Signed-off-by: Sukrut Bellary <sukrut.bellary@linux.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# e09bd575 13-Jul-2022 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

PM / devfreq: mtk-cci: Handle sram regulator probe deferral

If the regulator_get_optional() call for the SRAM regulator returns
a probe deferral, we must bail out and retry probing later: failing
to do this will produce unstabilities on platforms requiring the
handling for this regulator.

Fixes: b615b00c42da ("PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# 86d231b1 07-Jun-2022 Johnson Wang <johnson.wang@mediatek.com>

PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver

We introduce a devfreq driver for the MediaTek Cache Coherent Interconnect
(CCI) used by some MediaTek SoCs.

In this driver, we use the passive devfreq driver to get target frequencies
and adjust voltages accordingly. In MT8183 and MT8186, the MediaTek CCI
is supplied by the same regulators with the little core CPUs.

Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
Signed-off-by: Johnson Wang <johnson.wang@mediatek.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>