Commit d9f87a7e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpi-x86', 'acpi-dptf' and 'acpi-apei'

Merge x86-specific ACPI updates, an ACPI DPTF driver update adding new
platform support to it, and an ACPI APEI update:

 - Add a num-cs device property to specify the number of chip selects
   for Intel Braswell to the ACPI LPSS (Intel SoC) driver and remove a
   nested CONFIG_PM #ifdef from it (Andy Shevchenko).

 - Move three x86-specific ACPI files to the x86 directory (Andy
   Shevchenko).

 - Mark SMO8810 accel on Dell XPS 15 9550 as always present and add a
   PNP_UART1_SKIP quirk for Lenovo Blade2 tablets (Hans de Goede).

 - Move acpi_blacklisted() declaration to asm/acpi.h (Kuppuswamy
   Sathyanarayanan).

 - Add Lunar Lake support to the ACPI DPTF driver (Sumeet Pawnikar).

 - Mark the einj_driver driver's remove callback as __exit because it
   cannot get unbound via sysfs (Uwe Kleine-König).

* acpi-x86:
  ACPI: Move acpi_blacklisted() declaration to asm/acpi.h
  ACPI: x86: Add PNP_UART1_SKIP quirk for Lenovo Blade2 tablets
  ACPI: x86: utils: Mark SMO8810 accel on Dell XPS 15 9550 as always present
  ACPI: x86: Move LPSS to x86 folder
  ACPI: x86: Move blacklist to x86 folder
  ACPI: x86: Move acpi_cmos_rtc to x86 folder
  ACPI: x86: Introduce a Makefile
  ACPI: LPSS: Remove nested ifdeffery for CONFIG_PM
  ACPI: LPSS: Advertise number of chip selects via property

* acpi-dptf:
  ACPI: DPTF: Add Lunar Lake support

* acpi-apei:
  ACPI: APEI: EINJ: mark remove callback as __exit
......@@ -56,6 +56,8 @@ static inline void disable_acpi(void)
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
extern int acpi_blacklisted(void);
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
static inline void acpi_disable_pci(void)
{
......
......@@ -14,7 +14,6 @@ tables.o: $(src)/../../include/$(CONFIG_ACPI_CUSTOM_DSDT_FILE) ;
endif
obj-$(CONFIG_ACPI) += tables.o
obj-$(CONFIG_X86) += blacklist.o
#
# ACPI Core Subsystem (Interpreter)
......@@ -46,7 +45,6 @@ acpi-y += ec.o
acpi-$(CONFIG_ACPI_DOCK) += dock.o
acpi-$(CONFIG_PCI) += pci_root.o pci_link.o pci_irq.o
obj-$(CONFIG_ACPI_MCFG) += pci_mcfg.o
acpi-$(CONFIG_PCI) += acpi_lpss.o
acpi-y += acpi_apd.o
acpi-y += acpi_platform.o
acpi-y += acpi_pnp.o
......@@ -55,10 +53,6 @@ acpi-y += event.o
acpi-y += evged.o
acpi-y += sysfs.o
acpi-y += property.o
acpi-$(CONFIG_X86) += acpi_cmos_rtc.o
acpi-$(CONFIG_X86) += x86/apple.o
acpi-$(CONFIG_X86) += x86/utils.o
acpi-$(CONFIG_X86) += x86/s2idle.o
acpi-$(CONFIG_DEBUG_FS) += debugfs.o
acpi-y += acpi_lpat.o
acpi-$(CONFIG_ACPI_FPDT) += acpi_fpdt.o
......@@ -133,3 +127,4 @@ obj-$(CONFIG_ARM64) += arm64/
obj-$(CONFIG_ACPI_VIOT) += viot.o
obj-$(CONFIG_RISCV) += riscv/
obj-$(CONFIG_X86) += x86/
......@@ -851,7 +851,7 @@ static int __init einj_probe(struct platform_device *pdev)
return rc;
}
static void einj_remove(struct platform_device *pdev)
static void __exit einj_remove(struct platform_device *pdev)
{
struct apei_exec_context ctx;
......@@ -873,8 +873,14 @@ static void einj_remove(struct platform_device *pdev)
}
static struct platform_device *einj_dev;
static struct platform_driver einj_driver = {
.remove_new = einj_remove,
/*
* einj_remove() lives in .exit.text. For drivers registered via
* platform_driver_probe() this is ok because they cannot get unbound at
* runtime. So mark the driver struct with __refdata to prevent modpost
* triggering a section mismatch warning.
*/
static struct platform_driver einj_driver __refdata = {
.remove_new = __exit_p(einj_remove),
.driver = {
.name = "acpi-einj",
},
......
......@@ -150,6 +150,7 @@ static const struct acpi_device_id pch_fivr_device_ids[] = {
{"INTC1045", 0},
{"INTC1049", 0},
{"INTC1064", 0},
{"INTC106B", 0},
{"INTC10A3", 0},
{"", 0},
};
......
......@@ -232,6 +232,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
{"INTC1061", 0},
{"INTC1065", 0},
{"INTC1066", 0},
{"INTC106C", 0},
{"INTC106D", 0},
{"INTC10A4", 0},
{"INTC10A5", 0},
{"", 0},
......
......@@ -43,6 +43,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INTC1064"},
{"INTC1065"},
{"INTC1066"},
{"INTC1068"},
{"INTC1069"},
{"INTC106A"},
{"INTC106B"},
{"INTC106C"},
{"INTC106D"},
{"INTC10A0"},
{"INTC10A1"},
{"INTC10A2"},
......
......@@ -15,6 +15,7 @@
{"INTC1044", }, /* Fan for Tiger Lake generation */ \
{"INTC1048", }, /* Fan for Alder Lake generation */ \
{"INTC1063", }, /* Fan for Meteor Lake generation */ \
{"INTC106A", }, /* Fan for Lunar Lake generation */ \
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
{"PNP0C0B", } /* Generic ACPI fan */
......
......@@ -69,7 +69,8 @@ void acpi_debugfs_init(void);
#else
static inline void acpi_debugfs_init(void) { return; }
#endif
#ifdef CONFIG_PCI
#if defined(CONFIG_X86) && defined(CONFIG_PCI)
void acpi_lpss_init(void);
#else
static inline void acpi_lpss_init(void) {}
......
obj-$(CONFIG_ACPI) += acpi-x86.o
acpi-x86-y += apple.o
acpi-x86-y += cmos_rtc.o
acpi-x86-$(CONFIG_PCI) += lpss.o
acpi-x86-y += s2idle.o
acpi-x86-y += utils.o
obj-$(CONFIG_X86) += blacklist.o
......@@ -17,7 +17,7 @@
#include <linux/acpi.h>
#include <linux/dmi.h>
#include "internal.h"
#include "../internal.h"
#ifdef CONFIG_DMI
static const struct dmi_system_id acpi_rev_dmi_table[] __initconst;
......
......@@ -15,7 +15,7 @@
#include <linux/module.h>
#include <linux/mc146818rtc.h>
#include "internal.h"
#include "../internal.h"
static const struct acpi_device_id acpi_cmos_rtc_ids[] = {
{ "PNP0B00" },
......
......@@ -25,7 +25,7 @@
#include <linux/suspend.h>
#include <linux/delay.h>
#include "internal.h"
#include "../internal.h"
#ifdef CONFIG_X86_INTEL_LPSS
......@@ -325,6 +325,7 @@ static const struct lpss_device_desc bsw_i2c_dev_desc = {
static const struct property_entry bsw_spi_properties[] = {
PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_BSW_SSP),
PROPERTY_ENTRY_U32("num-cs", 2),
{ }
};
......@@ -886,10 +887,8 @@ static int acpi_lpss_activate(struct device *dev)
if (pdata->dev_desc->flags & (LPSS_SAVE_CTX | LPSS_SAVE_CTX_ONCE))
lpss_deassert_reset(pdata);
#ifdef CONFIG_PM
if (pdata->dev_desc->flags & LPSS_SAVE_CTX_ONCE)
acpi_lpss_save_ctx(dev, pdata);
#endif
return 0;
}
......
......@@ -100,6 +100,15 @@ static const struct override_status_id override_status_ids[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
}),
/*
* The Dell XPS 15 9550 has a SMO8110 accelerometer /
* HDD freefall sensor which is wrongly marked as not present.
*/
PRESENT_ENTRY_HID("SMO8810", "1", SKYLAKE, {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9550"),
}),
/*
* The GPD win BIOS dated 20170221 has disabled the accelerometer, the
* drivers sometimes cause crashes under Windows and this is how the
......@@ -260,9 +269,10 @@ bool force_storage_d3(void)
#define ACPI_QUIRK_SKIP_I2C_CLIENTS BIT(0)
#define ACPI_QUIRK_UART1_SKIP BIT(1)
#define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(2)
#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(3)
#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(4)
#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(5)
#define ACPI_QUIRK_PNP_UART1_SKIP BIT(3)
#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(4)
#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(5)
#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(6)
static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
/*
......@@ -342,6 +352,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"),
},
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
ACPI_QUIRK_PNP_UART1_SKIP |
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
},
{
......@@ -440,14 +451,18 @@ static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bo
if (ret)
return 0;
/* to not match on PNP enumerated debug UARTs */
if (!dev_is_platform(controller_parent))
return 0;
dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
if (dmi_id)
quirks = (unsigned long)dmi_id->driver_data;
if (!dev_is_platform(controller_parent)) {
/* PNP enumerated UARTs */
if ((quirks & ACPI_QUIRK_PNP_UART1_SKIP) && uid == 1)
*skip = true;
return 0;
}
if ((quirks & ACPI_QUIRK_UART1_SKIP) && uid == 1)
*skip = true;
......
......@@ -705,6 +705,7 @@ static const struct acpi_device_id int3400_thermal_match[] = {
{"INTC1040", 0},
{"INTC1041", 0},
{"INTC1042", 0},
{"INTC1068", 0},
{"INTC10A0", 0},
{}
};
......
......@@ -284,6 +284,7 @@ static const struct acpi_device_id int3403_device_ids[] = {
{"INTC1043", 0},
{"INTC1046", 0},
{"INTC1062", 0},
{"INTC1069", 0},
{"INTC10A1", 0},
{"", 0},
};
......
......@@ -416,7 +416,7 @@ extern char *wmi_get_acpi_device_uid(const char *guid);
extern char acpi_video_backlight_string[];
extern long acpi_is_video_device(acpi_handle handle);
extern int acpi_blacklisted(void);
extern void acpi_osi_setup(char *str);
extern bool acpi_osi_is_win8(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment