Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Icenowy Zheng and committed by
Ulf Hansson
64581f41 2d81a24a

+14
+14
drivers/pmdomain/thead/th1520-pm-domains.c
··· 173 173 adev); 174 174 } 175 175 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 + 176 186 static int th1520_pd_probe(struct platform_device *pdev) 177 187 { 178 188 struct generic_pm_domain **domains; ··· 242 232 goto err_clean_genpd; 243 233 244 234 ret = th1520_pd_pwrseq_gpu_init(dev); 235 + if (ret) 236 + goto err_clean_provider; 237 + 238 + ret = th1520_pd_reboot_init(dev, aon_chan); 245 239 if (ret) 246 240 goto err_clean_provider; 247 241