Skip to content

Commit 64581f4

Browse files
Icenowystorulf
authored andcommitted
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>
1 parent 2d81a24 commit 64581f4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/pmdomain/thead/th1520-pm-domains.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ static int th1520_pd_pwrseq_gpu_init(struct device *dev)
173173
adev);
174174
}
175175

176+
static int th1520_pd_reboot_init(struct device *dev,
177+
struct th1520_aon_chan *aon_chan)
178+
{
179+
struct auxiliary_device *adev;
180+
181+
adev = devm_auxiliary_device_create(dev, "reboot", aon_chan);
182+
183+
return PTR_ERR_OR_ZERO(adev);
184+
}
185+
176186
static int th1520_pd_probe(struct platform_device *pdev)
177187
{
178188
struct generic_pm_domain **domains;
@@ -235,6 +245,10 @@ static int th1520_pd_probe(struct platform_device *pdev)
235245
if (ret)
236246
goto err_clean_provider;
237247

248+
ret = th1520_pd_reboot_init(dev, aon_chan);
249+
if (ret)
250+
goto err_clean_provider;
251+
238252
return 0;
239253

240254
err_clean_provider:

0 commit comments

Comments
 (0)