Merge branches 'acpi-tables', 'acpi-button', 'acpi-ec', 'acpi-doc' and 'acpi-tools'
* acpi-tables: ACPI: PPTT: Consistently use unsigned int as parameter type * acpi-button: ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch * acpi-ec: ACPI: EC: Reference count query handlers under lock * acpi-doc: docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan() * acpi-tools: tools/power/acpi: fix compilation error
This commit is contained in:
Коммит
ca11abf113
|
@ -71,8 +71,8 @@ DMA support
|
|||
DMA controllers enumerated via ACPI should be registered in the system to
|
||||
provide generic access to their resources. For example, a driver that would
|
||||
like to be accessible to slave devices via generic API call
|
||||
dma_request_slave_channel() must register itself at the end of the probe
|
||||
function like this::
|
||||
dma_request_chan() must register itself at the end of the probe function like
|
||||
this::
|
||||
|
||||
err = devm_acpi_dma_controller_register(dev, xlate_func, dw);
|
||||
/* Handle the error if it's not a case of !CONFIG_ACPI */
|
||||
|
@ -112,15 +112,15 @@ could look like::
|
|||
}
|
||||
#endif
|
||||
|
||||
dma_request_slave_channel() will call xlate_func() for each registered DMA
|
||||
controller. In the xlate function the proper channel must be chosen based on
|
||||
dma_request_chan() will call xlate_func() for each registered DMA controller.
|
||||
In the xlate function the proper channel must be chosen based on
|
||||
information in struct acpi_dma_spec and the properties of the controller
|
||||
provided by struct acpi_dma.
|
||||
|
||||
Clients must call dma_request_slave_channel() with the string parameter that
|
||||
corresponds to a specific FixedDMA resource. By default "tx" means the first
|
||||
entry of the FixedDMA resource array, "rx" means the second entry. The table
|
||||
below shows a layout::
|
||||
Clients must call dma_request_chan() with the string parameter that corresponds
|
||||
to a specific FixedDMA resource. By default "tx" means the first entry of the
|
||||
FixedDMA resource array, "rx" means the second entry. The table below shows a
|
||||
layout::
|
||||
|
||||
Device (I2C0)
|
||||
{
|
||||
|
|
|
@ -122,6 +122,17 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
|
|||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Razer Blade Stealth 13 late 2019, notification of the LID device
|
||||
* only happens on close, not on open and _LID always returns closed.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Razer"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Razer Blade Stealth 13 Late 2019"),
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -1052,29 +1052,21 @@ void acpi_ec_unblock_transactions(void)
|
|||
/* --------------------------------------------------------------------------
|
||||
Event Management
|
||||
-------------------------------------------------------------------------- */
|
||||
static struct acpi_ec_query_handler *
|
||||
acpi_ec_get_query_handler(struct acpi_ec_query_handler *handler)
|
||||
{
|
||||
if (handler)
|
||||
kref_get(&handler->kref);
|
||||
return handler;
|
||||
}
|
||||
|
||||
static struct acpi_ec_query_handler *
|
||||
acpi_ec_get_query_handler_by_value(struct acpi_ec *ec, u8 value)
|
||||
{
|
||||
struct acpi_ec_query_handler *handler;
|
||||
bool found = false;
|
||||
|
||||
mutex_lock(&ec->mutex);
|
||||
list_for_each_entry(handler, &ec->list, node) {
|
||||
if (value == handler->query_bit) {
|
||||
found = true;
|
||||
break;
|
||||
kref_get(&handler->kref);
|
||||
mutex_unlock(&ec->mutex);
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&ec->mutex);
|
||||
return found ? acpi_ec_get_query_handler(handler) : NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void acpi_ec_query_handler_release(struct kref *kref)
|
||||
|
|
|
@ -98,11 +98,11 @@ static inline bool acpi_pptt_match_type(int table_type, int type)
|
|||
*
|
||||
* Return: The cache structure and the level we terminated with.
|
||||
*/
|
||||
static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
|
||||
int local_level,
|
||||
struct acpi_subtable_header *res,
|
||||
struct acpi_pptt_cache **found,
|
||||
int level, int type)
|
||||
static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
|
||||
unsigned int local_level,
|
||||
struct acpi_subtable_header *res,
|
||||
struct acpi_pptt_cache **found,
|
||||
unsigned int level, int type)
|
||||
{
|
||||
struct acpi_pptt_cache *cache;
|
||||
|
||||
|
@ -119,7 +119,7 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
|
|||
if (*found != NULL && cache != *found)
|
||||
pr_warn("Found duplicate cache level/type unable to determine uniqueness\n");
|
||||
|
||||
pr_debug("Found cache @ level %d\n", level);
|
||||
pr_debug("Found cache @ level %u\n", level);
|
||||
*found = cache;
|
||||
/*
|
||||
* continue looking at this node's resource list
|
||||
|
@ -132,16 +132,17 @@ static int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
|
|||
return local_level;
|
||||
}
|
||||
|
||||
static struct acpi_pptt_cache *acpi_find_cache_level(struct acpi_table_header *table_hdr,
|
||||
struct acpi_pptt_processor *cpu_node,
|
||||
int *starting_level, int level,
|
||||
int type)
|
||||
static struct acpi_pptt_cache *
|
||||
acpi_find_cache_level(struct acpi_table_header *table_hdr,
|
||||
struct acpi_pptt_processor *cpu_node,
|
||||
unsigned int *starting_level, unsigned int level,
|
||||
int type)
|
||||
{
|
||||
struct acpi_subtable_header *res;
|
||||
int number_of_levels = *starting_level;
|
||||
unsigned int number_of_levels = *starting_level;
|
||||
int resource = 0;
|
||||
struct acpi_pptt_cache *ret = NULL;
|
||||
int local_level;
|
||||
unsigned int local_level;
|
||||
|
||||
/* walk down from processor node */
|
||||
while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) {
|
||||
|
@ -321,12 +322,12 @@ static struct acpi_pptt_cache *acpi_find_cache_node(struct acpi_table_header *ta
|
|||
unsigned int level,
|
||||
struct acpi_pptt_processor **node)
|
||||
{
|
||||
int total_levels = 0;
|
||||
unsigned int total_levels = 0;
|
||||
struct acpi_pptt_cache *found = NULL;
|
||||
struct acpi_pptt_processor *cpu_node;
|
||||
u8 acpi_type = acpi_cache_type(type);
|
||||
|
||||
pr_debug("Looking for CPU %d's level %d cache type %d\n",
|
||||
pr_debug("Looking for CPU %d's level %u cache type %d\n",
|
||||
acpi_cpu_id, level, acpi_type);
|
||||
|
||||
cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id);
|
||||
|
|
|
@ -15,7 +15,7 @@ include $(srctree)/../../scripts/Makefile.include
|
|||
|
||||
OUTPUT=$(srctree)/
|
||||
ifeq ("$(origin O)", "command line")
|
||||
OUTPUT := $(O)/power/acpi/
|
||||
OUTPUT := $(O)/tools/power/acpi/
|
||||
endif
|
||||
#$(info Determined 'OUTPUT' to be $(OUTPUT))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче