18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  acpi_drivers.h  ($Revision: 31 $)
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
68c2ecf20Sopenharmony_ci *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef __ACPI_DRIVERS_H__
108c2ecf20Sopenharmony_ci#define __ACPI_DRIVERS_H__
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#define ACPI_MAX_STRING			80
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * Please update drivers/acpi/debug.c and Documentation/firmware-guide/acpi/debug.rst
168c2ecf20Sopenharmony_ci * if you add to this list.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci#define ACPI_BUS_COMPONENT		0x00010000
198c2ecf20Sopenharmony_ci#define ACPI_AC_COMPONENT		0x00020000
208c2ecf20Sopenharmony_ci#define ACPI_BATTERY_COMPONENT		0x00040000
218c2ecf20Sopenharmony_ci#define ACPI_BUTTON_COMPONENT		0x00080000
228c2ecf20Sopenharmony_ci#define ACPI_SBS_COMPONENT		0x00100000
238c2ecf20Sopenharmony_ci#define ACPI_FAN_COMPONENT		0x00200000
248c2ecf20Sopenharmony_ci#define ACPI_PCI_COMPONENT		0x00400000
258c2ecf20Sopenharmony_ci#define ACPI_POWER_COMPONENT		0x00800000
268c2ecf20Sopenharmony_ci#define ACPI_CONTAINER_COMPONENT	0x01000000
278c2ecf20Sopenharmony_ci#define ACPI_SYSTEM_COMPONENT		0x02000000
288c2ecf20Sopenharmony_ci#define ACPI_THERMAL_COMPONENT		0x04000000
298c2ecf20Sopenharmony_ci#define ACPI_MEMORY_DEVICE_COMPONENT	0x08000000
308c2ecf20Sopenharmony_ci#define ACPI_VIDEO_COMPONENT		0x10000000
318c2ecf20Sopenharmony_ci#define ACPI_PROCESSOR_COMPONENT	0x20000000
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/*
348c2ecf20Sopenharmony_ci * _HID definitions
358c2ecf20Sopenharmony_ci * HIDs must conform to ACPI spec(6.1.4)
368c2ecf20Sopenharmony_ci * Linux specific HIDs do not apply to this and begin with LNX:
378c2ecf20Sopenharmony_ci */
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci#define ACPI_POWER_HID			"LNXPOWER"
408c2ecf20Sopenharmony_ci#define ACPI_PROCESSOR_OBJECT_HID	"LNXCPU"
418c2ecf20Sopenharmony_ci#define ACPI_SYSTEM_HID			"LNXSYSTM"
428c2ecf20Sopenharmony_ci#define ACPI_THERMAL_HID		"LNXTHERM"
438c2ecf20Sopenharmony_ci#define ACPI_BUTTON_HID_POWERF		"LNXPWRBN"
448c2ecf20Sopenharmony_ci#define ACPI_BUTTON_HID_SLEEPF		"LNXSLPBN"
458c2ecf20Sopenharmony_ci#define ACPI_VIDEO_HID			"LNXVIDEO"
468c2ecf20Sopenharmony_ci#define ACPI_BAY_HID			"LNXIOBAY"
478c2ecf20Sopenharmony_ci#define ACPI_DOCK_HID			"LNXDOCK"
488c2ecf20Sopenharmony_ci#define ACPI_ECDT_HID			"LNXEC"
498c2ecf20Sopenharmony_ci/* Quirk for broken IBM BIOSes */
508c2ecf20Sopenharmony_ci#define ACPI_SMBUS_IBM_HID		"SMBUSIBM"
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci/*
538c2ecf20Sopenharmony_ci * For fixed hardware buttons, we fabricate acpi_devices with HID
548c2ecf20Sopenharmony_ci * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF.  Fixed hardware
558c2ecf20Sopenharmony_ci * signals only an event; it doesn't supply a notification value.
568c2ecf20Sopenharmony_ci * To allow drivers to treat notifications from fixed hardware the
578c2ecf20Sopenharmony_ci * same as those from real devices, we turn the events into this
588c2ecf20Sopenharmony_ci * notification value.
598c2ecf20Sopenharmony_ci */
608c2ecf20Sopenharmony_ci#define ACPI_FIXED_HARDWARE_EVENT	0x100
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci/* --------------------------------------------------------------------------
638c2ecf20Sopenharmony_ci                                       PCI
648c2ecf20Sopenharmony_ci   -------------------------------------------------------------------------- */
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci/* ACPI PCI Interrupt Link (pci_link.c) */
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciint acpi_irq_penalty_init(void);
708c2ecf20Sopenharmony_ciint acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
718c2ecf20Sopenharmony_ci			       int *polarity, char **name);
728c2ecf20Sopenharmony_ciint acpi_pci_link_free_irq(acpi_handle handle);
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci/* ACPI PCI Device Binding (pci_bind.c) */
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_cistruct pci_bus;
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#ifdef CONFIG_PCI
798c2ecf20Sopenharmony_cistruct pci_dev *acpi_get_pci_dev(acpi_handle);
808c2ecf20Sopenharmony_ci#else
818c2ecf20Sopenharmony_cistatic inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
828c2ecf20Sopenharmony_ci{
838c2ecf20Sopenharmony_ci	return NULL;
848c2ecf20Sopenharmony_ci}
858c2ecf20Sopenharmony_ci#endif
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci/* Arch-defined function to add a bus to the system */
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_cistruct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#ifdef CONFIG_X86
928c2ecf20Sopenharmony_civoid pci_acpi_crs_quirks(void);
938c2ecf20Sopenharmony_ci#else
948c2ecf20Sopenharmony_cistatic inline void pci_acpi_crs_quirks(void) { }
958c2ecf20Sopenharmony_ci#endif
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci/* --------------------------------------------------------------------------
988c2ecf20Sopenharmony_ci                                    Processor
998c2ecf20Sopenharmony_ci   -------------------------------------------------------------------------- */
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci#define ACPI_PROCESSOR_LIMIT_NONE	0x00
1028c2ecf20Sopenharmony_ci#define ACPI_PROCESSOR_LIMIT_INCREMENT	0x01
1038c2ecf20Sopenharmony_ci#define ACPI_PROCESSOR_LIMIT_DECREMENT	0x02
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci/*--------------------------------------------------------------------------
1068c2ecf20Sopenharmony_ci                                  Dock Station
1078c2ecf20Sopenharmony_ci  -------------------------------------------------------------------------- */
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#ifdef CONFIG_ACPI_DOCK
1108c2ecf20Sopenharmony_ciextern int is_dock_device(struct acpi_device *adev);
1118c2ecf20Sopenharmony_ci#else
1128c2ecf20Sopenharmony_cistatic inline int is_dock_device(struct acpi_device *adev)
1138c2ecf20Sopenharmony_ci{
1148c2ecf20Sopenharmony_ci	return 0;
1158c2ecf20Sopenharmony_ci}
1168c2ecf20Sopenharmony_ci#endif /* CONFIG_ACPI_DOCK */
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci#endif /*__ACPI_DRIVERS_H__*/
119