|
10 | 10 | #include <linux/export.h>
|
11 | 11 | #include <linux/module.h>
|
12 | 12 | #include <linux/device.h>
|
| 13 | +#include <linux/pinctrl/pinconf-generic.h> |
13 | 14 | #include <linux/platform_device.h>
|
14 | 15 | #include <linux/ioport.h>
|
15 | 16 | #include <linux/io.h>
|
|
81 | 82 | DMI_QUIRK_RESET_SD_SIGNAL_VOLT_ON_SUSP = BIT(0),
|
82 | 83 | DMI_QUIRK_SD_NO_WRITE_PROTECT = BIT(1),
|
83 | 84 | DMI_QUIRK_SD_CD_ACTIVE_HIGH = BIT(2),
|
| 85 | + DMI_QUIRK_SD_CD_ENABLE_PULL_UP = BIT(3), |
84 | 86 | };
|
85 | 87 |
|
86 | 88 | static inline void *sdhci_acpi_priv(struct sdhci_acpi_host *c)
|
@@ -734,6 +736,14 @@ static const struct dmi_system_id sdhci_acpi_quirks[] = {
|
734 | 736 | },
|
735 | 737 | .driver_data = (void *)DMI_QUIRK_SD_NO_WRITE_PROTECT,
|
736 | 738 | },
|
| 739 | + { |
| 740 | + /* Asus T100TA, needs pull-up for cd but DSDT GpioInt has NoPull set */ |
| 741 | + .matches = { |
| 742 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
| 743 | + DMI_MATCH(DMI_PRODUCT_NAME, "T100TA"), |
| 744 | + }, |
| 745 | + .driver_data = (void *)DMI_QUIRK_SD_CD_ENABLE_PULL_UP, |
| 746 | + }, |
737 | 747 | {
|
738 | 748 | /*
|
739 | 749 | * The Lenovo Miix 320-10ICR has a bug in the _PS0 method of
|
@@ -908,6 +918,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
|
908 | 918 | goto err_free;
|
909 | 919 | dev_warn(dev, "failed to setup card detect gpio\n");
|
910 | 920 | c->use_runtime_pm = false;
|
| 921 | + } else if (quirks & DMI_QUIRK_SD_CD_ENABLE_PULL_UP) { |
| 922 | + mmc_gpiod_set_cd_config(host->mmc, |
| 923 | + PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 20000)); |
911 | 924 | }
|
912 | 925 |
|
913 | 926 | if (quirks & DMI_QUIRK_RESET_SD_SIGNAL_VOLT_ON_SUSP)
|
|
0 commit comments