Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Secure Digital Host Controller Interface ACPI driver. |
| 3 | * |
| 4 | * Copyright (c) 2012, Intel Corporation. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, |
| 8 | * version 2, as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope it will be useful, but WITHOUT |
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 13 | * more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along with |
| 16 | * this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/export.h> |
| 23 | #include <linux/module.h> |
| 24 | #include <linux/device.h> |
| 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/ioport.h> |
| 27 | #include <linux/io.h> |
| 28 | #include <linux/dma-mapping.h> |
| 29 | #include <linux/compiler.h> |
| 30 | #include <linux/stddef.h> |
| 31 | #include <linux/bitops.h> |
| 32 | #include <linux/types.h> |
| 33 | #include <linux/err.h> |
| 34 | #include <linux/interrupt.h> |
| 35 | #include <linux/acpi.h> |
| 36 | #include <linux/pm.h> |
| 37 | #include <linux/pm_runtime.h> |
Adrian Hunter | b04fa06 | 2013-06-13 11:50:27 +0300 | [diff] [blame] | 38 | #include <linux/delay.h> |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 39 | |
| 40 | #include <linux/mmc/host.h> |
| 41 | #include <linux/mmc/pm.h> |
Adrian Hunter | 4fd4409 | 2014-03-10 15:02:42 +0200 | [diff] [blame] | 42 | #include <linux/mmc/slot-gpio.h> |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 43 | #include <linux/mmc/sdhci.h> |
| 44 | |
| 45 | #include "sdhci.h" |
| 46 | |
| 47 | enum { |
Adrian Hunter | 4fd4409 | 2014-03-10 15:02:42 +0200 | [diff] [blame] | 48 | SDHCI_ACPI_SD_CD = BIT(0), |
| 49 | SDHCI_ACPI_RUNTIME_PM = BIT(1), |
| 50 | SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL = BIT(2), |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | struct sdhci_acpi_chip { |
| 54 | const struct sdhci_ops *ops; |
| 55 | unsigned int quirks; |
| 56 | unsigned int quirks2; |
| 57 | unsigned long caps; |
| 58 | unsigned int caps2; |
| 59 | mmc_pm_flag_t pm_caps; |
| 60 | }; |
| 61 | |
| 62 | struct sdhci_acpi_slot { |
| 63 | const struct sdhci_acpi_chip *chip; |
| 64 | unsigned int quirks; |
| 65 | unsigned int quirks2; |
| 66 | unsigned long caps; |
| 67 | unsigned int caps2; |
| 68 | mmc_pm_flag_t pm_caps; |
| 69 | unsigned int flags; |
| 70 | }; |
| 71 | |
| 72 | struct sdhci_acpi_host { |
| 73 | struct sdhci_host *host; |
| 74 | const struct sdhci_acpi_slot *slot; |
| 75 | struct platform_device *pdev; |
| 76 | bool use_runtime_pm; |
| 77 | }; |
| 78 | |
| 79 | static inline bool sdhci_acpi_flag(struct sdhci_acpi_host *c, unsigned int flag) |
| 80 | { |
| 81 | return c->slot && (c->slot->flags & flag); |
| 82 | } |
| 83 | |
| 84 | static int sdhci_acpi_enable_dma(struct sdhci_host *host) |
| 85 | { |
| 86 | return 0; |
| 87 | } |
| 88 | |
Adrian Hunter | b04fa06 | 2013-06-13 11:50:27 +0300 | [diff] [blame] | 89 | static void sdhci_acpi_int_hw_reset(struct sdhci_host *host) |
| 90 | { |
| 91 | u8 reg; |
| 92 | |
| 93 | reg = sdhci_readb(host, SDHCI_POWER_CONTROL); |
| 94 | reg |= 0x10; |
| 95 | sdhci_writeb(host, reg, SDHCI_POWER_CONTROL); |
| 96 | /* For eMMC, minimum is 1us but give it 9us for good measure */ |
| 97 | udelay(9); |
| 98 | reg &= ~0x10; |
| 99 | sdhci_writeb(host, reg, SDHCI_POWER_CONTROL); |
| 100 | /* For eMMC, minimum is 200us but give it 300us for good measure */ |
| 101 | usleep_range(300, 1000); |
| 102 | } |
| 103 | |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 104 | static const struct sdhci_ops sdhci_acpi_ops_dflt = { |
| 105 | .enable_dma = sdhci_acpi_enable_dma, |
Russell King | 2317f56 | 2014-04-25 12:57:07 +0100 | [diff] [blame] | 106 | .set_bus_width = sdhci_set_bus_width, |
Russell King | 03231f9 | 2014-04-25 12:57:12 +0100 | [diff] [blame] | 107 | .reset = sdhci_reset, |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 108 | }; |
| 109 | |
Adrian Hunter | b04fa06 | 2013-06-13 11:50:27 +0300 | [diff] [blame] | 110 | static const struct sdhci_ops sdhci_acpi_ops_int = { |
| 111 | .enable_dma = sdhci_acpi_enable_dma, |
Russell King | 2317f56 | 2014-04-25 12:57:07 +0100 | [diff] [blame] | 112 | .set_bus_width = sdhci_set_bus_width, |
Russell King | 03231f9 | 2014-04-25 12:57:12 +0100 | [diff] [blame] | 113 | .reset = sdhci_reset, |
Adrian Hunter | b04fa06 | 2013-06-13 11:50:27 +0300 | [diff] [blame] | 114 | .hw_reset = sdhci_acpi_int_hw_reset, |
| 115 | }; |
| 116 | |
| 117 | static const struct sdhci_acpi_chip sdhci_acpi_chip_int = { |
| 118 | .ops = &sdhci_acpi_ops_int, |
| 119 | }; |
| 120 | |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 121 | static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = { |
Adrian Hunter | b04fa06 | 2013-06-13 11:50:27 +0300 | [diff] [blame] | 122 | .chip = &sdhci_acpi_chip_int, |
| 123 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE | MMC_CAP_HW_RESET, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 124 | .caps2 = MMC_CAP2_HC_ERASE_SZ, |
| 125 | .flags = SDHCI_ACPI_RUNTIME_PM, |
| 126 | }; |
| 127 | |
Adrian Hunter | e557139 | 2012-12-10 21:18:48 +0100 | [diff] [blame] | 128 | static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = { |
Adrian Hunter | c674801 | 2014-04-03 14:58:39 +0300 | [diff] [blame] | 129 | .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION, |
Adrian Hunter | e557139 | 2012-12-10 21:18:48 +0100 | [diff] [blame] | 130 | .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON, |
| 131 | .caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD, |
| 132 | .flags = SDHCI_ACPI_RUNTIME_PM, |
| 133 | .pm_caps = MMC_PM_KEEP_POWER, |
| 134 | }; |
| 135 | |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 136 | static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = { |
Adrian Hunter | 4fd4409 | 2014-03-10 15:02:42 +0200 | [diff] [blame] | 137 | .flags = SDHCI_ACPI_SD_CD | SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL | |
| 138 | SDHCI_ACPI_RUNTIME_PM, |
Adrian Hunter | a61abe6 | 2013-05-06 12:17:33 +0300 | [diff] [blame] | 139 | .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 140 | }; |
| 141 | |
| 142 | struct sdhci_acpi_uid_slot { |
| 143 | const char *hid; |
| 144 | const char *uid; |
| 145 | const struct sdhci_acpi_slot *slot; |
| 146 | }; |
| 147 | |
| 148 | static const struct sdhci_acpi_uid_slot sdhci_acpi_uids[] = { |
| 149 | { "80860F14" , "1" , &sdhci_acpi_slot_int_emmc }, |
| 150 | { "80860F14" , "3" , &sdhci_acpi_slot_int_sd }, |
Adrian Hunter | aad95dc | 2014-03-10 15:02:43 +0200 | [diff] [blame] | 151 | { "80860F16" , NULL, &sdhci_acpi_slot_int_sd }, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 152 | { "INT33BB" , "2" , &sdhci_acpi_slot_int_sdio }, |
| 153 | { "INT33C6" , NULL, &sdhci_acpi_slot_int_sdio }, |
Mika Westerberg | 07c001c | 2013-11-12 12:01:33 +0200 | [diff] [blame] | 154 | { "INT3436" , NULL, &sdhci_acpi_slot_int_sdio }, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 155 | { "PNP0D40" }, |
| 156 | { }, |
| 157 | }; |
| 158 | |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 159 | static const struct acpi_device_id sdhci_acpi_ids[] = { |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 160 | { "80860F14" }, |
Adrian Hunter | aad95dc | 2014-03-10 15:02:43 +0200 | [diff] [blame] | 161 | { "80860F16" }, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 162 | { "INT33BB" }, |
| 163 | { "INT33C6" }, |
Mika Westerberg | 07c001c | 2013-11-12 12:01:33 +0200 | [diff] [blame] | 164 | { "INT3436" }, |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 165 | { "PNP0D40" }, |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 166 | { }, |
| 167 | }; |
| 168 | MODULE_DEVICE_TABLE(acpi, sdhci_acpi_ids); |
| 169 | |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 170 | static const struct sdhci_acpi_slot *sdhci_acpi_get_slot_by_ids(const char *hid, |
| 171 | const char *uid) |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 172 | { |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 173 | const struct sdhci_acpi_uid_slot *u; |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 174 | |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 175 | for (u = sdhci_acpi_uids; u->hid; u++) { |
| 176 | if (strcmp(u->hid, hid)) |
| 177 | continue; |
| 178 | if (!u->uid) |
| 179 | return u->slot; |
| 180 | if (uid && !strcmp(u->uid, uid)) |
| 181 | return u->slot; |
| 182 | } |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 183 | return NULL; |
| 184 | } |
| 185 | |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 186 | static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(acpi_handle handle, |
| 187 | const char *hid) |
| 188 | { |
| 189 | const struct sdhci_acpi_slot *slot; |
| 190 | struct acpi_device_info *info; |
| 191 | const char *uid = NULL; |
| 192 | acpi_status status; |
| 193 | |
| 194 | status = acpi_get_object_info(handle, &info); |
| 195 | if (!ACPI_FAILURE(status) && (info->valid & ACPI_VALID_UID)) |
| 196 | uid = info->unique_id.string; |
| 197 | |
| 198 | slot = sdhci_acpi_get_slot_by_ids(hid, uid); |
| 199 | |
| 200 | kfree(info); |
| 201 | return slot; |
| 202 | } |
| 203 | |
Greg Kroah-Hartman | 4e608e4 | 2012-12-21 15:05:47 -0800 | [diff] [blame] | 204 | static int sdhci_acpi_probe(struct platform_device *pdev) |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 205 | { |
| 206 | struct device *dev = &pdev->dev; |
| 207 | acpi_handle handle = ACPI_HANDLE(dev); |
| 208 | struct acpi_device *device; |
| 209 | struct sdhci_acpi_host *c; |
| 210 | struct sdhci_host *host; |
| 211 | struct resource *iomem; |
| 212 | resource_size_t len; |
| 213 | const char *hid; |
Mika Westerberg | 8787565 | 2014-01-08 12:40:55 +0200 | [diff] [blame] | 214 | int err; |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 215 | |
| 216 | if (acpi_bus_get_device(handle, &device)) |
| 217 | return -ENODEV; |
| 218 | |
| 219 | if (acpi_bus_get_status(device) || !device->status.present) |
| 220 | return -ENODEV; |
| 221 | |
| 222 | hid = acpi_device_hid(device); |
| 223 | |
| 224 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 225 | if (!iomem) |
| 226 | return -ENOMEM; |
| 227 | |
| 228 | len = resource_size(iomem); |
| 229 | if (len < 0x100) |
| 230 | dev_err(dev, "Invalid iomem size!\n"); |
| 231 | |
| 232 | if (!devm_request_mem_region(dev, iomem->start, len, dev_name(dev))) |
| 233 | return -ENOMEM; |
| 234 | |
| 235 | host = sdhci_alloc_host(dev, sizeof(struct sdhci_acpi_host)); |
| 236 | if (IS_ERR(host)) |
| 237 | return PTR_ERR(host); |
| 238 | |
| 239 | c = sdhci_priv(host); |
| 240 | c->host = host; |
Adrian Hunter | 07a5888 | 2013-04-26 11:27:22 +0300 | [diff] [blame] | 241 | c->slot = sdhci_acpi_get_slot(handle, hid); |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 242 | c->pdev = pdev; |
| 243 | c->use_runtime_pm = sdhci_acpi_flag(c, SDHCI_ACPI_RUNTIME_PM); |
| 244 | |
| 245 | platform_set_drvdata(pdev, c); |
| 246 | |
| 247 | host->hw_name = "ACPI"; |
| 248 | host->ops = &sdhci_acpi_ops_dflt; |
| 249 | host->irq = platform_get_irq(pdev, 0); |
| 250 | |
| 251 | host->ioaddr = devm_ioremap_nocache(dev, iomem->start, |
| 252 | resource_size(iomem)); |
| 253 | if (host->ioaddr == NULL) { |
| 254 | err = -ENOMEM; |
| 255 | goto err_free; |
| 256 | } |
| 257 | |
| 258 | if (!dev->dma_mask) { |
| 259 | u64 dma_mask; |
| 260 | |
| 261 | if (sdhci_readl(host, SDHCI_CAPABILITIES) & SDHCI_CAN_64BIT) { |
| 262 | /* 64-bit DMA is not supported at present */ |
| 263 | dma_mask = DMA_BIT_MASK(32); |
| 264 | } else { |
| 265 | dma_mask = DMA_BIT_MASK(32); |
| 266 | } |
| 267 | |
Russell King | 07f4450 | 2013-06-27 14:06:28 +0100 | [diff] [blame] | 268 | err = dma_coerce_mask_and_coherent(dev, dma_mask); |
| 269 | if (err) |
| 270 | goto err_free; |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 271 | } |
| 272 | |
| 273 | if (c->slot) { |
| 274 | if (c->slot->chip) { |
| 275 | host->ops = c->slot->chip->ops; |
| 276 | host->quirks |= c->slot->chip->quirks; |
| 277 | host->quirks2 |= c->slot->chip->quirks2; |
| 278 | host->mmc->caps |= c->slot->chip->caps; |
| 279 | host->mmc->caps2 |= c->slot->chip->caps2; |
| 280 | host->mmc->pm_caps |= c->slot->chip->pm_caps; |
| 281 | } |
| 282 | host->quirks |= c->slot->quirks; |
| 283 | host->quirks2 |= c->slot->quirks2; |
| 284 | host->mmc->caps |= c->slot->caps; |
| 285 | host->mmc->caps2 |= c->slot->caps2; |
| 286 | host->mmc->pm_caps |= c->slot->pm_caps; |
| 287 | } |
| 288 | |
Adrian Hunter | 0d3e335 | 2013-04-04 16:41:06 +0300 | [diff] [blame] | 289 | host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP; |
| 290 | |
Adrian Hunter | 4fd4409 | 2014-03-10 15:02:42 +0200 | [diff] [blame] | 291 | if (sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD)) { |
| 292 | bool v = sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL); |
| 293 | |
| 294 | if (mmc_gpiod_request_cd(host->mmc, NULL, 0, v, 0)) { |
| 295 | dev_warn(dev, "failed to setup card detect gpio\n"); |
| 296 | c->use_runtime_pm = false; |
| 297 | } |
| 298 | } |
| 299 | |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 300 | err = sdhci_add_host(host); |
| 301 | if (err) |
| 302 | goto err_free; |
| 303 | |
| 304 | if (c->use_runtime_pm) { |
Adrian Hunter | 1d1ff45 | 2013-04-26 11:27:21 +0300 | [diff] [blame] | 305 | pm_runtime_set_active(dev); |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 306 | pm_suspend_ignore_children(dev, 1); |
| 307 | pm_runtime_set_autosuspend_delay(dev, 50); |
| 308 | pm_runtime_use_autosuspend(dev); |
| 309 | pm_runtime_enable(dev); |
| 310 | } |
| 311 | |
| 312 | return 0; |
| 313 | |
| 314 | err_free: |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 315 | sdhci_free_host(c->host); |
| 316 | return err; |
| 317 | } |
| 318 | |
Greg Kroah-Hartman | 4e608e4 | 2012-12-21 15:05:47 -0800 | [diff] [blame] | 319 | static int sdhci_acpi_remove(struct platform_device *pdev) |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 320 | { |
| 321 | struct sdhci_acpi_host *c = platform_get_drvdata(pdev); |
| 322 | struct device *dev = &pdev->dev; |
| 323 | int dead; |
| 324 | |
| 325 | if (c->use_runtime_pm) { |
| 326 | pm_runtime_get_sync(dev); |
| 327 | pm_runtime_disable(dev); |
| 328 | pm_runtime_put_noidle(dev); |
| 329 | } |
| 330 | |
| 331 | dead = (sdhci_readl(c->host, SDHCI_INT_STATUS) == ~0); |
| 332 | sdhci_remove_host(c->host, dead); |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 333 | sdhci_free_host(c->host); |
| 334 | |
| 335 | return 0; |
| 336 | } |
| 337 | |
| 338 | #ifdef CONFIG_PM_SLEEP |
| 339 | |
| 340 | static int sdhci_acpi_suspend(struct device *dev) |
| 341 | { |
| 342 | struct sdhci_acpi_host *c = dev_get_drvdata(dev); |
| 343 | |
| 344 | return sdhci_suspend_host(c->host); |
| 345 | } |
| 346 | |
| 347 | static int sdhci_acpi_resume(struct device *dev) |
| 348 | { |
| 349 | struct sdhci_acpi_host *c = dev_get_drvdata(dev); |
| 350 | |
| 351 | return sdhci_resume_host(c->host); |
| 352 | } |
| 353 | |
| 354 | #else |
| 355 | |
| 356 | #define sdhci_acpi_suspend NULL |
| 357 | #define sdhci_acpi_resume NULL |
| 358 | |
| 359 | #endif |
| 360 | |
| 361 | #ifdef CONFIG_PM_RUNTIME |
| 362 | |
| 363 | static int sdhci_acpi_runtime_suspend(struct device *dev) |
| 364 | { |
| 365 | struct sdhci_acpi_host *c = dev_get_drvdata(dev); |
| 366 | |
| 367 | return sdhci_runtime_suspend_host(c->host); |
| 368 | } |
| 369 | |
| 370 | static int sdhci_acpi_runtime_resume(struct device *dev) |
| 371 | { |
| 372 | struct sdhci_acpi_host *c = dev_get_drvdata(dev); |
| 373 | |
| 374 | return sdhci_runtime_resume_host(c->host); |
| 375 | } |
| 376 | |
| 377 | static int sdhci_acpi_runtime_idle(struct device *dev) |
| 378 | { |
| 379 | return 0; |
| 380 | } |
| 381 | |
| 382 | #else |
| 383 | |
| 384 | #define sdhci_acpi_runtime_suspend NULL |
| 385 | #define sdhci_acpi_runtime_resume NULL |
| 386 | #define sdhci_acpi_runtime_idle NULL |
| 387 | |
| 388 | #endif |
| 389 | |
| 390 | static const struct dev_pm_ops sdhci_acpi_pm_ops = { |
| 391 | .suspend = sdhci_acpi_suspend, |
| 392 | .resume = sdhci_acpi_resume, |
| 393 | .runtime_suspend = sdhci_acpi_runtime_suspend, |
| 394 | .runtime_resume = sdhci_acpi_runtime_resume, |
| 395 | .runtime_idle = sdhci_acpi_runtime_idle, |
| 396 | }; |
| 397 | |
| 398 | static struct platform_driver sdhci_acpi_driver = { |
| 399 | .driver = { |
| 400 | .name = "sdhci-acpi", |
| 401 | .owner = THIS_MODULE, |
| 402 | .acpi_match_table = sdhci_acpi_ids, |
| 403 | .pm = &sdhci_acpi_pm_ops, |
| 404 | }, |
| 405 | .probe = sdhci_acpi_probe, |
Greg Kroah-Hartman | 4e608e4 | 2012-12-21 15:05:47 -0800 | [diff] [blame] | 406 | .remove = sdhci_acpi_remove, |
Adrian Hunter | c4e0503 | 2012-11-23 21:17:34 +0100 | [diff] [blame] | 407 | }; |
| 408 | |
| 409 | module_platform_driver(sdhci_acpi_driver); |
| 410 | |
| 411 | MODULE_DESCRIPTION("Secure Digital Host Controller Interface ACPI driver"); |
| 412 | MODULE_AUTHOR("Adrian Hunter"); |
| 413 | MODULE_LICENSE("GPL v2"); |