diff options
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 6 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 1 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 8 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 25 | ||||
-rw-r--r-- | include/acpi/acrestyp.h | 1 | ||||
-rw-r--r-- | include/acpi/actbl3.h | 23 | ||||
-rw-r--r-- | include/acpi/actypes.h | 41 | ||||
-rw-r--r-- | include/acpi/video.h | 20 |
8 files changed, 84 insertions, 41 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index f092cc6eb1fb..788c6c35291a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -87,7 +87,7 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func, .package.elements = (eles) \ } -bool acpi_dev_present(const char *hid); +bool acpi_dev_found(const char *hid); #ifdef CONFIG_ACPI @@ -394,13 +394,13 @@ struct acpi_data_node { static inline bool is_acpi_node(struct fwnode_handle *fwnode) { - return fwnode && (fwnode->type == FWNODE_ACPI + return !IS_ERR_OR_NULL(fwnode) && (fwnode->type == FWNODE_ACPI || fwnode->type == FWNODE_ACPI_DATA); } static inline bool is_acpi_device_node(struct fwnode_handle *fwnode) { - return fwnode && fwnode->type == FWNODE_ACPI; + return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_ACPI; } static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode) diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 29c691265b49..797ae2ec8eee 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h @@ -78,7 +78,6 @@ /* ACPI PCI Interrupt Link (pci_link.c) */ -int acpi_irq_penalty_init(void); int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, int *polarity, char **name); int acpi_pci_link_free_irq(acpi_handle handle); diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 6026308f5b26..562603d7aabe 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -108,7 +108,7 @@ acpi_os_table_override(struct acpi_table_header *existing_table, #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override acpi_status acpi_os_physical_table_override(struct acpi_table_header *existing_table, - acpi_physical_address * new_address, + acpi_physical_address *new_address, u32 *new_table_length); #endif @@ -203,7 +203,7 @@ void acpi_os_unmap_memory(void *logical_address, acpi_size size); #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address acpi_status acpi_os_get_physical_address(void *logical_address, - acpi_physical_address * physical_address); + acpi_physical_address *physical_address); #endif /* @@ -379,14 +379,14 @@ acpi_status acpi_os_get_table_by_name(char *signature, u32 instance, struct acpi_table_header **table, - acpi_physical_address * address); + acpi_physical_address *address); #endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index acpi_status acpi_os_get_table_by_index(u32 index, struct acpi_table_header **table, - u32 *instance, acpi_physical_address * address); + u32 *instance, acpi_physical_address *address); #endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 83583a251e72..4e4c21491c41 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20160318 +#define ACPI_CA_VERSION 0x20160422 #include <acpi/acconfig.h> #include <acpi/actypes.h> @@ -192,7 +192,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); /* * Optionally support group module level code. */ -ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, TRUE); +ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, FALSE); /* * Optionally use 32-bit FADT addresses if and when there is a conflict @@ -484,8 +484,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init - acpi_find_root_pointer(acpi_physical_address * - rsdp_address)) + acpi_find_root_pointer(acpi_physical_address + *rsdp_address)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_table_header(acpi_string signature, u32 instance, @@ -530,7 +530,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_handle(acpi_handle parent, acpi_string pathname, - acpi_handle * ret_handle)) + acpi_handle *ret_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_attach_data(acpi_handle object, acpi_object_handler handler, @@ -575,15 +575,15 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_next_object(acpi_object_type type, acpi_handle parent, acpi_handle child, - acpi_handle * out_handle)) + acpi_handle *out_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_type(acpi_handle object, - acpi_object_type * out_type)) + acpi_object_type *out_type)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_parent(acpi_handle object, - acpi_handle * out_handle)) + acpi_handle *out_handle)) /* * Handler interfaces @@ -755,7 +755,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_gpe_device(u32 gpe_index, - acpi_handle * gpe_device)) + acpi_handle *gpe_device)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_install_gpe_block(acpi_handle gpe_device, @@ -771,8 +771,8 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status * Resource interfaces */ typedef -acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, - void *context); +acpi_status (*acpi_walk_resource_callback) (struct acpi_resource * resource, + void *context); ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_vendor_resource(acpi_handle device, @@ -938,7 +938,8 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(void ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) void ACPI_INTERNAL_VAR_XFACE acpi_log_error(const char *format, ...)) - acpi_status acpi_initialize_debugger(void); + +acpi_status acpi_initialize_debugger(void); void acpi_terminate_debugger(void); diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index cf2acb84dfeb..16c189283ea0 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -417,6 +417,7 @@ struct acpi_resource_gpio { u8 type; \ u8 producer_consumer; /* For values, see Producer/Consumer above */\ u8 slave_mode; \ + u8 connection_sharing; \ u8 type_revision_id; \ u16 type_data_length; \ u16 vendor_length; \ diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index f12f4bb1907b..ebc1f4f9fe66 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -481,7 +481,8 @@ struct acpi_table_pcct { enum acpi_pcct_type { ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, - ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ + ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */ + ACPI_PCCT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ }; /* @@ -520,6 +521,26 @@ struct acpi_pcct_hw_reduced { u16 min_turnaround_time; }; +/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */ + +struct acpi_pcct_hw_reduced_type2 { + struct acpi_subtable_header header; + u32 doorbell_interrupt; + u8 flags; + u8 reserved; + u64 base_address; + u64 length; + struct acpi_generic_address doorbell_register; + u64 preserve_mask; + u64 write_mask; + u32 latency; + u32 max_access_rate; + u16 min_turnaround_time; + struct acpi_generic_address doorbell_ack_register; + u64 ack_preserve_mask; + u64 ack_write_mask; +}; + /* Values for doorbell flags above */ #define ACPI_PCCT_INTERRUPT_POLARITY (1) diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index b9a8b72e297c..cb389efd321c 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -893,7 +893,7 @@ typedef u8 acpi_adr_space_type; /* Sleep function dispatch */ -typedef acpi_status(*acpi_sleep_function) (u8 sleep_state); +typedef acpi_status (*acpi_sleep_function) (u8 sleep_state); struct acpi_sleep_functions { acpi_sleep_function legacy_function; @@ -1072,20 +1072,21 @@ void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); typedef void (*acpi_object_handler) (acpi_handle object, void *data); -typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 function); +typedef +acpi_status (*acpi_init_handler) (acpi_handle object, u32 function); #define ACPI_INIT_DEVICE_INI 1 typedef -acpi_status(*acpi_exception_handler) (acpi_status aml_status, - acpi_name name, - u16 opcode, - u32 aml_offset, void *context); +acpi_status (*acpi_exception_handler) (acpi_status aml_status, + acpi_name name, + u16 opcode, + u32 aml_offset, void *context); /* Table Event handler (Load, load_table, etc.) and types */ typedef -acpi_status(*acpi_table_handler) (u32 event, void *table, void *context); +acpi_status (*acpi_table_handler) (u32 event, void *table, void *context); #define ACPI_TABLE_LOAD 0x0 #define ACPI_TABLE_UNLOAD 0x1 @@ -1094,12 +1095,12 @@ acpi_status(*acpi_table_handler) (u32 event, void *table, void *context); /* Address Spaces (For Operation Regions) */ typedef -acpi_status(*acpi_adr_space_handler) (u32 function, - acpi_physical_address address, - u32 bit_width, - u64 *value, - void *handler_context, - void *region_context); +acpi_status (*acpi_adr_space_handler) (u32 function, + acpi_physical_address address, + u32 bit_width, + u64 *value, + void *handler_context, + void *region_context); #define ACPI_DEFAULT_HANDLER NULL @@ -1112,18 +1113,18 @@ struct acpi_connection_info { }; typedef -acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, - u32 function, - void *handler_context, - void **region_context); +acpi_status (*acpi_adr_space_setup) (acpi_handle region_handle, + u32 function, + void *handler_context, + void **region_context); #define ACPI_REGION_ACTIVATE 0 #define ACPI_REGION_DEACTIVATE 1 typedef -acpi_status(*acpi_walk_callback) (acpi_handle object, - u32 nesting_level, - void *context, void **return_value); +acpi_status (*acpi_walk_callback) (acpi_handle object, + u32 nesting_level, + void *context, void **return_value); typedef u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); diff --git a/include/acpi/video.h b/include/acpi/video.h index 5ca2f2c16458..70a41f742037 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -4,6 +4,19 @@ #include <linux/errno.h> /* for ENODEV */ #include <linux/types.h> /* for bool */ +struct acpi_video_brightness_flags { + u8 _BCL_no_ac_battery_levels:1; /* no AC/Battery levels in _BCL */ + u8 _BCL_reversed:1; /* _BCL package is in a reversed order */ + u8 _BQC_use_index:1; /* _BQC returns an index value */ +}; + +struct acpi_video_device_brightness { + int curr; + int count; + int *levels; + struct acpi_video_brightness_flags flags; +}; + struct acpi_device; #define ACPI_VIDEO_CLASS "video" @@ -37,6 +50,8 @@ extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type); * may change over time and should not be cached. */ extern bool acpi_video_handles_brightness_key_presses(void); +extern int acpi_video_get_levels(struct acpi_device *device, + struct acpi_video_device_brightness **dev_br); #else static inline int acpi_video_register(void) { return 0; } static inline void acpi_video_unregister(void) { return; } @@ -56,6 +71,11 @@ static inline bool acpi_video_handles_brightness_key_presses(void) { return false; } +static inline int acpi_video_get_levels(struct acpi_device *device, + struct acpi_video_device_brightness **dev_br) +{ + return -ENODEV; +} #endif #endif |