RE: [PATCH 07/10] media: rcar-fcp: Handle resets

From: Biju Das

Date: Fri Sep 18 2026 - 08:01:39 EST


Hi Laurent,

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Sent: 18 September 2026 12:11
> Subject: Re: [PATCH 07/10] media: rcar-fcp: Handle resets
>
> On Fri, Sep 18, 2026 at 11:03:25AM +0000, Biju Das wrote:
> > On 17 September 2026 13:05, Paul Elder wrote:
> > >
> > > [You don't often get email from paul.elder+renesas@xxxxxxxxxxxxxxxx.
> > > Learn why this is important at
> > > https://aka.ms/LearnAboutSenderIdentification ]
>
> Don't worry, we plan to work on VCON support for X5H, you will get more e-mails from Paul :-)

Ok.

> > > On some versions of the FCP, such as the one on the X5H, reset
> > > control is required to operate the FCP.
> > >
> > > Add support for handling resets optionally, to continue supporting
> > > versions that do not require it.
> > >
> > > Signed-off-by: Paul Elder <paul.elder+renesas@xxxxxxxxxxxxxxxx>
> > > ---
> > > drivers/media/platform/renesas/rcar-fcp.c | 34
> > > +++++++++++++++++++++++++++++--
> > > 1 file changed, 32 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/media/platform/renesas/rcar-fcp.c
> > > b/drivers/media/platform/renesas/rcar-fcp.c
> > > index
> > > d99b3ff976e80f275af19e5dc02c6e1de98c38a3..15bcbbda3b853f71780aae876f
> > > 6440b33addf193 100644
> > > --- a/drivers/media/platform/renesas/rcar-fcp.c
> > > +++ b/drivers/media/platform/renesas/rcar-fcp.c
> > > @@ -18,6 +18,7 @@
> > > #include <linux/platform_device.h>
> > > #include <linux/pm_runtime.h>
> > > #include <linux/property.h>
> > > +#include <linux/reset.h>
> > > #include <linux/slab.h>
> > >
> > > #include <media/rcar-fcp.h>
> > > @@ -63,6 +64,8 @@
> > > #define RCAR_FCP_REG_BA_REF_Y2 0x0118
> > > #define RCAR_FCP_REG_BA_REF_C 0x011c
> > >
> > > +struct reset_control;
> > > +
> > > enum rcar_fcp_type {
> > > RCAR_FCPF,
> > > RCAR_FCPV,
> > > @@ -73,6 +76,7 @@ struct rcar_fcp_device {
> > > struct device *dev;
> > > void __iomem *base;
> > > enum rcar_fcp_type type;
> > > + struct reset_control *rstc;
> >
> > You could drop this global variable. Please See below.
> >
> > > };
> > >
> > > static LIST_HEAD(fcp_devices);
> > > @@ -262,12 +266,19 @@ static int rcar_fcp_probe(struct platform_device *pdev)
> > > fcp->dev = &pdev->dev;
> > > fcp->type = (enum
> > > rcar_fcp_type)device_get_match_data(&pdev->dev);
> > >
> > > + platform_set_drvdata(pdev, fcp);
> >
> > This can be moved after the user.
> > > +
> > > fcp->base = devm_platform_ioremap_resource(pdev, 0);
> > > if (IS_ERR(fcp->base))
> > > return PTR_ERR(fcp->base);
> > >
> > > dma_set_max_seg_size(fcp->dev, UINT_MAX);
> > >
> > > + fcp->rstc = devm_reset_control_get_optional(&pdev->dev,
> > > + NULL);
> >
> > rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
> >
> > > + if (IS_ERR(fcp->rstc))
> > > + return dev_err_probe(&pdev->dev, PTR_ERR(fcp->rstc),
> > > + "failed to get reset
> > > + control\n");
> >
> >
> > platform_set_drvdata(pdev, rstc);
>
> I'd rather keep the rcar_fcp_device structure. When we'll add compression support to the FCP driver, we
> will need to access registers and other fields of rcar_fcp_device.

Ack.

Cheers,
Biju