summaryrefslogtreecommitdiff
path: root/drivers/devfreq/mtk-cci-devfreq.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09PM / devfreq: mediatek: protect oop in critical sessionMark Tseng1-3/+3
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>
2023-07-23PM / devfreq: Explicitly include correct DT includesRob Herring1-1/+0
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>
2023-05-29PM / devfreq: mtk-cci: Fix variable deferencing before NULL checkSukrut Bellary1-1/+2
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>
2022-09-25PM / devfreq: mtk-cci: Handle sram regulator probe deferralAngeloGioacchino Del Regno1-2/+6
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>
2022-07-15PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driverJohnson Wang1-0/+440
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>