mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Echo Zhang <echo.zhang@mediatek.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	MMDVFS Team <linux-mediatek@lists.infradead.org>,
	kyrie.wu@mediatek.com, ming-fan.chen@mediatek.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH 3/7] soc: mediatek: add MMDVFS core driver
Date: Wed, 25 Nov 2026 11:54:58 +0100	[thread overview]
Message-ID: <647d4527-dd99-4f1e-98ff-a6a5317560e6@kernel.org> (raw)
In-Reply-To: <20261125060037.649659-4-echo.zhang@mediatek.com>

On 25/11/2026 07:00, Echo Zhang wrote:
> Add the common MediaTek MMDVFS driver framework.
> 
> The core driver handles device probing, SoC data selection, clock provider
> registration, power-management notification, and dispatch to the
> microprocessor transport used for runtime performance voting.

I don't get why DVFS driver is a soc driver. This should use proper
Linux subsystems and be placed there.

> 
> Signed-off-by: Echo Zhang <echo.zhang@mediatek.com>
> ---
>  drivers/soc/mediatek/Kconfig                  |  19 +
>  drivers/soc/mediatek/Makefile                 |   1 +
>  drivers/soc/mediatek/mmdvfs/Makefile          |   6 +
>  drivers/soc/mediatek/mmdvfs/mmdvfs-clk.c      | 462 ++++++++++++++
>  drivers/soc/mediatek/mmdvfs/mmdvfs-core.c     | 581 ++++++++++++++++++
>  drivers/soc/mediatek/mmdvfs/mmdvfs-internal.h | 305 +++++++++
>  include/soc/mediatek/mmdvfs.h                 |  72 +++
>  7 files changed, 1446 insertions(+)
>  create mode 100644 drivers/soc/mediatek/mmdvfs/Makefile
>  create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-clk.c
>  create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-core.c
>  create mode 100644 drivers/soc/mediatek/mmdvfs/mmdvfs-internal.h
>  create mode 100644 include/soc/mediatek/mmdvfs.h
> 
> diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
> index d7293977f06e..bb273a4461f0 100644
> --- a/drivers/soc/mediatek/Kconfig
> +++ b/drivers/soc/mediatek/Kconfig
> @@ -60,6 +60,25 @@ config MTK_REGULATOR_COUPLER
>  	default ARCH_MEDIATEK
>  	depends on REGULATOR
>  
> +config MTK_MMDVFS
> +	tristate "MediaTek MMDVFS support"
> +	depends on ARCH_MEDIATEK || COMPILE_TEST
> +	depends on MTK_VCP_RPROC

Does not exist.

> +	help
> +	  Say yes here to add support for the MediaTek Multimedia Dynamic
> +	  Voltage and Frequency Scaling controller. The controller provides
> +	  virtual clocks for multimedia hardware blocks and coordinates
> +	  performance votes with platform voltage resources.
> +

...

> +/* Logging macros */
> +#define mmdvfs_dbg(dev, fmt, args...) \
> +	dev_dbg(dev, "[mmdvfs] " fmt, ##args)
> +#define mmdvfs_info(dev, fmt, args...) \
> +	dev_info(dev, "[mmdvfs] " fmt, ##args)
> +#define mmdvfs_warn(dev, fmt, args...) \
> +	dev_warn(dev, "[mmdvfs] " fmt, ##args)
> +#define mmdvfs_err(dev, fmt, args...) \
> +	dev_err(dev, "[mmdvfs] " fmt, ##args)
> +

No, do not reimplement standard Linux kernel APIs/frameworks.

This applies EVERYWHERE here.



Best regards,
Krzysztof

  parent reply	other threads:[~2026-11-25 10:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:00 [PATCH 0/7] soc: mediatek: add MMDVFS support for MT8196 Echo Zhang
2026-11-25  6:00 ` [PATCH 1/7] dt-bindings: clock: mediatek: add MT8196 MMDVFS clock IDs Echo Zhang
2026-11-25 10:55   ` Krzysztof Kozlowski
2026-11-25  6:00 ` [PATCH 2/7] dt-bindings: soc: mediatek: add MMDVFS binding Echo Zhang
2026-11-25  8:32   ` Roman Vivchar
2026-11-25 10:58   ` Krzysztof Kozlowski
2026-11-25  6:00 ` [PATCH 3/7] soc: mediatek: add MMDVFS core driver Echo Zhang
2026-11-25  8:35   ` Roman Vivchar
2026-11-25 10:54   ` Krzysztof Kozlowski [this message]
2026-11-25  6:00 ` [PATCH 4/7] soc: mediatek: mmdvfs: add VCP backend Echo Zhang
2026-11-25  8:38   ` Roman Vivchar
2026-11-25 10:59   ` Krzysztof Kozlowski
2026-11-25 11:00   ` Krzysztof Kozlowski
2026-11-25  6:00 ` [PATCH 5/7] soc: mediatek: mmdvfs: add MT8196 support Echo Zhang
2026-11-25  6:00 ` [PATCH 6/7] soc: mediatek: mmdvfs: add read-only status debug Echo Zhang
2026-11-25  6:00 ` [PATCH 7/7] MAINTAINERS: add MediaTek MMDVFS entry Echo Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=647d4527-dd99-4f1e-98ff-a6a5317560e6@kernel.org \
    --to=krzk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=echo.zhang@mediatek.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=justinstitt@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kyrie.wu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=matthias.bgg@gmail.com \
    --cc=ming-fan.chen@mediatek.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®