Skip to content

Commit

Permalink
ACPI: button: move HIDs to acpi/button.h
Browse files Browse the repository at this point in the history
This makes it possible to use ACPI_BUTTON_HID_POWER in another driver.

Signed-off-by: Josh Triplett <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
joshtriplett authored and rafaeljw committed Feb 13, 2020
1 parent bb6d3fb commit ac1cc6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,14 @@
#define ACPI_BUTTON_NOTIFY_STATUS 0x80

#define ACPI_BUTTON_SUBCLASS_POWER "power"
#define ACPI_BUTTON_HID_POWER "PNP0C0C"
#define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button"
#define ACPI_BUTTON_TYPE_POWER 0x01

#define ACPI_BUTTON_SUBCLASS_SLEEP "sleep"
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"
#define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button"
#define ACPI_BUTTON_TYPE_SLEEP 0x03

#define ACPI_BUTTON_SUBCLASS_LID "lid"
#define ACPI_BUTTON_HID_LID "PNP0C0D"
#define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch"
#define ACPI_BUTTON_TYPE_LID 0x05

Expand Down
4 changes: 4 additions & 0 deletions include/acpi/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#ifndef ACPI_BUTTON_H
#define ACPI_BUTTON_H

#define ACPI_BUTTON_HID_POWER "PNP0C0C"
#define ACPI_BUTTON_HID_LID "PNP0C0D"
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"

#if IS_ENABLED(CONFIG_ACPI_BUTTON)
extern int acpi_lid_open(void);
#else
Expand Down

0 comments on commit ac1cc6b

Please sign in to comment.