Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *  acpi_drivers.h  ($Revision: 31 $)
0004  *
0005  *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
0006  *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
0007  */
0008 
0009 #ifndef __ACPI_DRIVERS_H__
0010 #define __ACPI_DRIVERS_H__
0011 
0012 #define ACPI_MAX_STRING         80
0013 
0014 /*
0015  * _HID definitions
0016  * HIDs must conform to ACPI spec(6.1.4)
0017  * Linux specific HIDs do not apply to this and begin with LNX:
0018  */
0019 
0020 #define ACPI_POWER_HID          "LNXPOWER"
0021 #define ACPI_PROCESSOR_OBJECT_HID   "LNXCPU"
0022 #define ACPI_SYSTEM_HID         "LNXSYSTM"
0023 #define ACPI_THERMAL_HID        "LNXTHERM"
0024 #define ACPI_BUTTON_HID_POWERF      "LNXPWRBN"
0025 #define ACPI_BUTTON_HID_SLEEPF      "LNXSLPBN"
0026 #define ACPI_VIDEO_HID          "LNXVIDEO"
0027 #define ACPI_BAY_HID            "LNXIOBAY"
0028 #define ACPI_DOCK_HID           "LNXDOCK"
0029 #define ACPI_ECDT_HID           "LNXEC"
0030 /* Quirk for broken IBM BIOSes */
0031 #define ACPI_SMBUS_IBM_HID      "SMBUSIBM"
0032 
0033 /*
0034  * For fixed hardware buttons, we fabricate acpi_devices with HID
0035  * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF.  Fixed hardware
0036  * signals only an event; it doesn't supply a notification value.
0037  * To allow drivers to treat notifications from fixed hardware the
0038  * same as those from real devices, we turn the events into this
0039  * notification value.
0040  */
0041 #define ACPI_FIXED_HARDWARE_EVENT   0x100
0042 
0043 /* --------------------------------------------------------------------------
0044                                        PCI
0045    -------------------------------------------------------------------------- */
0046 
0047 
0048 /* ACPI PCI Interrupt Link */
0049 
0050 int acpi_irq_penalty_init(void);
0051 int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
0052                    int *polarity, char **name);
0053 int acpi_pci_link_free_irq(acpi_handle handle);
0054 
0055 /* ACPI PCI Device Binding */
0056 
0057 struct pci_bus;
0058 
0059 #ifdef CONFIG_PCI
0060 struct pci_dev *acpi_get_pci_dev(acpi_handle);
0061 #else
0062 static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
0063 {
0064     return NULL;
0065 }
0066 #endif
0067 
0068 /* Arch-defined function to add a bus to the system */
0069 
0070 struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
0071 
0072 #ifdef CONFIG_X86
0073 void pci_acpi_crs_quirks(void);
0074 #else
0075 static inline void pci_acpi_crs_quirks(void) { }
0076 #endif
0077 
0078 /*--------------------------------------------------------------------------
0079                                   Dock Station
0080   -------------------------------------------------------------------------- */
0081 
0082 #ifdef CONFIG_ACPI_DOCK
0083 extern int is_dock_device(struct acpi_device *adev);
0084 #else
0085 static inline int is_dock_device(struct acpi_device *adev)
0086 {
0087     return 0;
0088 }
0089 #endif /* CONFIG_ACPI_DOCK */
0090 
0091 #endif /*__ACPI_DRIVERS_H__*/