// SPDX-License-Identifier: GPL-2.0-only /* * Power off by restarting and let u-boot keep hold of the machine * until the user presses a button for example. * * Andrew Lunn <andrew@lunn.ch> * * Copyright (C) 2012 Andrew Lunn
*/ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/of_platform.h> #include <linux/module.h> #include <linux/reboot.h>
staticint restart_poweroff_probe(struct platform_device *pdev)
{ /* Set this handler to low priority to not override an existing handler */ return devm_register_sys_off_handler(&pdev->dev,
SYS_OFF_MODE_POWER_OFF,
SYS_OFF_PRIO_LOW,
restart_poweroff_do_poweroff,
NULL);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.