]> git.baikalelectronics.ru Git - kernel.git/commit
openrisc: Allow power off handler overriding
authorStafford Horne <shorne@gmail.com>
Sat, 21 May 2022 01:39:30 +0000 (10:39 +0900)
committerStafford Horne <shorne@gmail.com>
Mon, 23 May 2022 08:15:50 +0000 (17:15 +0900)
commit24d3f83e358594400f9432d3fdeb1f7828a23528
treec2dee6643ee127c27d9c0e98a6f158b261d34561
parentcade3d3aa987e0f9cc50c07e5c8de91435002e19
openrisc: Allow power off handler overriding

The OpenRISC platform always defines a default pm_power_off hanlder
which is only useful for simulators.  Having this set also means power
management drivers like syscon-power are not able to wire in their own
pm_power_off handlers.

Fix this by not setting the pm_power_off handler by default and fallback
to the simulator power off handler if no handler is set.

This has been tested with a new OpenRISC virt platform I am working on
for QEMU.

  https://github.com/stffrdhrn/qemu/commits/or1k-virt

Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/process.c