From: Grant Likely <grant.likely@secretlab.ca>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/3] mmc: sdhci-s3c: Add support for device tree based probe
Date: Fri, 15 Jul 2011 12:51:45 -0600 [thread overview]
Message-ID: <20110715185145.GE2833@ponder.secretlab.ca> (raw)
In-Reply-To: <1310730128-4243-2-git-send-email-thomas.abraham@linaro.org>
On Fri, Jul 15, 2011 at 05:12:06PM +0530, Thomas Abraham wrote:
> Add of_match_table to enable sdhci-s3c driver to be probed when a compatible
> sdhci device node is found in device tree.
>
> CC: linux-mmc@vger.kernel.org
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> .../devicetree/bindings/mmc/samsung-s3c-sdhci.txt | 10 ++++++++++
> drivers/mmc/host/sdhci-s3c.c | 11 +++++++++++
> 2 files changed, 21 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mmc/samsung-s3c-sdhci.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/samsung-s3c-sdhci.txt b/Documentation/devicetree/bindings/mmc/samsung-s3c-sdhci.txt
> new file mode 100644
> index 0000000..c2298f8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/samsung-s3c-sdhci.txt
> @@ -0,0 +1,10 @@
> +* Samsung's SDHCI controller
> +
> +The Samsung's SDHCI controller is used for interfacing with SD/MMC cards.
> +
> +Required properties:
> +- compatible : should be "samsung,s3c-sdhci"
> +- reg : base physical address of the controller and length of memory mapped
> + region.
> +- interrupts : interrupt number to the cpu.
> +
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 69e3ee3..5ccbee0 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -629,6 +629,16 @@ static int sdhci_s3c_resume(struct platform_device *dev)
> #define sdhci_s3c_resume NULL
> #endif
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id s3c_sdhci_match[] = {
> + { .compatible = "samsung,s3c-sdhci" },
Be specific. samsung,exynos4210-sdhci. Newer chips can claim
compatibility with the older one.
Otherwise,
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, s3c_sdhci_match);
> +#else
> +#define s3c_sdhci_match NULL
> +#endif
> +
> static struct platform_driver sdhci_s3c_driver = {
> .probe = sdhci_s3c_probe,
> .remove = __devexit_p(sdhci_s3c_remove),
> @@ -637,6 +647,7 @@ static struct platform_driver sdhci_s3c_driver = {
> .driver = {
> .owner = THIS_MODULE,
> .name = "s3c-sdhci",
> + .of_match_table = s3c_sdhci_match,
> },
> };
>
> --
> 1.7.1
>
next prev parent reply other threads:[~2011-07-15 18:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 11:42 [PATCH 0/3] Add basic device tree support for Samsung's Exynos4210 platform Thomas Abraham
2011-07-15 11:42 ` [PATCH 1/3] mmc: sdhci-s3c: Add support for device tree based probe Thomas Abraham
2011-07-15 18:51 ` Grant Likely [this message]
2011-07-17 3:54 ` Thomas Abraham
[not found] ` <1310730128-4243-1-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-15 11:42 ` [PATCH 2/3] arm: dts: Add nodes in smdkv310 device tree source file Thomas Abraham
[not found] ` <1310730128-4243-3-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-15 18:57 ` Grant Likely
[not found] ` <20110715185744.GF2833-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-17 3:56 ` Thomas Abraham
2011-07-15 11:42 ` [PATCH 3/3] arm: exynos4: Add a new Exynos4210 device tree enabled machine Thomas Abraham
[not found] ` <1310730128-4243-4-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-15 18:49 ` Grant Likely
[not found] ` <20110715184935.GD2833-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-17 4:01 ` Thomas Abraham
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=20110715185145.GE2833@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-mmc@vger.kernel.org \
--cc=thomas.abraham@linaro.org \
/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).