]> Gentwo Git Trees - linux/.git/commit
remoteproc: imx_rproc: Introduce start/stop/detect_mode ops for imx_rproc_dcfg
authorPeng Fan <peng.fan@nxp.com>
Wed, 10 Sep 2025 07:11:45 +0000 (15:11 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 15 Sep 2025 16:03:02 +0000 (10:03 -0600)
commitff24e5b26dc6853364b0c006130b653f65a15acd
treefc688ed75626524f5e5e25960914711b4fa26f1b
parent2433961962be8b8ff32058763339b818128e8ff0
remoteproc: imx_rproc: Introduce start/stop/detect_mode ops for imx_rproc_dcfg

Simplify the logic in imx_rproc_start(), imx_rproc_stop() and
imx_rproc_detect_mode(), introduce start, stop and detect_mode ops for the
imx_rproc_dcfg structure. Allow each platform to provide its own
implementation of start/stop/detect_mode operations, and prepare to
eliminate the need for multiple switch-case statements.

Improve code readability and maintainability by encapsulating
platform-specific behavior.

No functional changes.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250910-imx-rproc-cleanup-v2-1-10386685b8a9@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/imx_rproc.c
drivers/remoteproc/imx_rproc.h