21
21
#include "gpiolib.h"
22
22
#include "gpiolib-acpi.h"
23
23
24
+ #define QUIRK_NO_EDGE_EVENTS_ON_BOOT 0x01l
25
+
24
26
static int run_edge_events_on_boot = -1 ;
25
27
module_param (run_edge_events_on_boot , int , 0444 );
26
28
MODULE_PARM_DESC (run_edge_events_on_boot ,
@@ -1309,7 +1311,7 @@ static int acpi_gpio_handle_deferred_request_irqs(void)
1309
1311
/* We must use _sync so that this runs after the first deferred_probe run */
1310
1312
late_initcall_sync (acpi_gpio_handle_deferred_request_irqs );
1311
1313
1312
- static const struct dmi_system_id run_edge_events_on_boot_blacklist [] = {
1314
+ static const struct dmi_system_id gpiolib_acpi_quirks [] = {
1313
1315
{
1314
1316
/*
1315
1317
* The Minix Neo Z83-4 has a micro-USB-B id-pin handler for
@@ -1319,7 +1321,8 @@ static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
1319
1321
.matches = {
1320
1322
DMI_MATCH (DMI_SYS_VENDOR , "MINIX" ),
1321
1323
DMI_MATCH (DMI_PRODUCT_NAME , "Z83-4" ),
1322
- }
1324
+ },
1325
+ .driver_data = (void * )QUIRK_NO_EDGE_EVENTS_ON_BOOT ,
1323
1326
},
1324
1327
{
1325
1328
/*
@@ -1331,15 +1334,23 @@ static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
1331
1334
.matches = {
1332
1335
DMI_MATCH (DMI_SYS_VENDOR , "Wortmann_AG" ),
1333
1336
DMI_MATCH (DMI_PRODUCT_NAME , "TERRA_PAD_1061" ),
1334
- }
1337
+ },
1338
+ .driver_data = (void * )QUIRK_NO_EDGE_EVENTS_ON_BOOT ,
1335
1339
},
1336
1340
{} /* Terminating entry */
1337
1341
};
1338
1342
1339
1343
static int acpi_gpio_setup_params (void )
1340
1344
{
1345
+ const struct dmi_system_id * id ;
1346
+ long quirks = 0 ;
1347
+
1348
+ id = dmi_first_match (gpiolib_acpi_quirks );
1349
+ if (id )
1350
+ quirks = (long )id -> driver_data ;
1351
+
1341
1352
if (run_edge_events_on_boot < 0 ) {
1342
- if (dmi_check_system ( run_edge_events_on_boot_blacklist ) )
1353
+ if (quirks & QUIRK_NO_EDGE_EVENTS_ON_BOOT )
1343
1354
run_edge_events_on_boot = 0 ;
1344
1355
else
1345
1356
run_edge_events_on_boot = 1 ;
0 commit comments