From: Rafael J. Wysocki Date: Fri, 4 Dec 2015 13:01:17 +0000 (+0100) Subject: Merge branches 'acpica', 'acpi-video' and 'device-properties' X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=3e5050e60e3b51e32940926ccb4aa5965f618306;p=linux Merge branches 'acpica', 'acpi-video' and 'device-properties' * acpica: ACPI: Better describe ACPI_DEBUGGER * acpi-video: MAINTAINERS: ACPI / video: update a file name in drivers/acpi/ * device-properties: ACPI / property: fix compile error for acpi_node_get_property_reference() when CONFIG_ACPI=n --- 3e5050e60e3b51e32940926ccb4aa5965f618306 diff --cc drivers/acpi/Kconfig index 25dbb76c02cc,5e6e0a8b17ff,25dbb76c02cc,5d1015c26ff4..5eef4cb4f70e --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@@@@ -57,15 -57,15 -57,15 -57,6 +57,15 @@@@@ config ACPI_SYSTEM_POWER_STATES_SUPPOR config ACPI_CCA_REQUIRED bool +config ACPI_DEBUGGER - - bool "In-kernel debugger (EXPERIMENTAL)" + ++ bool "AML debugger interface (EXPERIMENTAL)" + select ACPI_DEBUG + help - - Enable in-kernel debugging facilities: statistics, internal + ++ Enable in-kernel debugging of AML facilities: statistics, internal + object dump, single step control method execution. + This is still under development, currently enabling this only + results in the compilation of the ACPICA debugger files. + config ACPI_SLEEP bool depends on SUSPEND || HIBERNATION diff --cc include/linux/acpi.h index 054833939995,43856d19cf4d,054833939995,9e6f4bb4692f..1991aea2ec4c --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@@@@ -804,63 -758,8 -804,63 -771,8 +804,63 @@@@@ int acpi_node_prop_read(struct fwnode_h int acpi_dev_prop_read(struct acpi_device *adev, const char *propname, enum dev_prop_type proptype, void *val, size_t nval); - struct acpi_device *acpi_get_next_child(struct device *dev, - struct acpi_device *child); + struct fwnode_handle *acpi_get_next_subnode(struct device *dev, + struct fwnode_handle *subnode); + + + +struct acpi_probe_entry; + +typedef bool (*acpi_probe_entry_validate_subtbl)(struct acpi_subtable_header *, + + struct acpi_probe_entry *); + + + +#define ACPI_TABLE_ID_LEN 5 + + + +/** + + * struct acpi_probe_entry - boot-time probing entry + + * @id: ACPI table name + + * @type: Optional subtable type to match + + * (if @id contains subtables) + + * @subtable_valid: Optional callback to check the validity of + + * the subtable + + * @probe_table: Callback to the driver being probed when table + + * match is successful + + * @probe_subtbl: Callback to the driver being probed when table and + + * subtable match (and optional callback is successful) + + * @driver_data: Sideband data provided back to the driver + + */ + +struct acpi_probe_entry { + + __u8 id[ACPI_TABLE_ID_LEN]; + + __u8 type; + + acpi_probe_entry_validate_subtbl subtable_valid; + + union { + + acpi_tbl_table_handler probe_table; + + acpi_tbl_entry_handler probe_subtbl; + + }; + + kernel_ulong_t driver_data; + +}; + + + +#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \ + + static const struct acpi_probe_entry __acpi_probe_##name \ + + __used __section(__##table##_acpi_probe_table) \ + + = { \ + + .id = table_id, \ + + .type = subtable, \ + + .subtable_valid = valid, \ + + .probe_table = (acpi_tbl_table_handler)fn, \ + + .driver_data = data, \ + + } + + + +#define ACPI_PROBE_TABLE(name) __##name##_acpi_probe_table + +#define ACPI_PROBE_TABLE_END(name) __##name##_acpi_probe_table_end + + + +int __acpi_probe_device_table(struct acpi_probe_entry *start, int nr); + + + +#define acpi_probe_device_table(t) \ + + ({ \ + + extern struct acpi_probe_entry ACPI_PROBE_TABLE(t), \ + + ACPI_PROBE_TABLE_END(t); \ + + __acpi_probe_device_table(&ACPI_PROBE_TABLE(t), \ + + (&ACPI_PROBE_TABLE_END(t) - \ + + &ACPI_PROBE_TABLE(t))); \ + + }) #else static inline int acpi_dev_get_property(struct acpi_device *adev, const char *name, acpi_object_type type, @@@@@ -868,10 -767,10 -868,10 -780,10 +868,10 @@@@@ { return -ENXIO; } - static inline int acpi_dev_get_property_array(struct acpi_device *adev, - const char *name, - acpi_object_type type, - const union acpi_object **obj) + + static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, - - const char *name, const char *cells_name, - - size_t index, struct acpi_reference_args *args) +++ const char *name, size_t index, +++ struct acpi_reference_args *args) { return -ENXIO; } @@@@@ -919,17 -809,7 -919,17 -831,6 +919,17 @@@@@ static inline struct fwnode_handle *acp { return NULL; } + + +#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, validate, data, fn) \ + + static const void * __acpi_table_##name[] \ + + __attribute__((unused)) \ + + = { (void *) table_id, \ + + (void *) subtable, \ + + (void *) valid, \ + + (void *) fn, \ + + (void *) data } + + + +#define acpi_probe_device_table(t) ({ int __r = 0; __r;}) #endif #endif /*_LINUX_ACPI_H*/