Re: [PATCH v10 4/5] spmi: mediatek: Add support for MT8195

From: Stephen Boyd
Date: Fri Aug 06 2021 - 13:49:23 EST


Quoting Hsin-Hsiung Wang (2021-08-02 23:34:20)
> From: Henry Chen <henryc.chen@xxxxxxxxxxxx>
>
> Add spmi support for MT8195.
>
> Signed-off-by: Henry Chen <henryc.chen@xxxxxxxxxxxx>

Missing Signed-off-by from hsin-hsiung.wang here

> ---
> changes since v9:
> - No change.
> ---
> drivers/spmi/spmi-mtk-pmif.c | 90 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 90 insertions(+)
>
> diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c
> index 94c45d46ab0c..0c320801c9d5 100644
> --- a/drivers/spmi/spmi-mtk-pmif.c
> +++ b/drivers/spmi/spmi-mtk-pmif.c
> @@ -348,6 +427,14 @@ static const struct pmif_data mt6873_pmif_arb = {
> .soc_chan = 2,
> };
>
> +static const struct pmif_data mt8195_pmif_arb[] = {

This is an array of type pmif_data.

> + {
> + .regs = mt8195_regs,
> + .spmimst_regs = mt8195_spmi_regs,
> + .soc_chan = 2,
> + },
> +};
> +
> static int mtk_spmi_probe(struct platform_device *pdev)
> {
> struct pmif *arb;
> @@ -444,6 +531,9 @@ static const struct of_device_id mtk_spmi_match_table[] = {
> {
> .compatible = "mediatek,mt6873-spmi",
> .data = &mt6873_pmif_arb,

mt6873_pmif_arb is not an array, see the context header above.

How does this work? Has this been tested?

> + }, {
> + .compatible = "mediatek,mt8195-spmi",
> + .data = &mt8195_pmif_arb,
> }, {
> /* sentinel */
> },
> --
> 2.18.0
>