devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian Daudt" <csd@broadcom.com>
To: Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	Russell King <linux@arm.linux.org.uk>,
	Chris Ball <cjb@laptop.org>, Stephen Warren <swarren@nvidia.com>,
	Olof Johansson <olof@lixom.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Wei WANG <wei_wang@realsil.com.cn>,
	Anton Vorontsov <avorontsov@ru.mvista.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Shawn Guo <shawn.guo@linaro.org>,
	Bill Pemberton <wfp5p@virginia.edu>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Jerry Huang <Chang-Ming.Huang@freescale.com>,
	Kevin Liu <kliu5@marvell.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	matt.porter@linaro.org
Cc: csd_b@daudt.org, Christian Daudt <csd@broadcom.com>
Subject: [PATCH V5 1/2] mmc: sdhci: add card_event callback to sdhci
Date: Thu, 20 Jun 2013 14:26:36 -0700	[thread overview]
Message-ID: <1371763597-12440-1-git-send-email-csd@broadcom.com> (raw)

Add a card_event callback to sdhci so that clients
can provide their own card_event to be called when
card_detect is triggered.

Signed-off-by: Christian Daudt <csd@broadcom.com>

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 2ea429c..c0d24ef 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2046,6 +2046,10 @@ static void sdhci_card_event(struct mmc_host *mmc)
 	struct sdhci_host *host = mmc_priv(mmc);
 	unsigned long flags;
 
+	/* First check if client has provided their own card event */
+	if (host->ops->card_event)
+		host->ops->card_event(host);
+
 	spin_lock_irqsave(&host->lock, flags);
 
 	/* Check host->mrq first in case we are runtime suspended */
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 379e09d..b037f18 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -294,6 +294,7 @@ struct sdhci_ops {
 	void	(*platform_resume)(struct sdhci_host *host);
 	void    (*adma_workaround)(struct sdhci_host *host, u32 intmask);
 	void	(*platform_init)(struct sdhci_host *host);
+	void    (*card_event)(struct sdhci_host *host);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
-- 
1.7.10.4

             reply	other threads:[~2013-06-20 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 21:26 Christian Daudt [this message]
2013-06-20 21:26 ` [PATCH V5 2/2] ARM: mmc: bcm281xx SDHCI driver Christian Daudt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371763597-12440-1-git-send-email-csd@broadcom.com \
    --to=csd@broadcom.com \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=arnd@arndb.de \
    --cc=avorontsov@ru.mvista.com \
    --cc=cjb@laptop.org \
    --cc=csd_b@daudt.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=kliu5@marvell.com \
    --cc=lars@metafoo.de \
    --cc=linux@arm.linux.org.uk \
    --cc=ludovic.desroches@atmel.com \
    --cc=matt.porter@linaro.org \
    --cc=olof@lixom.net \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=swarren@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --cc=wei_wang@realsil.com.cn \
    --cc=wfp5p@virginia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).