diff options
Diffstat (limited to 'drivers/acpi/acpica/hwgpe.c')
-rw-r--r-- | drivers/acpi/acpica/hwgpe.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index d989b8e786cc..40388e23e103 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c | |||
@@ -78,23 +78,27 @@ u32 acpi_hw_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info, | |||
78 | 78 | ||
79 | /****************************************************************************** | 79 | /****************************************************************************** |
80 | * | 80 | * |
81 | * FUNCTION: acpi_hw_low_disable_gpe | 81 | * FUNCTION: acpi_hw_low_set_gpe |
82 | * | 82 | * |
83 | * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled | 83 | * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled |
84 | * action - Enable or disable | ||
84 | * | 85 | * |
85 | * RETURN: Status | 86 | * RETURN: Status |
86 | * | 87 | * |
87 | * DESCRIPTION: Disable a single GPE in the enable register. | 88 | * DESCRIPTION: Enable or disable a single GPE in its enable register. |
88 | * | 89 | * |
89 | ******************************************************************************/ | 90 | ******************************************************************************/ |
90 | 91 | ||
91 | acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | 92 | acpi_status |
93 | acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action) | ||
92 | { | 94 | { |
93 | struct acpi_gpe_register_info *gpe_register_info; | 95 | struct acpi_gpe_register_info *gpe_register_info; |
94 | acpi_status status; | 96 | acpi_status status; |
95 | u32 enable_mask; | 97 | u32 enable_mask; |
96 | u32 register_bit; | 98 | u32 register_bit; |
97 | 99 | ||
100 | ACPI_FUNCTION_ENTRY(); | ||
101 | |||
98 | /* Get the info block for the entire GPE register */ | 102 | /* Get the info block for the entire GPE register */ |
99 | 103 | ||
100 | gpe_register_info = gpe_event_info->register_info; | 104 | gpe_register_info = gpe_event_info->register_info; |
@@ -109,11 +113,23 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
109 | return (status); | 113 | return (status); |
110 | } | 114 | } |
111 | 115 | ||
112 | /* Clear just the bit that corresponds to this GPE */ | 116 | /* Set ot clear just the bit that corresponds to this GPE */ |
113 | 117 | ||
114 | register_bit = acpi_hw_gpe_register_bit(gpe_event_info, | 118 | register_bit = acpi_hw_gpe_register_bit(gpe_event_info, |
115 | gpe_register_info); | 119 | gpe_register_info); |
116 | ACPI_CLEAR_BIT(enable_mask, register_bit); | 120 | switch (action) { |
121 | case ACPI_GPE_ENABLE: | ||
122 | ACPI_SET_BIT(enable_mask, register_bit); | ||
123 | break; | ||
124 | |||
125 | case ACPI_GPE_DISABLE: | ||
126 | ACPI_CLEAR_BIT(enable_mask, register_bit); | ||
127 | break; | ||
128 | |||
129 | default: | ||
130 | ACPI_ERROR((AE_INFO, "Invalid action\n")); | ||
131 | return (AE_BAD_PARAMETER); | ||
132 | } | ||
117 | 133 | ||
118 | /* Write the updated enable mask */ | 134 | /* Write the updated enable mask */ |
119 | 135 | ||