Skip to contentSkip to conversation

ACPI: Add CMOS RTC operation region handler support

PATCH Superseded Lan Tianyu 1 participant 2 messages May 29, 2013 ACPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lan Tianyu

author
#0 lore raw

PATCH 1/2 ACPI: Add CMOS RTC operation region handler support

On the HP Folio 13-2000, the bios defines the CMOS RTC region and EC _REG methord will access CMOS RTC region. So the handler must be registered before EC driver being loaded.

This patch is to add handler to access CMOS RTC operation. Register acpi scan handler for CMOS RTC devices. When these device has been detected during enumerating devices in the ACPI namespace, install CMOS RTC operation region handler.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=54621

---
 drivers/acpi/Makefile        |    1 +
 drivers/acpi/acpi_cmos_rtc.c |  107 ++++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/internal.h      |    1 +
 drivers/acpi/scan.c          |    1 +
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/acpi/acpi_cmos_rtc.c
drivers/acpi/Makefile +1 -0
index d07771b..90bbcda 100644
@@ -44,6 +44,7 @@ acpi-y				+= acpi_platform.o
 acpi-y				+= power.o
 acpi-y				+= event.o
 acpi-y				+= sysfs.o
+acpi-y				+= acpi_cmos_rtc.o
 acpi-$(CONFIG_DEBUG_FS)		+= debugfs.o
 acpi-$(CONFIG_ACPI_NUMA)	+= numa.o
 acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
drivers/acpi/acpi_cmos_rtc.c new file +107 -0

107 lines not on this page · raw message

drivers/acpi/internal.h +1 -0
index 18a9d22..09bf428 100644
@@ -35,6 +35,7 @@ void acpi_pci_link_init(void);
 void acpi_pci_root_hp_init(void);
 void acpi_processor_init(void);
 void acpi_platform_init(void);
+void acpi_cmos_rtc_init(void);
 int acpi_sysfs_init(void);
 #ifdef CONFIG_ACPI_CONTAINER
 void acpi_container_init(void);
drivers/acpi/scan.c +1 -0
index a67f614..642e045 100644
@@ -2159,6 +2159,7 @@ int __init acpi_scan_init(void)
 	acpi_processor_init();
 	acpi_platform_init();
 	acpi_lpss_init();
+	acpi_cmos_rtc_init();
 	acpi_container_init();
 	acpi_memory_hotplug_init();
 
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 ACPI/EC: Add HP Folio 13 into ec_dmi_table in order to skip DSDT scan

HP Folio 13's bios defines CMOS RTC operation region and EC _REG method will access this region. In order to make CMOS RTC region handler to be installed before EC _REG method being invoked, this patch is to add ec_skip_dsdt_scan as HP Folio 13 entry's callback into ec_dmi_table.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=54621

---
 drivers/acpi/ec.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/acpi/ec.c +4 -0
index aabf4fe..42ab7c5 100644
@@ -994,6 +994,10 @@ static struct dmi_system_id __initdata ec_dmi_table[] = {
 	ec_enlarge_storm_threshold, "CLEVO hardware", {
 	DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."),
 	DMI_MATCH(DMI_PRODUCT_NAME, "M720T/M730T"),}, NULL},
+	{
+	ec_skip_dsdt_scan, "HP Folio 13", {
+	DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+	DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13"),}, NULL},
 	{},
 };
 
Signature · 1 line
1.7.10.4