Angel Pons | 8a3453f | 2020-04-02 23:48:19 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Philipp Deppenwiese | db70f3b | 2018-02-27 22:18:11 +0100 | [diff] [blame] | 2 | |
Kyösti Mälkki | 3635c39 | 2020-06-17 14:17:41 +0300 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Philipp Deppenwiese | db70f3b | 2018-02-27 22:18:11 +0100 | [diff] [blame] | 4 | #include <bootstate.h> |
| 5 | #include <security/tpm/tspi.h> |
| 6 | |
Philipp Deppenwiese | db70f3b | 2018-02-27 22:18:11 +0100 | [diff] [blame] | 7 | static void init_tpm_dev(void *unused) |
| 8 | { |
Philipp Deppenwiese | db70f3b | 2018-02-27 22:18:11 +0100 | [diff] [blame] | 9 | int s3resume = acpi_is_wakeup_s3(); |
| 10 | tpm_setup(s3resume); |
Philipp Deppenwiese | db70f3b | 2018-02-27 22:18:11 +0100 | [diff] [blame] | 11 | } |
| 12 | |
Matt DeVillier | 411023a | 2022-10-18 14:31:50 -0500 | [diff] [blame^] | 13 | BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, init_tpm_dev, NULL); |