mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
Merge branches 'acpi-init' and 'acpica'
* acpi-init: ACPI / init: Fix the ordering of acpi_reserve_resources() * acpica: Revert "ACPICA: Permanently set _REV to the value '2'."
This commit is contained in:
commit
4de5167ee0
231 changed files with 2581 additions and 1133 deletions
|
|
@ -304,6 +304,8 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
|
|||
{"PNPb006"},
|
||||
/* cs423x-pnpbios */
|
||||
{"CSC0100"},
|
||||
{"CSC0103"},
|
||||
{"CSC0110"},
|
||||
{"CSC0000"},
|
||||
{"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */
|
||||
/* es18xx-pnpbios */
|
||||
|
|
|
|||
|
|
@ -102,19 +102,12 @@ const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = {
|
|||
{"_SB_", ACPI_TYPE_DEVICE, NULL},
|
||||
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||
{"_TZ_", ACPI_TYPE_DEVICE, NULL},
|
||||
/*
|
||||
* March, 2015:
|
||||
* The _REV object is in the process of being deprecated, because
|
||||
* other ACPI implementations permanently return 2. Thus, it
|
||||
* has little or no value. Return 2 for compatibility with
|
||||
* other ACPI implementations.
|
||||
*/
|
||||
{"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR(char, 2)},
|
||||
{"_REV", ACPI_TYPE_INTEGER, (char *)ACPI_CA_SUPPORT_LEVEL},
|
||||
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
||||
{"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR(char, 1)},
|
||||
{"_GL_", ACPI_TYPE_MUTEX, (char *)1},
|
||||
|
||||
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
||||
{"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR(char, 1)},
|
||||
{"_OSI", ACPI_TYPE_METHOD, (char *)1},
|
||||
#endif
|
||||
|
||||
/* Table terminator */
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ EXPORT_SYMBOL_GPL(acpi_dev_get_resources);
|
|||
* @ares: Input ACPI resource object.
|
||||
* @types: Valid resource types of IORESOURCE_XXX
|
||||
*
|
||||
* This is a hepler function to support acpi_dev_get_resources(), which filters
|
||||
* This is a helper function to support acpi_dev_get_resources(), which filters
|
||||
* ACPI resource objects according to resource types.
|
||||
*/
|
||||
int acpi_dev_filter_resource_type(struct acpi_resource *ares,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dmi.h>
|
||||
#include "sbshc.h"
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
|
@ -87,6 +88,8 @@ enum acpi_smb_offset {
|
|||
ACPI_SMB_ALARM_DATA = 0x26, /* 2 bytes alarm data */
|
||||
};
|
||||
|
||||
static bool macbook;
|
||||
|
||||
static inline int smb_hc_read(struct acpi_smb_hc *hc, u8 address, u8 *data)
|
||||
{
|
||||
return ec_read(hc->offset + address, data);
|
||||
|
|
@ -132,6 +135,8 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
|
|||
}
|
||||
|
||||
mutex_lock(&hc->lock);
|
||||
if (macbook)
|
||||
udelay(5);
|
||||
if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
|
||||
goto end;
|
||||
if (temp) {
|
||||
|
|
@ -257,12 +262,29 @@ extern int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
|
|||
acpi_handle handle, acpi_ec_query_func func,
|
||||
void *data);
|
||||
|
||||
static int macbook_dmi_match(const struct dmi_system_id *d)
|
||||
{
|
||||
pr_debug("Detected MacBook, enabling workaround\n");
|
||||
macbook = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dmi_system_id acpi_smbus_dmi_table[] = {
|
||||
{ macbook_dmi_match, "Apple MacBook", {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MacBook") },
|
||||
},
|
||||
{ },
|
||||
};
|
||||
|
||||
static int acpi_smbus_hc_add(struct acpi_device *device)
|
||||
{
|
||||
int status;
|
||||
unsigned long long val;
|
||||
struct acpi_smb_hc *hc;
|
||||
|
||||
dmi_check_system(acpi_smbus_dmi_table);
|
||||
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue