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

platform/x86: intel_pmc_ipc: add option to build without ACPI

Introduce a configuration option that allows users to build the
intel_pmc_ipc driver without ACPI support. This is useful for
systems where ACPI is not available or desired.

Based on the discussion from the patch [1], it was necessary to
provide this option to accommodate specific use cases.

Link: https://patchwork.kernel.org/project/netdevbpf/patch/20250227121522.1802832-6-yong.liang.choong@linux.intel.com/#26280764 [1]

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Co-developed-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20250313085526.1439092-1-yong.liang.choong@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

David E. Box and committed by
Ilpo Järvinen
d8455a63 0af2f6be

+4
+4
include/linux/platform_data/x86/intel_pmc_ipc.h
··· 36 36 */ 37 37 static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf *rbuf) 38 38 { 39 + #ifdef CONFIG_ACPI 39 40 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 40 41 union acpi_object params[PMC_IPCS_PARAM_COUNT] = { 41 42 {.type = ACPI_TYPE_INTEGER,}, ··· 90 89 } 91 90 92 91 return 0; 92 + #else 93 + return -ENODEV; 94 + #endif /* CONFIG_ACPI */ 93 95 } 94 96 95 97 #endif /* INTEL_PMC_IPC_H */