linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: using pinmux subsystem
Date: Wed, 14 Dec 2011 22:11:52 +0100	[thread overview]
Message-ID: <20111214211152.GM27267@pengutronix.de> (raw)
In-Reply-To: <1323878622-26602-5-git-send-email-b29396@freescale.com>

On Thu, Dec 15, 2011 at 12:03:42AM +0800, Dong Aisheng wrote:
> From: Dong Aisheng <dong.aisheng@linaro.org>
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Wolfram Sang <w.sang@pengutronix.de>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 4b976f0..4504136 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -24,6 +24,7 @@
>  #include <linux/of.h>
>  #include <linux/of_device.h>
>  #include <linux/of_gpio.h>
> +#include <linux/pinctrl/pinmux.h>
>  #include <mach/esdhc.h>
>  #include "sdhci-pltfm.h"
>  #include "sdhci-esdhc.h"
> @@ -68,6 +69,7 @@ struct pltfm_imx_data {
>  	int flags;
>  	u32 scratchpad;
>  	enum imx_esdhc_type devtype;
> +	struct pinmux *pmx;
>  	struct esdhc_platform_data boarddata;
>  };
>  
> @@ -439,6 +441,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
>  	struct clk *clk;
>  	int err;
>  	struct pltfm_imx_data *imx_data;
> +	struct pinmux *pmx;
>  
>  	host = sdhci_pltfm_init(pdev, &sdhci_esdhc_imx_pdata);
>  	if (IS_ERR(host))
> @@ -466,6 +469,16 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
>  	clk_enable(clk);
>  	pltfm_host->clk = clk;
>  
> +	pmx = pinmux_get(&pdev->dev, NULL);
> +	if (IS_ERR(pmx)) {
> +		err = PTR_ERR(pmx);
> +		goto err_pmx_get;
> +	}
> +	err = pinmux_enable(pmx);
> +	if (err)
> +		goto err_pmx_enable;
> +	imx_data->pmx = pmx;
> +

Won't this break every i.MX except i.MX6?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2011-12-14 21:11 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 16:03 [RFC PATCH v2 0/4] pinctrl: imx: add pinnmux support Dong Aisheng
2011-12-14 16:03 ` [RFC PATCH v2 1/4] dt: add of_get_child_number helper function Dong Aisheng
2011-12-14 18:04   ` Rob Herring
2011-12-14 21:41     ` Grant Likely
2011-12-15  5:49       ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 2/4] pinctrl: imx: add pinmux imx driver Dong Aisheng
2011-12-14 16:01   ` Fabio Estevam
2011-12-15  5:48     ` Dong Aisheng-B29396
2011-12-14 18:00   ` Linus Walleij
2011-12-14 21:47     ` Grant Likely
2011-12-15  7:38       ` Dong Aisheng-B29396
2011-12-15  7:35     ` Dong Aisheng-B29396
2011-12-15  8:18   ` Shawn Guo
2011-12-15  8:16     ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 3/4] ARM: imx6q: using pinmux subsystem Dong Aisheng
2011-12-14 18:02   ` Linus Walleij
2011-12-15  7:36     ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: " Dong Aisheng
2011-12-14 17:46   ` Linus Walleij
2011-12-14 21:11   ` Sascha Hauer [this message]
2011-12-14 22:15     ` Linus Walleij
2011-12-15  7:05       ` Shawn Guo
2011-12-15  8:26         ` Linus Walleij
2011-12-15  8:59           ` Dong Aisheng-B29396
2011-12-15  9:33             ` Sascha Hauer
2011-12-15 11:21               ` Shawn Guo
2011-12-15 11:28                 ` Dong Aisheng-B29396
2011-12-15 11:53                   ` Shawn Guo
2011-12-15 11:54                     ` Sascha Hauer
2011-12-15 12:17                       ` Shawn Guo
2011-12-15 13:23                         ` Sascha Hauer
2011-12-15 14:00                           ` Shawn Guo
2011-12-15 16:34                             ` Sascha Hauer
2011-12-15  9:03           ` Shawn Guo
2011-12-15  7:23       ` Dong Aisheng-B29396
2011-12-15  8:28         ` Linus Walleij
2011-12-15  8:55           ` Dong Aisheng-B29396
2011-12-15  9:32         ` Sascha Hauer
2011-12-15 10:40           ` Dong Aisheng-B29396
2011-12-14 17:40 ` [RFC PATCH v2 0/4] pinctrl: imx: add pinnmux support Linus Walleij

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=20111214211152.GM27267@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).