[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b225c56612ff01845a90388be0945c7d0b3f0d2.camel@pengutronix.de>
Date: Fri, 14 Nov 2025 17:02:11 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Shawn Guo
<shawnguo@...nel.org>, Fabio Estevam <festevam@...il.com>, Daniel Baluta
<daniel.baluta@....com>, Shengjiu Wang <shengjiu.wang@....com>, Frank Li
<Frank.Li@....com>
Cc: devicetree@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Pengutronix Kernel Team
<kernel@...gutronix.de>
Subject: Re: [PATCH v5 4/6] reset: imx8mp-audiomix: Extend the driver usage
On Fr, 2025-11-14 at 05:37 -0800, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
>
> Switch to per-device reset map to allow reusing the driver for other NXP
> block control IPs.
>
> Reviewed-by: Daniel Baluta <daniel.baluta@....com>
> Reviewed-by: Frank Li <Frank.Li@....com>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
> ---
> drivers/reset/reset-imx8mp-audiomix.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/reset/reset-imx8mp-audiomix.c b/drivers/reset/reset-imx8mp-audiomix.c
> index 35df9bd5f71a..d3396f37d1ff 100644
> --- a/drivers/reset/reset-imx8mp-audiomix.c
> +++ b/drivers/reset/reset-imx8mp-audiomix.c
> @@ -24,7 +24,12 @@ struct imx8mp_reset_map {
> bool active_low;
> };
>
> -static const struct imx8mp_reset_map reset_map[] = {
> +struct imx8mp_reset_info {
> + const struct imx8mp_reset_map *map;
> + int num_lines;
> +};
> +
> +static const struct imx8mp_reset_map imx8mp_reset_map[] = {
> [IMX8MP_AUDIOMIX_EARC_RESET] = {
> .offset = IMX8MP_AUDIOMIX_EARC_RESET_OFFSET,
> .bit = 0,
> @@ -42,9 +47,15 @@ static const struct imx8mp_reset_map reset_map[] = {
> },
> };
>
> +static const struct imx8mp_reset_info imx8mp_reset_info = {
> + .map = imx8mp_reset_map,
> + .num_lines = ARRAY_SIZE(imx8mp_reset_map),
> +};
> +
> struct imx8mp_audiomix_reset {
> struct reset_controller_dev rcdev;
> struct regmap *regmap;
> + const struct imx8mp_reset_info *rinfo;
Since only rinfo->map is used in imx8mp_audiomix_update(), you could
directly store a
const struct imx8mp_reset_map *map;
regards
Philipp
Powered by blists - more mailing lists