All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	wsa+renesas <wsa+renesas@sang-engineering.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li <Frank.Li@nxp.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"magnus.damm" <magnus.damm@gmail.com>,
	"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
Date: Mon, 5 Jan 2026 11:03:11 +0100	[thread overview]
Message-ID: <aVuMRpYkgPpHaG8E@tom-desktop> (raw)
In-Reply-To: <TY3PR01MB11346A08B97503E899897CFA98686A@TY3PR01MB11346.jpnprd01.prod.outlook.com>

Hi Biju,

On Mon, Jan 05, 2026 at 09:35:46AM +0000, Biju Das wrote:
> 
> 
> > -----Original Message-----
> > From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > Sent: 05 January 2026 09:33
> > To: Biju Das <biju.das.jz@bp.renesas.com>
> > Cc: Tommaso Merciai <tomm.merciai@gmail.com>; linux-renesas-soc@vger.kernel.org; wsa+renesas
> > <wsa+renesas@sang-engineering.com>; Alexandre Belloni <alexandre.belloni@bootlin.com>; Frank Li
> > <Frank.Li@nxp.com>; Philipp Zabel <p.zabel@pengutronix.de>; Geert Uytterhoeven
> > <geert+renesas@glider.be>; magnus.damm <magnus.damm@gmail.com>; linux-i3c@lists.infradead.org; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
> > 
> > Hi Biju,
> > Thanks for your review!
> > 
> > On Wed, Dec 31, 2025 at 09:04:16AM +0000, Biju Das wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > > > Sent: 31 December 2025 08:23
> > > > To: Tommaso Merciai <tomm.merciai@gmail.com>
> > > > Cc: linux-renesas-soc@vger.kernel.org; Biju Das
> > > > <biju.das.jz@bp.renesas.com>; Tommaso Merciai
> > > > <tommaso.merciai.xr@bp.renesas.com>; wsa+renesas
> > > > <wsa+renesas@sang-engineering.com>; Alexandre Belloni
> > > > <alexandre.belloni@bootlin.com>; Frank Li <Frank.Li@nxp.com>;
> > > > Philipp Zabel <p.zabel@pengutronix.de>; Geert Uytterhoeven
> > > > <geert+renesas@glider.be>; magnus.damm <magnus.damm@gmail.com>;
> > > > linux- i3c@lists.infradead.org; linux-kernel@vger.kernel.org
> > > > Subject: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
> > > >
> > > > The Renesas I3C controller does not retain its register state across
> > > > system suspend, requiring the driver to explicitly save and restore hardware configuration.
> > > >
> > > > Add suspend and resume NOIRQ callbacks to handle system sleep transitions.
> > > >
> > > > During suspend, save the Device Address Table (DAT) entries, assert
> > > > reset lines, and disable all related clocks to allow the controller to enter a low-power state.
> > > >
> > > > On resume, re-enable clocks and reset lines in the proper order.
> > > > Restore the REFCKCTL register, master dynamic address, and all DAT entries, then reinitialize the
> > controller.
> > > >
> > > > Store the REFCLK divider value, and the master dynamic address to
> > > > restore timing and addressing configuration after resume.
> > > >
> > > > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > > > ---
> > > > v2->v3:
> > > >  - Fixed error path into renesas_i3c_resume_noirq() and
> > > >    renesas_i3c_suspend_noirq() function.
> > > >  - Moved up one line sizeof(u32) * i3c->maxdevs into devm_kzalloc() call.
> > > >
> > > > v1->v2:
> > > >  - Updated commit as v1 has been split into smaller patches.
> > > >  - Use clock bulk API into renesas_i3c_suspend_noirq() and
> > > >    renesas_i3c_resume_noirq().
> > > >
> > > >  drivers/i3c/master/renesas-i3c.c | 89
> > > > ++++++++++++++++++++++++++++++++
> > > >  1 file changed, 89 insertions(+)
> > > >
> > > > diff --git a/drivers/i3c/master/renesas-i3c.c
> > > > b/drivers/i3c/master/renesas-i3c.c
> > > > index b065b8d4b138..e33ff16efdb3 100644
> > > > --- a/drivers/i3c/master/renesas-i3c.c
> > > > +++ b/drivers/i3c/master/renesas-i3c.c
> > > > @@ -256,16 +256,19 @@ struct renesas_i3c {
> > > >  	enum i3c_internal_state internal_state;
> > > >  	u16 maxdevs;
> > > >  	u32 free_pos;
> > > > +	u32 dyn_addr;
> > > >  	u32 i2c_STDBR;
> > > >  	u32 i3c_STDBR;
> > > >  	unsigned long rate;
> > > >  	u8 addrs[RENESAS_I3C_MAX_DEVS];
> > > >  	struct renesas_i3c_xferqueue xferqueue;
> > > >  	void __iomem *regs;
> > > > +	u32 *DATBASn;
> > > >  	struct clk_bulk_data *clks;
> > > >  	u8 num_clks;
> > > >  	struct reset_control *presetn;
> > > >  	struct reset_control *tresetn;
> > > > +	u8 refclk_div;
> > > >  };
> > > >
> > > >  struct renesas_i3c_i2c_dev_data {
> > > > @@ -609,6 +612,7 @@ static int renesas_i3c_bus_init(struct i3c_master_controller *m)
> > > >  					   EXTBR_EBRHP(pp_high_ticks));
> > > >
> > > >  	renesas_writel(i3c->regs, REFCKCTL, REFCKCTL_IREFCKS(cks));
> > > > +	i3c->refclk_div = cks;
> > > >
> > > >  	/* I3C hw init*/
> > > >  	renesas_i3c_hw_init(i3c);
> > > > @@ -617,6 +621,7 @@ static int renesas_i3c_bus_init(struct i3c_master_controller *m)
> > > >  	if (ret < 0)
> > > >  		return ret;
> > > >
> > > > +	i3c->dyn_addr = ret;
> > > >  	renesas_writel(i3c->regs, MSDVAD, MSDVAD_MDYAD(ret) |
> > > > MSDVAD_MDYADV);
> > > >
> > > >  	memset(&info, 0, sizeof(info));
> > > > @@ -1362,6 +1367,12 @@ static int renesas_i3c_probe(struct platform_device *pdev)
> > > >  	i3c->maxdevs = RENESAS_I3C_MAX_DEVS;
> > > >  	i3c->free_pos = GENMASK(i3c->maxdevs - 1, 0);
> > > >
> > > > +	/* Allocate dynamic Device Address Table backup. */
> > > > +	i3c->DATBASn = devm_kzalloc(&pdev->dev, sizeof(u32) * i3c->maxdevs,
> > > > +				    GFP_KERNEL);
> > > > +	if (!i3c->DATBASn)
> > > > +		return -ENOMEM;
> > > > +
> > > >  	return i3c_master_register(&i3c->base, &pdev->dev,
> > > > &renesas_i3c_ops, false);  }
> > > >
> > > > @@ -1372,6 +1383,83 @@ static void renesas_i3c_remove(struct platform_device *pdev)
> > > >  	i3c_master_unregister(&i3c->base);
> > > >  }
> > > >
> > > > +static int renesas_i3c_suspend_noirq(struct device *dev) {
> > > > +	struct renesas_i3c *i3c = dev_get_drvdata(dev);
> > > > +	int i, ret;
> > > > +
> > > > +	i2c_mark_adapter_suspended(&i3c->base.i2c);
> > > > +
> > > > +	/* Store Device Address Table values. */
> > > > +	for (i = 0; i < i3c->maxdevs; i++)
> > > > +		i3c->DATBASn[i] = renesas_readl(i3c->regs, DATBAS(i));
> > > > +
> > > > +	ret = reset_control_assert(i3c->presetn);
> > > > +	if (ret)
> > > > +		goto err_mark_resumed;
> > > > +
> > > > +	ret = reset_control_assert(i3c->tresetn);
> > > > +	if (ret)
> > > > +		goto err_presetn;
> > > > +
> > > > +	clk_bulk_disable_unprepare(i3c->num_clks, i3c->clks);
> > >
> > > Why can't you use unlocked version clk_bulk_disable/enable(num_clks,
> > > clks); for suspend()/resume()?
> > 
> > I'm seeing the same calls into:
> > 
> >  - svc_i3c_runtime_suspend()
> 
> 
> Are they doing in  suspend_noirq callback(), if yes you could fix that driver as well.

Yes, but unfortunally I can't test the fix on this platform.
I will send v4 using:

	clk_bulk_disable(i3c->num_clks, i3c->clks) into renesas_i3c_suspend_noirq()

and 

	ret = clk_bulk_enable(i3c->num_clks, i3c->clks) into renesas_i3c_resume_noirq()

As you suggested, Thanks.

Kind Regards,
Tommaso

> 
> Cheers,
> Biju
> 
> > 
> > Into drivers/i3c/master/svc-i3c-master.c
> > 
> > >
> > > > +
> > > > +	return 0;
> > > > +
> > > > +err_presetn:
> > > > +	reset_control_deassert(i3c->presetn);
> > > > +err_mark_resumed:
> > > > +	i2c_mark_adapter_resumed(&i3c->base.i2c);
> > > > +
> > > > +	return ret;
> > > > +}
> > > > +
> > > > +static int renesas_i3c_resume_noirq(struct device *dev) {
> > > > +	struct renesas_i3c *i3c = dev_get_drvdata(dev);
> > > > +	int i, ret;
> > > > +
> > > > +	ret = reset_control_deassert(i3c->presetn);
> > > > +	if (ret)
> > > > +		return ret;
> > > > +
> > > > +	ret = reset_control_deassert(i3c->tresetn);
> > > > +	if (ret)
> > > > +		goto err_presetn;
> > > > +
> > > > +	ret = clk_bulk_prepare_enable(i3c->num_clks, i3c->clks);
> > >
> > > Same here.
> > 
> > Same here.
> > 
> > 
> > Thanks & Regards,
> > Tommaso
> > 
> > >
> > > > +	if (ret)
> > > > +		goto err_tresetn;
> > > > +
> > > > +	/* Re-store I3C registers value. */
> > > > +	renesas_writel(i3c->regs, REFCKCTL,
> > > > +		       REFCKCTL_IREFCKS(i3c->refclk_div));
> > > > +	renesas_writel(i3c->regs, MSDVAD, MSDVAD_MDYADV |
> > > > +		       MSDVAD_MDYAD(i3c->dyn_addr));
> > > > +
> > > > +	/* Restore Device Address Table values. */
> > > > +	for (i = 0; i < i3c->maxdevs; i++)
> > > > +		renesas_writel(i3c->regs, DATBAS(i), i3c->DATBASn[i]);
> > > > +
> > > > +	/* I3C hw init. */
> > > > +	renesas_i3c_hw_init(i3c);
> > > > +
> > > > +	i2c_mark_adapter_resumed(&i3c->base.i2c);
> > > > +
> > > > +	return 0;
> > > > +
> > > > +err_tresetn:
> > > > +	reset_control_assert(i3c->tresetn);
> > > > +err_presetn:
> > > > +	reset_control_assert(i3c->presetn);
> > > > +	return ret;
> > > > +}
> > > > +
> > > > +static const struct dev_pm_ops renesas_i3c_pm_ops = {
> > > > +	NOIRQ_SYSTEM_SLEEP_PM_OPS(renesas_i3c_suspend_noirq,
> > > > +				  renesas_i3c_resume_noirq)
> > > > +};
> > > > +
> > > >  static const struct of_device_id renesas_i3c_of_ids[] = {
> > > >  	{ .compatible = "renesas,r9a08g045-i3c" },
> > > >  	{ .compatible = "renesas,r9a09g047-i3c" }, @@ -1385,6 +1473,7 @@
> > > > static struct platform_driver renesas_i3c = {
> > > >  	.driver = {
> > > >  		.name = "renesas-i3c",
> > > >  		.of_match_table = renesas_i3c_of_ids,
> > > > +		.pm = pm_sleep_ptr(&renesas_i3c_pm_ops),
> > > >  	},
> > > >  };
> > > >  module_platform_driver(renesas_i3c);
> > > > --
> > > > 2.43.0
> > >

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

WARNING: multiple messages have this Message-ID (diff)
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	wsa+renesas <wsa+renesas@sang-engineering.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li <Frank.Li@nxp.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"magnus.damm" <magnus.damm@gmail.com>,
	"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
Date: Mon, 5 Jan 2026 11:03:11 +0100	[thread overview]
Message-ID: <aVuMRpYkgPpHaG8E@tom-desktop> (raw)
In-Reply-To: <TY3PR01MB11346A08B97503E899897CFA98686A@TY3PR01MB11346.jpnprd01.prod.outlook.com>

Hi Biju,

On Mon, Jan 05, 2026 at 09:35:46AM +0000, Biju Das wrote:
> 
> 
> > -----Original Message-----
> > From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > Sent: 05 January 2026 09:33
> > To: Biju Das <biju.das.jz@bp.renesas.com>
> > Cc: Tommaso Merciai <tomm.merciai@gmail.com>; linux-renesas-soc@vger.kernel.org; wsa+renesas
> > <wsa+renesas@sang-engineering.com>; Alexandre Belloni <alexandre.belloni@bootlin.com>; Frank Li
> > <Frank.Li@nxp.com>; Philipp Zabel <p.zabel@pengutronix.de>; Geert Uytterhoeven
> > <geert+renesas@glider.be>; magnus.damm <magnus.damm@gmail.com>; linux-i3c@lists.infradead.org; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
> > 
> > Hi Biju,
> > Thanks for your review!
> > 
> > On Wed, Dec 31, 2025 at 09:04:16AM +0000, Biju Das wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > > > Sent: 31 December 2025 08:23
> > > > To: Tommaso Merciai <tomm.merciai@gmail.com>
> > > > Cc: linux-renesas-soc@vger.kernel.org; Biju Das
> > > > <biju.das.jz@bp.renesas.com>; Tommaso Merciai
> > > > <tommaso.merciai.xr@bp.renesas.com>; wsa+renesas
> > > > <wsa+renesas@sang-engineering.com>; Alexandre Belloni
> > > > <alexandre.belloni@bootlin.com>; Frank Li <Frank.Li@nxp.com>;
> > > > Philipp Zabel <p.zabel@pengutronix.de>; Geert Uytterhoeven
> > > > <geert+renesas@glider.be>; magnus.damm <magnus.damm@gmail.com>;
> > > > linux- i3c@lists.infradead.org; linux-kernel@vger.kernel.org
> > > > Subject: [PATCH v3 4/4] i3c: renesas: Add suspend/resume support
> > > >
> > > > The Renesas I3C controller does not retain its register state across
> > > > system suspend, requiring the driver to explicitly save and restore hardware configuration.
> > > >
> > > > Add suspend and resume NOIRQ callbacks to handle system sleep transitions.
> > > >
> > > > During suspend, save the Device Address Table (DAT) entries, assert
> > > > reset lines, and disable all related clocks to allow the controller to enter a low-power state.
> > > >
> > > > On resume, re-enable clocks and reset lines in the proper order.
> > > > Restore the REFCKCTL register, master dynamic address, and all DAT entries, then reinitialize the
> > controller.
> > > >
> > > > Store the REFCLK divider value, and the master dynamic address to
> > > > restore timing and addressing configuration after resume.
> > > >
> > > > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > > > ---
> > > > v2->v3:
> > > >  - Fixed error path into renesas_i3c_resume_noirq() and
> > > >    renesas_i3c_suspend_noirq() function.
> > > >  - Moved up one line sizeof(u32) * i3c->maxdevs into devm_kzalloc() call.
> > > >
> > > > v1->v2:
> > > >  - Updated commit as v1 has been split into smaller patches.
> > > >  - Use clock bulk API into renesas_i3c_suspend_noirq() and
> > > >    renesas_i3c_resume_noirq().
> > > >
> > > >  drivers/i3c/master/renesas-i3c.c | 89
> > > > ++++++++++++++++++++++++++++++++
> > > >  1 file changed, 89 insertions(+)
> > > >
> > > > diff --git a/drivers/i3c/master/renesas-i3c.c
> > > > b/drivers/i3c/master/renesas-i3c.c
> > > > index b065b8d4b138..e33ff16efdb3 100644
> > > > --- a/drivers/i3c/master/renesas-i3c.c
> > > > +++ b/drivers/i3c/master/renesas-i3c.c
> > > > @@ -256,16 +256,19 @@ struct renesas_i3c {
> > > >  	enum i3c_internal_state internal_state;
> > > >  	u16 maxdevs;
> > > >  	u32 free_pos;
> > > > +	u32 dyn_addr;
> > > >  	u32 i2c_STDBR;
> > > >  	u32 i3c_STDBR;
> > > >  	unsigned long rate;
> > > >  	u8 addrs[RENESAS_I3C_MAX_DEVS];
> > > >  	struct renesas_i3c_xferqueue xferqueue;
> > > >  	void __iomem *regs;
> > > > +	u32 *DATBASn;
> > > >  	struct clk_bulk_data *clks;
> > > >  	u8 num_clks;
> > > >  	struct reset_control *presetn;
> > > >  	struct reset_control *tresetn;
> > > > +	u8 refclk_div;
> > > >  };
> > > >
> > > >  struct renesas_i3c_i2c_dev_data {
> > > > @@ -609,6 +612,7 @@ static int renesas_i3c_bus_init(struct i3c_master_controller *m)
> > > >  					   EXTBR_EBRHP(pp_high_ticks));
> > > >
> > > >  	renesas_writel(i3c->regs, REFCKCTL, REFCKCTL_IREFCKS(cks));
> > > > +	i3c->refclk_div = cks;
> > > >
> > > >  	/* I3C hw init*/
> > > >  	renesas_i3c_hw_init(i3c);
> > > > @@ -617,6 +621,7 @@ static int renesas_i3c_bus_init(struct i3c_master_controller *m)
> > > >  	if (ret < 0)
> > > >  		return ret;
> > > >
> > > > +	i3c->dyn_addr = ret;
> > > >  	renesas_writel(i3c->regs, MSDVAD, MSDVAD_MDYAD(ret) |
> > > > MSDVAD_MDYADV);
> > > >
> > > >  	memset(&info, 0, sizeof(info));
> > > > @@ -1362,6 +1367,12 @@ static int renesas_i3c_probe(struct platform_device *pdev)
> > > >  	i3c->maxdevs = RENESAS_I3C_MAX_DEVS;
> > > >  	i3c->free_pos = GENMASK(i3c->maxdevs - 1, 0);
> > > >
> > > > +	/* Allocate dynamic Device Address Table backup. */
> > > > +	i3c->DATBASn = devm_kzalloc(&pdev->dev, sizeof(u32) * i3c->maxdevs,
> > > > +				    GFP_KERNEL);
> > > > +	if (!i3c->DATBASn)
> > > > +		return -ENOMEM;
> > > > +
> > > >  	return i3c_master_register(&i3c->base, &pdev->dev,
> > > > &renesas_i3c_ops, false);  }
> > > >
> > > > @@ -1372,6 +1383,83 @@ static void renesas_i3c_remove(struct platform_device *pdev)
> > > >  	i3c_master_unregister(&i3c->base);
> > > >  }
> > > >
> > > > +static int renesas_i3c_suspend_noirq(struct device *dev) {
> > > > +	struct renesas_i3c *i3c = dev_get_drvdata(dev);
> > > > +	int i, ret;
> > > > +
> > > > +	i2c_mark_adapter_suspended(&i3c->base.i2c);
> > > > +
> > > > +	/* Store Device Address Table values. */
> > > > +	for (i = 0; i < i3c->maxdevs; i++)
> > > > +		i3c->DATBASn[i] = renesas_readl(i3c->regs, DATBAS(i));
> > > > +
> > > > +	ret = reset_control_assert(i3c->presetn);
> > > > +	if (ret)
> > > > +		goto err_mark_resumed;
> > > > +
> > > > +	ret = reset_control_assert(i3c->tresetn);
> > > > +	if (ret)
> > > > +		goto err_presetn;
> > > > +
> > > > +	clk_bulk_disable_unprepare(i3c->num_clks, i3c->clks);
> > >
> > > Why can't you use unlocked version clk_bulk_disable/enable(num_clks,
> > > clks); for suspend()/resume()?
> > 
> > I'm seeing the same calls into:
> > 
> >  - svc_i3c_runtime_suspend()
> 
> 
> Are they doing in  suspend_noirq callback(), if yes you could fix that driver as well.

Yes, but unfortunally I can't test the fix on this platform.
I will send v4 using:

	clk_bulk_disable(i3c->num_clks, i3c->clks) into renesas_i3c_suspend_noirq()

and 

	ret = clk_bulk_enable(i3c->num_clks, i3c->clks) into renesas_i3c_resume_noirq()

As you suggested, Thanks.

Kind Regards,
Tommaso

> 
> Cheers,
> Biju
> 
> > 
> > Into drivers/i3c/master/svc-i3c-master.c
> > 
> > >
> > > > +
> > > > +	return 0;
> > > > +
> > > > +err_presetn:
> > > > +	reset_control_deassert(i3c->presetn);
> > > > +err_mark_resumed:
> > > > +	i2c_mark_adapter_resumed(&i3c->base.i2c);
> > > > +
> > > > +	return ret;
> > > > +}
> > > > +
> > > > +static int renesas_i3c_resume_noirq(struct device *dev) {
> > > > +	struct renesas_i3c *i3c = dev_get_drvdata(dev);
> > > > +	int i, ret;
> > > > +
> > > > +	ret = reset_control_deassert(i3c->presetn);
> > > > +	if (ret)
> > > > +		return ret;
> > > > +
> > > > +	ret = reset_control_deassert(i3c->tresetn);
> > > > +	if (ret)
> > > > +		goto err_presetn;
> > > > +
> > > > +	ret = clk_bulk_prepare_enable(i3c->num_clks, i3c->clks);
> > >
> > > Same here.
> > 
> > Same here.
> > 
> > 
> > Thanks & Regards,
> > Tommaso
> > 
> > >
> > > > +	if (ret)
> > > > +		goto err_tresetn;
> > > > +
> > > > +	/* Re-store I3C registers value. */
> > > > +	renesas_writel(i3c->regs, REFCKCTL,
> > > > +		       REFCKCTL_IREFCKS(i3c->refclk_div));
> > > > +	renesas_writel(i3c->regs, MSDVAD, MSDVAD_MDYADV |
> > > > +		       MSDVAD_MDYAD(i3c->dyn_addr));
> > > > +
> > > > +	/* Restore Device Address Table values. */
> > > > +	for (i = 0; i < i3c->maxdevs; i++)
> > > > +		renesas_writel(i3c->regs, DATBAS(i), i3c->DATBASn[i]);
> > > > +
> > > > +	/* I3C hw init. */
> > > > +	renesas_i3c_hw_init(i3c);
> > > > +
> > > > +	i2c_mark_adapter_resumed(&i3c->base.i2c);
> > > > +
> > > > +	return 0;
> > > > +
> > > > +err_tresetn:
> > > > +	reset_control_assert(i3c->tresetn);
> > > > +err_presetn:
> > > > +	reset_control_assert(i3c->presetn);
> > > > +	return ret;
> > > > +}
> > > > +
> > > > +static const struct dev_pm_ops renesas_i3c_pm_ops = {
> > > > +	NOIRQ_SYSTEM_SLEEP_PM_OPS(renesas_i3c_suspend_noirq,
> > > > +				  renesas_i3c_resume_noirq)
> > > > +};
> > > > +
> > > >  static const struct of_device_id renesas_i3c_of_ids[] = {
> > > >  	{ .compatible = "renesas,r9a08g045-i3c" },
> > > >  	{ .compatible = "renesas,r9a09g047-i3c" }, @@ -1385,6 +1473,7 @@
> > > > static struct platform_driver renesas_i3c = {
> > > >  	.driver = {
> > > >  		.name = "renesas-i3c",
> > > >  		.of_match_table = renesas_i3c_of_ids,
> > > > +		.pm = pm_sleep_ptr(&renesas_i3c_pm_ops),
> > > >  	},
> > > >  };
> > > >  module_platform_driver(renesas_i3c);
> > > > --
> > > > 2.43.0
> > >

  reply	other threads:[~2026-01-05 10:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-31  8:22 [PATCH v3 0/4] i3c: renesas: Add suspend/resume support Tommaso Merciai
2025-12-31  8:22 ` Tommaso Merciai
2025-12-31  8:22 ` [PATCH v3 1/4] i3c: renesas: Switch to clk_bulk API and store clocks in private data Tommaso Merciai
2025-12-31  8:22   ` Tommaso Merciai
2025-12-31  9:08   ` Biju Das
2025-12-31  9:08     ` Biju Das
2026-01-05  9:28     ` Tommaso Merciai
2026-01-05  9:28       ` Tommaso Merciai
2026-01-05  9:55       ` Biju Das
2026-01-05  9:55         ` Biju Das
2025-12-31  8:22 ` [PATCH v3 2/4] i3c: renesas: Store clock rate and reset controls in struct renesas_i3c Tommaso Merciai
2025-12-31  8:22   ` Tommaso Merciai
2025-12-31  8:23 ` [PATCH v3 3/4] i3c: renesas: Factor out hardware initialization to separate function Tommaso Merciai
2025-12-31  8:23   ` Tommaso Merciai
2025-12-31  8:23 ` [PATCH v3 4/4] i3c: renesas: Add suspend/resume support Tommaso Merciai
2025-12-31  8:23   ` Tommaso Merciai
2025-12-31  9:04   ` Biju Das
2025-12-31  9:04     ` Biju Das
2026-01-05  9:32     ` Tommaso Merciai
2026-01-05  9:32       ` Tommaso Merciai
2026-01-05  9:35       ` Biju Das
2026-01-05  9:35         ` Biju Das
2026-01-05 10:03         ` Tommaso Merciai [this message]
2026-01-05 10:03           ` Tommaso Merciai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aVuMRpYkgPpHaG8E@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=tomm.merciai@gmail.com \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.