[PATCH] media: rc: meson-ir: support MMIO regmaps to access registers

Dan Carpenter dan.carpenter at linaro.org
Tue May 16 04:52:47 PDT 2023


On Tue, May 16, 2023 at 07:47:24PM +0800, Zelong Dong wrote:
> Hi Dan Carpenter,
> 
> Thanks for your review.
> 
> Neil suggest to use devm_platform_ioremap_resource(), would it be better
> like this?
> 
> 	res_start = devm_platform_ioremap_resource(pdev, 0);;
> 	if (IS_ERR(res_start))
>         	return PTR_ERR(res_start);
> 
> 	ir->reg = devm_regmap_init_mmio(&pdev->dev, res_start,
>                                 	&meson_ir_regmap_config);
> 	if (IS_ERR(ir->reg))
>         	return PTR_ERR(ir->reg);

Yep.  That works.

regards,
dan carpenter





More information about the linux-amlogic mailing list