Re: [PATCH v13 04/13] mfd: Add Ingenic TCU driver

From: Paul Burton
Date: Tue Jun 25 2019 - 13:30:35 EST


Hi Paul,

On Tue, Jun 25, 2019 at 12:57:50AM +0200, Paul Cercueil wrote:
> +static const struct of_device_id ingenic_tcu_of_match[] = {
> + { .compatible = "ingenic,jz4740-tcu", .data = &jz4740_soc_info, },
> + { .compatible = "ingenic,jz4725b-tcu", .data = &jz4725b_soc_info, },
> + { .compatible = "ingenic,jz4770-tcu", .data = &jz4740_soc_info, },
> + { }
> +};

Nit: why not order these numerically? ie. 25b, 40, 70.

> +static struct regmap * __init ingenic_tcu_create_regmap(struct device_node *np)
> +{
> + struct resource res;
> + void __iomem *base;
> + struct regmap *map;
> +
> + if (!of_match_node(ingenic_tcu_of_match, np))
> + return ERR_PTR(-EINVAL);
> +
> + base = of_io_request_and_map(np, 0, "TCU");
> + if (IS_ERR(base))
> + return ERR_PTR(PTR_ERR(base));

This is equivalent to:

return ERR_CAST(base);

Apart from those:

Reviewed-by: Paul Burton <paul.burton@xxxxxxxx>

Thanks,
Paul