aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_bus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 13:56:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 13:56:48 -0500
commitaa7ed01f93ff7e149cad46f13f66b269d59c9bc0 (patch)
treeab46a44f3c83c75e1c81f211acd0d68ffe60dd7c /drivers/mmc/core/sdio_bus.c
parent7796c11c728ad40ba4151d559a949c002deffb9a (diff)
parent017210d1c0dc2e2d3b142985cb31d90b98dc0f0f (diff)
Merge tag 'mmc-v3.20-1' of git://git.linaro.org/people/ulf.hansson/mmc
Pull MMC updates from Ulf Hansson: "MMC core: - Support for MMC power sequences. - SDIO function devicetree subnode parsing. - Refactor the hardware reset routines and enable it for SD cards. - Various code quality improvements, especially for slot-gpio. MMC host: - dw_mmc: Various fixes and cleanups. - dw_mmc: Convert to mmc_send_tuning(). - moxart: Fix probe logic. - sdhci: Various fixes and cleanups - sdhci: Asynchronous request handling support. - sdhci-pxav3: Various fixes and cleanups. - sdhci-tegra: Fixes for T114, T124 and T132. - rtsx: Various fixes and cleanups. - rtsx: Support for SDIO. - sdhi/tmio: Refactor and cleanup of header files. - omap_hsmmc: Use slot-gpio and common MMC DT parser. - Make all hosts to deal with errors from mmc_of_parse(). - sunxi: Various fixes and cleanups. - sdhci: Support for Fujitsu SDHCI controller f_sdh30" * tag 'mmc-v3.20-1' of git://git.linaro.org/people/ulf.hansson/mmc: (117 commits) mmc: sdhci-s3c: solve problem with sleeping in atomic context mmc: pwrseq: add driver for emmc hardware reset mmc: moxart: fix probe logic mmc: core: Invoke mmc_pwrseq_post_power_on() prior MMC_POWER_ON state mmc: pwrseq_simple: Add optional reference clock support mmc: pwrseq: Document optional clock for the simple power sequence mmc: pwrseq_simple: Extend to support more pins mmc: pwrseq: Document that simple sequence support more than one GPIO mmc: Add hardware dependencies for sdhci-pxav3 and sdhci-pxav2 mmc: sdhci-pxav3: Modify clock settings for the SDR50 and DDR50 modes mmc: sdhci-pxav3: Extend binding with SDIO3 conf reg for the Armada 38x mmc: sdhci-pxav3: Fix Armada 38x controller's caps according to erratum ERR-7878951 mmc: sdhci-pxav3: Fix SDR50 and DDR50 capabilities for the Armada 38x flavor mmc: sdhci: switch voltage before sdhci_set_ios in runtime resume mmc: tegra: Write xfer_mode, CMD regs in together mmc: Resolve BKOPS compatability issue mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles mmc: dw_mmc: rockchip: remove incorrect __exit_p() mmc: dw_mmc: exynos: remove incorrect __exit_p() mmc: Fix menuconfig alignment of MMC_SDHCI_* options ...
Diffstat (limited to 'drivers/mmc/core/sdio_bus.c')
-rw-r--r--drivers/mmc/core/sdio_bus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 60885316afba..bee02e644d62 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -22,7 +22,9 @@
22#include <linux/mmc/card.h> 22#include <linux/mmc/card.h>
23#include <linux/mmc/host.h> 23#include <linux/mmc/host.h>
24#include <linux/mmc/sdio_func.h> 24#include <linux/mmc/sdio_func.h>
25#include <linux/of.h>
25 26
27#include "core.h"
26#include "sdio_cis.h" 28#include "sdio_cis.h"
27#include "sdio_bus.h" 29#include "sdio_bus.h"
28 30
@@ -295,6 +297,13 @@ static void sdio_acpi_set_handle(struct sdio_func *func)
295static inline void sdio_acpi_set_handle(struct sdio_func *func) {} 297static inline void sdio_acpi_set_handle(struct sdio_func *func) {}
296#endif 298#endif
297 299
300static void sdio_set_of_node(struct sdio_func *func)
301{
302 struct mmc_host *host = func->card->host;
303
304 func->dev.of_node = mmc_of_find_child_device(host, func->num);
305}
306
298/* 307/*
299 * Register a new SDIO function with the driver model. 308 * Register a new SDIO function with the driver model.
300 */ 309 */
@@ -304,6 +313,7 @@ int sdio_add_func(struct sdio_func *func)
304 313
305 dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num); 314 dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num);
306 315
316 sdio_set_of_node(func);
307 sdio_acpi_set_handle(func); 317 sdio_acpi_set_handle(func);
308 ret = device_add(&func->dev); 318 ret = device_add(&func->dev);
309 if (ret == 0) { 319 if (ret == 0) {
@@ -327,6 +337,7 @@ void sdio_remove_func(struct sdio_func *func)
327 337
328 dev_pm_domain_detach(&func->dev, false); 338 dev_pm_domain_detach(&func->dev, false);
329 device_del(&func->dev); 339 device_del(&func->dev);
340 of_node_put(func->dev.of_node);
330 put_device(&func->dev); 341 put_device(&func->dev);
331} 342}
332 343