[PATCH v2 3/5] power: sequencing: renesas-pwrrdy: Support SoC-specific probe configuration

From: Prabhakar

Date: Fri Oct 09 2026 - 12:58:17 EST


From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>

Allow the Renesas power sequencer driver to support SoCs with different
power sequencing requirements. While the existing implementation handles
RZ/G3L PWRRDY signals, other SoCs use the SYS block to control different
power states, such as the ADC power-down control on RZ/V2H(P) and RZ/V2N.

Introduce a SoC-specific information structure to provide the power
sequencer targets and consumer matching callback. Pass this information
through the auxiliary device ID table's driver_data and use it to
configure the power sequencer during probe.

This allows support for additional SoCs without duplicating the common
probe logic.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
---
v1->v2:
- Passed targets and match pointer info as part of OF data
instead of prober pointer to keep probe common.
---
.../power/sequencing/pwrseq-renesas-pwrrdy.c | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/power/sequencing/pwrseq-renesas-pwrrdy.c b/drivers/power/sequencing/pwrseq-renesas-pwrrdy.c
index 743855620501..158ee5c6432d 100644
--- a/drivers/power/sequencing/pwrseq-renesas-pwrrdy.c
+++ b/drivers/power/sequencing/pwrseq-renesas-pwrrdy.c
@@ -15,6 +15,11 @@
#define SYS_PWRRDY_N_DSI_MASK BIT(1)
#define SYS_PWRRDY_N_CSI_MASK BIT(2)

+struct pwrseq_rz_info {
+ const struct pwrseq_target_data **targets;
+ pwrseq_match_func match;
+};
+
static int pwrseq_rzg3l_set_pwrrdy(struct pwrseq_device *pwrseq, u32 mask,
bool val)
{
@@ -111,19 +116,28 @@ static int pwrseq_rzg3l_pwrrdy_match(struct pwrseq_device *pwrseq,
static int pwrseq_rzg3l_pwrrdy_probe(struct auxiliary_device *adev,
const struct auxiliary_device_id *id)
{
+ const struct pwrseq_rz_info *info = (const struct pwrseq_rz_info *)id->driver_data;
struct pwrseq_config config = {
.parent = &adev->dev,
.owner = THIS_MODULE,
.drvdata = adev->dev.platform_data,
- .match = pwrseq_rzg3l_pwrrdy_match,
- .targets = pwrseq_rzg3l_pwrrdy_targets,
+ .match = info->match,
+ .targets = info->targets,
};

return PTR_ERR_OR_ZERO(devm_pwrseq_device_register(&adev->dev, &config));
}

+static const struct pwrseq_rz_info pwrseq_rzg3l_info = {
+ .targets = pwrseq_rzg3l_pwrrdy_targets,
+ .match = pwrseq_rzg3l_pwrrdy_match,
+};
+
static const struct auxiliary_device_id pwrseq_rzg3l_pwrrdy_id_table[] = {
- { .name = "rz_sysc.pwrseq-pwrrdy" },
+ {
+ .name = "rz_sysc.pwrseq-pwrrdy",
+ .driver_data = (kernel_ulong_t)&pwrseq_rzg3l_info,
+ },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(auxiliary, pwrseq_rzg3l_pwrrdy_id_table);
--
2.55.0