From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Marek Vasut <marex@denx.de>
Cc: "Artem Bityutskiy" <artem.bityutskiy@linux.intel.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: Re: [PATCH] mtd: mxc_nand: Make use of supplied pinctrl data
Date: Tue, 8 Jan 2013 20:58:26 +0100 [thread overview]
Message-ID: <20130108195826.GD7360@game.jcrosoft.org> (raw)
In-Reply-To: <1357568885-15507-1-git-send-email-marex@denx.de>
On 15:28 Mon 07 Jan , Marek Vasut wrote:
> The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which
> will result in NAND pins not being properly configured.
>
> Make the driver use pinctrl, but to prevent breakage on various boards, do not
> fail if the pinctrl data are not available, only print a warning message.
nack
we will at bus level
Best Regards,
J.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Cc: Lothar Waßmann <LW@KARO-electronics.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/mtd/nand/mxc_nand.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index 45204e4..ed805fb 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -34,6 +34,7 @@
> #include <linux/completion.h>
> #include <linux/of_device.h>
> #include <linux/of_mtd.h>
> +#include <linux/pinctrl/consumer.h>
>
> #include <asm/mach/flash.h>
> #include <linux/platform_data/mtd-mxc_nand.h>
> @@ -1385,6 +1386,7 @@ static int mxcnd_probe(struct platform_device *pdev)
> struct mtd_info *mtd;
> struct mxc_nand_host *host;
> struct resource *res;
> + struct pinctrl *pinctrl;
> int err = 0;
>
> /* Allocate memory for MTD device structure and private data */
> @@ -1449,6 +1451,10 @@ static int mxcnd_probe(struct platform_device *pdev)
> if (!res)
> return -ENODEV;
>
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> + if (IS_ERR(pinctrl))
> + dev_warn(&pdev->dev, "No PINCTRL data for the NAND driver!\n");
> +
> host->base = devm_request_and_ioremap(&pdev->dev, res);
> if (!host->base)
> return -ENOMEM;
> --
> 1.7.10.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: mxc_nand: Make use of supplied pinctrl data
Date: Tue, 8 Jan 2013 20:58:26 +0100 [thread overview]
Message-ID: <20130108195826.GD7360@game.jcrosoft.org> (raw)
In-Reply-To: <1357568885-15507-1-git-send-email-marex@denx.de>
On 15:28 Mon 07 Jan , Marek Vasut wrote:
> The MXC NAND driver doesn't consider the pinctrl data supplied via DT, which
> will result in NAND pins not being properly configured.
>
> Make the driver use pinctrl, but to prevent breakage on various boards, do not
> fail if the pinctrl data are not available, only print a warning message.
nack
we will at bus level
Best Regards,
J.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Cc: Lothar Wa?mann <LW@KARO-electronics.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/mtd/nand/mxc_nand.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index 45204e4..ed805fb 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -34,6 +34,7 @@
> #include <linux/completion.h>
> #include <linux/of_device.h>
> #include <linux/of_mtd.h>
> +#include <linux/pinctrl/consumer.h>
>
> #include <asm/mach/flash.h>
> #include <linux/platform_data/mtd-mxc_nand.h>
> @@ -1385,6 +1386,7 @@ static int mxcnd_probe(struct platform_device *pdev)
> struct mtd_info *mtd;
> struct mxc_nand_host *host;
> struct resource *res;
> + struct pinctrl *pinctrl;
> int err = 0;
>
> /* Allocate memory for MTD device structure and private data */
> @@ -1449,6 +1451,10 @@ static int mxcnd_probe(struct platform_device *pdev)
> if (!res)
> return -ENODEV;
>
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> + if (IS_ERR(pinctrl))
> + dev_warn(&pdev->dev, "No PINCTRL data for the NAND driver!\n");
> +
> host->base = devm_request_and_ioremap(&pdev->dev, res);
> if (!host->base)
> return -ENOMEM;
> --
> 1.7.10.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2013-01-08 20:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 14:28 [PATCH] mtd: mxc_nand: Make use of supplied pinctrl data Marek Vasut
2013-01-07 14:28 ` Marek Vasut
2013-01-07 17:13 ` Sascha Hauer
2013-01-07 17:13 ` Sascha Hauer
2013-01-08 19:58 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-08 19:58 ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-08 20:22 ` Marek Vasut
2013-01-08 20:22 ` Marek Vasut
2013-01-09 6:41 ` Shawn Guo
2013-01-09 6:41 ` Shawn Guo
2013-01-09 9:08 ` Marek Vasut
2013-01-09 9:08 ` Marek Vasut
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=20130108195826.GD7360@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=LW@KARO-electronics.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
--cc=s.hauer@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.