Skip to content

Commit

Permalink
ACPI: remove CONFIG_ACPI_EC
Browse files Browse the repository at this point in the history
Remove CONFIG_ACPI_EC.  It was always set the same as CONFIG_ACPI,
and it had no menu label, so there was no way to set it to anything
other than "y".

Per section 6.5.4 of the ACPI 3.0b specification,

    OSPM must make Embedded Controller operation regions, accessed
    via the Embedded Controllers described in ECDT, available before
    executing any control method.

The ECDT table is optional, but if it is present, the above text
means that the EC it describes is a required part of the ACPI
subsystem, so CONFIG_ACPI_EC=n wouldn't make sense.

Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Alexey Starikovskiy <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
Bjorn Helgaas authored and lenb committed Nov 6, 2008
1 parent fefe5ab commit 8950d89
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 21 deletions.
8 changes: 0 additions & 8 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,6 @@ config ACPI_DEBUG_FUNC_TRACE
ACPI Debug Statements slow down ACPI processing. Function trace
is about half of the penalty and is rarely useful.

config ACPI_EC
bool
default y
help
This driver is required on some systems for the proper operation of
the battery and thermal drivers. If you are compiling for a
mobile system, say Y.

config ACPI_PCI_SLOT
tristate "PCI slot detection driver"
default n
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ obj-y += sleep/
obj-y += bus.o glue.o
obj-y += scan.o
# Keep EC driver first. Initialization of others depend on it.
obj-$(CONFIG_ACPI_EC) += ec.o
obj-y += ec.o
obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o
Expand Down
3 changes: 1 addition & 2 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ static int __init acpi_bus_init(void)
"Unable to initialize ACPI OS objects\n");
goto error1;
}
#ifdef CONFIG_ACPI_EC

/*
* ACPI 2.0 requires the EC driver to be loaded and work before
* the EC device is found in the namespace (i.e. before acpi_initialize_objects()
Expand All @@ -785,7 +785,6 @@ static int __init acpi_bus_init(void)
*/
status = acpi_ec_ecdt_probe();
/* Ignore result. Not having an ECDT is not fatal. */
#endif

status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
if (ACPI_FAILURE(status)) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static int acpi_driver_registered;

static int sonypi_ec_write(u8 addr, u8 value)
{
#ifdef CONFIG_ACPI_EC
#ifdef CONFIG_ACPI
if (SONYPI_ACPI_ACTIVE)
return ec_write(addr, value);
#endif
Expand All @@ -539,7 +539,7 @@ static int sonypi_ec_write(u8 addr, u8 value)

static int sonypi_ec_read(u8 addr, u8 *value)
{
#ifdef CONFIG_ACPI_EC
#ifdef CONFIG_ACPI
if (SONYPI_ACPI_ACTIVE)
return ec_read(addr, value);
#endif
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ config HP_WMI
config MSI_LAPTOP
tristate "MSI Laptop Extras"
depends on X86
depends on ACPI_EC
depends on ACPI
depends on BACKLIGHT_CLASS_DEVICE
---help---
This is a driver for laptops built by MSI (MICRO-STAR
Expand Down Expand Up @@ -260,7 +260,7 @@ config PANASONIC_LAPTOP
config COMPAL_LAPTOP
tristate "Compal Laptop Extras"
depends on X86
depends on ACPI_EC
depends on ACPI
depends on BACKLIGHT_CLASS_DEVICE
---help---
This is a driver for laptops built by Compal:
Expand Down
2 changes: 0 additions & 2 deletions include/acpi/acpi_drivers.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ extern int acpi_power_nocheck;
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_EC
int acpi_ec_ecdt_probe(void);
int acpi_boot_ec_enable(void);
#endif

/* --------------------------------------------------------------------------
Processor
Expand Down
4 changes: 0 additions & 4 deletions include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,13 @@ struct acpi_pci_driver {
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);

#ifdef CONFIG_ACPI_EC

extern int ec_read(u8 addr, u8 *val);
extern int ec_write(u8 addr, u8 val);
extern int ec_transaction(u8 command,
const u8 *wdata, unsigned wdata_len,
u8 *rdata, unsigned rdata_len,
int force_poll);

#endif /*CONFIG_ACPI_EC*/

#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)

typedef void (*wmi_notify_handler) (u32 value, void *context);
Expand Down

0 comments on commit 8950d89

Please sign in to comment.