Example #1
0
static int mmc_bus_resume(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = dev_to_mmc_card(dev);
	int ret = 0;

	if (dev->driver && drv->resume)
		ret = drv->resume(card);
	return ret;
}
Example #2
0
static int mmc_bus_suspend(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	int ret = 0;

	if (dev->driver && drv->suspend)
		ret = drv->suspend(card);
	return ret;
}
Example #3
0
static int mmc_bus_suspend(struct device *dev, pm_message_t state)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = dev_to_mmc_card(dev);
	int ret = 0;

	if (dev->driver && drv->suspend)
		ret = drv->suspend(card, state);
	return ret;
}
Example #4
0
static int mmc_bus_pm_suspend(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	int ret = 0;
	pm_message_t state = { PM_EVENT_SUSPEND };

	if (dev->driver && drv->suspend)
		ret = drv->suspend(card, state);
	return ret;
}
Example #5
0
static int mmc_bus_remove(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	
	DBG("[%s] s\n",__func__);

	drv->remove(card);
	
	DBG("[%s] e\n",__func__);
	return 0;
}
Example #6
0
static int mmc_bus_pm_resume(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	int ret = 0;
	
	DBG("[%s] s\n",__func__);
	
	if (dev->driver && drv->resume)
		ret = drv->resume(card);
	
	DBG("[%s] e\n",__func__);
	return ret;
}
Example #7
0
static int mmc_bus_probe(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);

	/*
	 * inform the assd module about the insertion of a new card.
	 * but only if the assd module is loaded.
	 */
	if (assd_drv != NULL)
		assd_drv->probe(card);

	return drv->probe(card);
}
Example #8
0
File: bus.c Project: 7799/linux
static int mmc_bus_suspend(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;
	int ret;

	if (dev->driver && drv->suspend) {
		ret = drv->suspend(card);
		if (ret)
			return ret;
	}

	ret = host->bus_ops->suspend(host);
	return ret;
}
Example #9
0
static int mmc_bus_remove(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);

	/*
	 * inform the assd module about the removal of a card.
	 * but only if the assd module is loaded.
	 */
	if (assd_drv != NULL)
		assd_drv->remove(card);

	drv->remove(card);

	return 0;
}
Example #10
0
File: bus.c Project: 7799/linux
static int mmc_bus_resume(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;
	int ret;

	ret = host->bus_ops->resume(host);
	if (ret)
		pr_warn("%s: error %d during resume (card was removed?)\n",
			mmc_hostname(host), ret);

	if (dev->driver && drv->resume)
		ret = drv->resume(card);

	return ret;
}
Example #11
0
File: bus.c Project: 7799/linux
static void mmc_bus_shutdown(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;
	int ret;

	if (dev->driver && drv->shutdown)
		drv->shutdown(card);

	if (host->bus_ops->shutdown) {
		ret = host->bus_ops->shutdown(host);
		if (ret)
			pr_warn("%s: error %d during shutdown\n",
				mmc_hostname(host), ret);
	}
}
Example #12
0
static void mmc_bus_shutdown(struct device *dev)
{
    struct mmc_driver *drv = to_mmc_driver(dev->driver);
    struct mmc_card *card = mmc_dev_to_card(dev);

    if (!drv) {
        pr_debug("%s: %s: drv is NULL\n", dev_name(dev), __func__);
        return;
    }

    if (!card) {
        pr_debug("%s: %s: card is NULL\n", dev_name(dev), __func__);
        return;
    }

    if (drv->shutdown)
        drv->shutdown(card);
}
Example #13
0
static int mmc_bus_shutdown(struct device *dev)
{
    struct mmc_driver *drv = to_mmc_driver(dev->driver);
    struct mmc_card *card = mmc_dev_to_card(dev);
    struct mmc_host *host = card->host;
    int ret;

    if (dev->driver && drv->shutdown)
        ret = drv->shutdown(card);

    if (host->bus_ops->shutdown) {
        ret = host->bus_ops->shutdown(host);
        if (ret) {
            pr_err("%s: error during shutdown,ret = %d\n",
                   mmc_hostname(host),ret);
        }
    }

    return 0;
}
Example #14
0
static void mmc_bus_shutdown(struct device *dev)
{
	struct mmc_driver *drv = to_mmc_driver(dev->driver);
	struct mmc_card *card = mmc_dev_to_card(dev);
	drv->shutdown(card);
}