2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <intelblocks/sd.h>
16 #include <soc/soc_chip.h>
18 int sd_fill_soc_gpio_info(struct acpi_gpio
*gpio
, struct device
*dev
)
20 config_t
*config
= config_of(dev
);
22 if (!config
->sdcard_cd_gpio
)
25 gpio
->type
= ACPI_GPIO_TYPE_INTERRUPT
;
26 gpio
->pull
= ACPI_GPIO_PULL_NONE
;
27 gpio
->irq
.mode
= ACPI_IRQ_EDGE_TRIGGERED
;
28 gpio
->irq
.polarity
= ACPI_IRQ_ACTIVE_BOTH
;
29 gpio
->irq
.shared
= ACPI_IRQ_SHARED
;
30 gpio
->irq
.wake
= ACPI_IRQ_WAKE
;
31 gpio
->interrupt_debounce_timeout
= 10000; /* 100ms */
33 gpio
->pins
[0] = config
->sdcard_cd_gpio
;