[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ef5047f-5728-3729-ddcc-c3a90eeb0483@gmail.com>
Date: Tue, 31 Jan 2023 14:24:07 +0100
From: Matthias Brugger <matthias.bgg@...il.com>
To: Roger Lu <roger.lu@...iatek.com>,
Enric Balletbo Serra <eballetbo@...il.com>,
Kevin Hilman <khilman@...nel.org>,
Nicolas Boichat <drinkcat@...gle.com>
Cc: Fan Chen <fan.chen@...iatek.com>,
Jia-wei Chang <jia-wei.chang@...iatek.com>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH v4 07/14] soc: mediatek: mtk-svs: keep svs alive if
CONFIG_DEBUG_FS not supported
On 11/01/2023 08:45, Roger Lu wrote:
> Some projects might not support CONFIG_DEBUG_FS but still needs svs to be
> alive. Therefore, enclose debug cmd codes with CONFIG_DEBUG_FS to make sure
> svs can be alive when CONFIG_DEBUG_FS not supported.
>
> Signed-off-by: Roger Lu <roger.lu@...iatek.com>
Applied, thanks!
> ---
> drivers/soc/mediatek/mtk-svs.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
> index a3c84e819bc5..70ca9c9acae0 100644
> --- a/drivers/soc/mediatek/mtk-svs.c
> +++ b/drivers/soc/mediatek/mtk-svs.c
> @@ -138,6 +138,7 @@
>
> static DEFINE_SPINLOCK(svs_lock);
>
> +#ifdef CONFIG_DEBUG_FS
> #define debug_fops_ro(name) \
> static int svs_##name##_debug_open(struct inode *inode, \
> struct file *filp) \
> @@ -170,6 +171,7 @@ static DEFINE_SPINLOCK(svs_lock);
> }
>
> #define svs_dentry_data(name) {__stringify(name), &svs_##name##_debug_fops}
> +#endif
>
> /**
> * enum svsb_phase - svs bank phase enumeration
> @@ -652,6 +654,7 @@ static int svs_adjust_pm_opp_volts(struct svs_bank *svsb)
> return ret;
> }
>
> +#ifdef CONFIG_DEBUG_FS
> static int svs_dump_debug_show(struct seq_file *m, void *p)
> {
> struct svs_platform *svsp = (struct svs_platform *)m->private;
> @@ -867,6 +870,7 @@ static int svs_create_debug_cmds(struct svs_platform *svsp)
>
> return 0;
> }
> +#endif /* CONFIG_DEBUG_FS */
>
> static u32 interpolate(u32 f0, u32 f1, u32 v0, u32 v1, u32 fx)
> {
> @@ -2476,11 +2480,13 @@ static int svs_probe(struct platform_device *pdev)
> goto svs_probe_iounmap;
> }
>
> +#ifdef CONFIG_DEBUG_FS
> ret = svs_create_debug_cmds(svsp);
> if (ret) {
> dev_err(svsp->dev, "svs create debug cmds fail: %d\n", ret);
> goto svs_probe_iounmap;
> }
> +#endif
>
> return 0;
>
Powered by blists - more mailing lists