]> www.infradead.org Git - users/dwmw2/linux.git/commit
soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list
authorHerve Codina <herve.codina@bootlin.com>
Mon, 1 Jul 2024 11:30:34 +0000 (13:30 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jul 2024 11:24:58 +0000 (12:24 +0100)
commit37797c605da33445adc112561695f70bfaa11133
treebb1671cadb1e5df34e1c2aff4e0295e5ca3ea97b
parentb81cfa66435bdab896b4c24e11d24ec33bdb0601
soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list

qmc_chan_get_byphandle() and the resource managed version retrieve a
channel from a simple phandle.

Extend the API and introduce qmc_chan_get_byphandles_index() and the
resource managed version in order to retrieve a channel from a phandle
list using the provided index to identify the phandle in the list.

Also update qmc_chan_get_byphandle() and the resource managed version to
use qmc_chan_get_byphandles_index() and so avoid code duplication.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-8-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/soc/fsl/qe/qmc.c
include/soc/fsl/qe/qmc.h