diff options
| author | Icenowy Zheng <uwu@icenowy.me> | 2025-09-19 01:33:23 +0800 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2025-09-19 12:55:20 +0200 |
| commit | 64581f41f4c4aa1845edeee6bb0c8f2a7103d9aa (patch) | |
| tree | 5bb56178277ca35df9baa61e9106694186d6350f | |
| parent | 2d81a24a74e577b0d34266059ff95f56150b40f9 (diff) | |
pmdomain: thead: create auxiliary device for rebooting
The reboot / power off operations require communication with the AON
firmware too.
As the driver is already present, create an auxiliary device with name
"reboot" to match that driver, and pass the AON channel by using
platform_data.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/pmdomain/thead/th1520-pm-domains.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pmdomain/thead/th1520-pm-domains.c b/drivers/pmdomain/thead/th1520-pm-domains.c index 9040b698e7f7..5213994101a5 100644 --- a/drivers/pmdomain/thead/th1520-pm-domains.c +++ b/drivers/pmdomain/thead/th1520-pm-domains.c @@ -173,6 +173,16 @@ static int th1520_pd_pwrseq_gpu_init(struct device *dev) adev); } +static int th1520_pd_reboot_init(struct device *dev, + struct th1520_aon_chan *aon_chan) +{ + struct auxiliary_device *adev; + + adev = devm_auxiliary_device_create(dev, "reboot", aon_chan); + + return PTR_ERR_OR_ZERO(adev); +} + static int th1520_pd_probe(struct platform_device *pdev) { struct generic_pm_domain **domains; @@ -235,6 +245,10 @@ static int th1520_pd_probe(struct platform_device *pdev) if (ret) goto err_clean_provider; + ret = th1520_pd_reboot_init(dev, aon_chan); + if (ret) + goto err_clean_provider; + return 0; err_clean_provider: |
