mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
ARM: Switch to new sys-off handler API
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Alexey Charkov <alchark@gmail.com> Link: https://lore.kernel.org/r/20250624184245.343657-1-afd@ti.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
86731a2a65
commit
990cd3e93a
@ -143,7 +143,7 @@ static void __init highbank_init(void)
|
|||||||
sregs_base = of_iomap(np, 0);
|
sregs_base = of_iomap(np, 0);
|
||||||
WARN_ON(!sregs_base);
|
WARN_ON(!sregs_base);
|
||||||
|
|
||||||
pm_power_off = highbank_power_off;
|
register_platform_power_off(highbank_power_off);
|
||||||
highbank_pm_init();
|
highbank_pm_init();
|
||||||
|
|
||||||
bus_register_notifier(&platform_bus_type, &highbank_platform_nb);
|
bus_register_notifier(&platform_bus_type, &highbank_platform_nb);
|
||||||
|
@ -1096,7 +1096,7 @@ static void __init spitz_init(void)
|
|||||||
software_node_register(&spitz_scoop_2_gpiochip_node);
|
software_node_register(&spitz_scoop_2_gpiochip_node);
|
||||||
|
|
||||||
init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
|
init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
|
||||||
pm_power_off = spitz_poweroff;
|
register_platform_power_off(spitz_poweroff);
|
||||||
|
|
||||||
PMCR = 0x00;
|
PMCR = 0x00;
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ static struct platform_device *sa11x0_devices[] __initdata = {
|
|||||||
static int __init sa1100_init(void)
|
static int __init sa1100_init(void)
|
||||||
{
|
{
|
||||||
struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20);
|
struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20);
|
||||||
pm_power_off = sa1100_power_off;
|
register_platform_power_off(sa1100_power_off);
|
||||||
|
|
||||||
regulator_has_full_constraints();
|
regulator_has_full_constraints();
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ static void __init vt8500_init(void)
|
|||||||
pr_err("%s:ioremap(power_off) failed\n", __func__);
|
pr_err("%s:ioremap(power_off) failed\n", __func__);
|
||||||
}
|
}
|
||||||
if (pmc_base)
|
if (pmc_base)
|
||||||
pm_power_off = &vt8500_power_off;
|
register_platform_power_off(vt8500_power_off);
|
||||||
else
|
else
|
||||||
pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
|
pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
|
||||||
}
|
}
|
||||||
|
@ -541,7 +541,7 @@ static int __init xen_late_init(void)
|
|||||||
if (!xen_domain())
|
if (!xen_domain())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
pm_power_off = xen_power_off;
|
register_platform_power_off(xen_power_off);
|
||||||
register_restart_handler(&xen_restart_nb);
|
register_restart_handler(&xen_restart_nb);
|
||||||
if (!xen_initial_domain()) {
|
if (!xen_initial_domain()) {
|
||||||
struct timespec64 ts;
|
struct timespec64 ts;
|
||||||
|
Loading…
Reference in New Issue
Block a user