* [PATCH 1/9] ARM: mxs: enable pinctrl dummy states
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
@ 2012-05-06 15:34 ` Shawn Guo
2012-05-06 15:34 ` [PATCH 2/9] serial: amba-pl011: adopt pinctrl support Shawn Guo
` (7 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:34 UTC (permalink / raw)
To: linux-arm-kernel
The mxs pinctrl driver will only support DT probe. That said, the mxs
device drivers can only get pinctrl state from pinctrl subsystem when
the drivers get probed from device tree.
Before converting the whole mxs platform support over to device tree,
we need to enable pinctrl dummy states for those non-DT board files
to ensure the pinctrl API adopted by mxs device drivers will work for
both DT and non-DT probe.
Instead of calling pinctrl_provide_dummies() directly in every board
file, the patch introduces soc specific calls mx23_soc_init() and
mx28_soc_init() for boards' .init_machine hook to invoke, so that
any soc specific setup for non-DT boot only can be added there.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/include/mach/common.h | 2 ++
arch/arm/mach-mxs/mach-apx4devkit.c | 2 ++
arch/arm/mach-mxs/mach-m28evk.c | 2 ++
arch/arm/mach-mxs/mach-mx23evk.c | 2 ++
arch/arm/mach-mxs/mach-mx28evk.c | 2 ++
arch/arm/mach-mxs/mach-stmp378x_devb.c | 2 ++
arch/arm/mach-mxs/mach-tx28.c | 2 ++
arch/arm/mach-mxs/mm.c | 11 +++++++++++
8 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-mxs/include/mach/common.h b/arch/arm/mach-mxs/include/mach/common.h
index c50c3ea..8d88399 100644
--- a/arch/arm/mach-mxs/include/mach/common.h
+++ b/arch/arm/mach-mxs/include/mach/common.h
@@ -19,11 +19,13 @@ extern void mxs_timer_init(struct clk *, int);
extern void mxs_restart(char, const char *);
extern int mxs_saif_clkmux_select(unsigned int clkmux);
+extern void mx23_soc_init(void);
extern int mx23_register_gpios(void);
extern int mx23_clocks_init(void);
extern void mx23_map_io(void);
extern void mx23_init_irq(void);
+extern void mx28_soc_init(void);
extern int mx28_register_gpios(void);
extern int mx28_clocks_init(void);
extern void mx28_map_io(void);
diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
index 48a7fab..5e90b9d 100644
--- a/arch/arm/mach-mxs/mach-apx4devkit.c
+++ b/arch/arm/mach-mxs/mach-apx4devkit.c
@@ -207,6 +207,8 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
static void __init apx4devkit_init(void)
{
+ mx28_soc_init();
+
mxs_iomux_setup_multiple_pads(apx4devkit_pads,
ARRAY_SIZE(apx4devkit_pads));
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
index 06d7996..4c00c87 100644
--- a/arch/arm/mach-mxs/mach-m28evk.c
+++ b/arch/arm/mach-mxs/mach-m28evk.c
@@ -319,6 +319,8 @@ static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = {
static void __init m28evk_init(void)
{
+ mx28_soc_init();
+
mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads));
mx28_add_duart();
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
index 5ea1c57..e7272a4 100644
--- a/arch/arm/mach-mxs/mach-mx23evk.c
+++ b/arch/arm/mach-mxs/mach-mx23evk.c
@@ -141,6 +141,8 @@ static void __init mx23evk_init(void)
{
int ret;
+ mx23_soc_init();
+
mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
mx23_add_duart();
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index e386c14..da4610e 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -413,6 +413,8 @@ static void __init mx28evk_init(void)
{
int ret;
+ mx28_soc_init();
+
mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));
mx28_add_duart();
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c
index a626c07..6548965 100644
--- a/arch/arm/mach-mxs/mach-stmp378x_devb.c
+++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c
@@ -85,6 +85,8 @@ static void __init stmp378x_dvb_init(void)
{
int ret;
+ mx23_soc_init();
+
mxs_iomux_setup_multiple_pads(stmp378x_dvb_pads,
ARRAY_SIZE(stmp378x_dvb_pads));
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
index 2c0862e..8837029 100644
--- a/arch/arm/mach-mxs/mach-tx28.c
+++ b/arch/arm/mach-mxs/mach-tx28.c
@@ -146,6 +146,8 @@ static struct mxs_mmc_platform_data tx28_mmc0_pdata __initdata = {
static void __init tx28_stk5v3_init(void)
{
+ mx28_soc_init();
+
mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads,
ARRAY_SIZE(tx28_stk5v3_pads));
diff --git a/arch/arm/mach-mxs/mm.c b/arch/arm/mach-mxs/mm.c
index 50af5ce..67a384e 100644
--- a/arch/arm/mach-mxs/mm.c
+++ b/arch/arm/mach-mxs/mm.c
@@ -13,6 +13,7 @@
#include <linux/mm.h>
#include <linux/init.h>
+#include <linux/pinctrl/machine.h>
#include <asm/mach/map.h>
@@ -61,3 +62,13 @@ void __init mx28_init_irq(void)
{
icoll_init_irq();
}
+
+void __init mx23_soc_init(void)
+{
+ pinctrl_provide_dummies();
+}
+
+void __init mx28_soc_init(void)
+{
+ pinctrl_provide_dummies();
+}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/9] serial: amba-pl011: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
2012-05-06 15:34 ` [PATCH 1/9] ARM: mxs: enable pinctrl dummy states Shawn Guo
@ 2012-05-06 15:34 ` Shawn Guo
2012-05-06 15:41 ` Russell King - ARM Linux
2012-05-21 18:53 ` Linus Walleij
2012-05-06 15:34 ` [PATCH 3/9] serial: mxs-auart: " Shawn Guo
` (6 subsequent siblings)
8 siblings, 2 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:34 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/tty/serial/amba-pl011.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 3d569cd..062ef8c 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -52,6 +52,7 @@
#include <linux/scatterlist.h>
#include <linux/delay.h>
#include <linux/types.h>
+#include <linux/pinctrl/consumer.h>
#include <asm/io.h>
#include <asm/sizes.h>
@@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
{
struct uart_amba_port *uap;
struct vendor_data *vendor = id->data;
+ struct pinctrl *pinctrl;
void __iomem *base;
int i, ret;
@@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
goto free;
}
+ pinctrl = devm_pinctrl_get_select_default(&dev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto unmap;
+ }
+
uap->clk = clk_get(&dev->dev, NULL);
if (IS_ERR(uap->clk)) {
ret = PTR_ERR(uap->clk);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/9] serial: amba-pl011: adopt pinctrl support
2012-05-06 15:34 ` [PATCH 2/9] serial: amba-pl011: adopt pinctrl support Shawn Guo
@ 2012-05-06 15:41 ` Russell King - ARM Linux
2012-05-21 18:53 ` Linus Walleij
1 sibling, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2012-05-06 15:41 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, May 06, 2012 at 11:34:58PM +0800, Shawn Guo wrote:
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Looks fine.
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> drivers/tty/serial/amba-pl011.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 3d569cd..062ef8c 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -52,6 +52,7 @@
> #include <linux/scatterlist.h>
> #include <linux/delay.h>
> #include <linux/types.h>
> +#include <linux/pinctrl/consumer.h>
>
> #include <asm/io.h>
> #include <asm/sizes.h>
> @@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> {
> struct uart_amba_port *uap;
> struct vendor_data *vendor = id->data;
> + struct pinctrl *pinctrl;
> void __iomem *base;
> int i, ret;
>
> @@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> goto free;
> }
>
> + pinctrl = devm_pinctrl_get_select_default(&dev->dev);
> + if (IS_ERR(pinctrl)) {
> + ret = PTR_ERR(pinctrl);
> + goto unmap;
> + }
> +
> uap->clk = clk_get(&dev->dev, NULL);
> if (IS_ERR(uap->clk)) {
> ret = PTR_ERR(uap->clk);
> --
> 1.7.5.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/9] serial: amba-pl011: adopt pinctrl support
2012-05-06 15:34 ` [PATCH 2/9] serial: amba-pl011: adopt pinctrl support Shawn Guo
2012-05-06 15:41 ` Russell King - ARM Linux
@ 2012-05-21 18:53 ` Linus Walleij
1 sibling, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2012-05-21 18:53 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, May 6, 2012 at 5:34 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> ?drivers/tty/serial/amba-pl011.c | ? ?8 ++++++++
> ?1 files changed, 8 insertions(+), 0 deletions(-)
Cool, I like this.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/9] serial: mxs-auart: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
2012-05-06 15:34 ` [PATCH 1/9] ARM: mxs: enable pinctrl dummy states Shawn Guo
2012-05-06 15:34 ` [PATCH 2/9] serial: amba-pl011: adopt pinctrl support Shawn Guo
@ 2012-05-06 15:34 ` Shawn Guo
2012-05-06 15:35 ` [PATCH 4/9] mmc: mxs-mmc: " Shawn Guo
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:34 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/tty/serial/mxs-auart.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 55fd362..7081600 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -32,6 +32,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
+#include <linux/pinctrl/consumer.h>
#include <asm/cacheflush.h>
@@ -678,6 +679,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
u32 version;
int ret = 0;
struct resource *r;
+ struct pinctrl *pinctrl;
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
if (!s) {
@@ -685,6 +687,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
goto out;
}
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto out_free;
+ }
+
s->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(s->clk)) {
ret = PTR_ERR(s->clk);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/9] mmc: mxs-mmc: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (2 preceding siblings ...)
2012-05-06 15:34 ` [PATCH 3/9] serial: mxs-auart: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
2012-05-06 16:09 ` Chris Ball
2012-05-06 15:35 ` [PATCH 5/9] mtd: nand: gpmi: " Shawn Guo
` (4 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/mmc/host/mxs-mmc.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index e3f5af9..bb03ddd 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -39,6 +39,7 @@
#include <linux/regulator/consumer.h>
#include <linux/module.h>
#include <linux/fsl/mxs-dma.h>
+#include <linux/pinctrl/consumer.h>
#include <mach/mxs.h>
#include <mach/common.h>
@@ -682,6 +683,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct mmc_host *mmc;
struct resource *iores, *dmares, *r;
struct mxs_mmc_platform_data *pdata;
+ struct pinctrl *pinctrl;
int ret = 0, irq_err, irq_dma;
dma_cap_mask_t mask;
@@ -719,6 +721,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
host->irq = irq_err;
host->sdio_irq_en = 0;
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto out_iounmap;
+ }
+
host->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(host->clk)) {
ret = PTR_ERR(host->clk);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/9] mmc: mxs-mmc: adopt pinctrl support
2012-05-06 15:35 ` [PATCH 4/9] mmc: mxs-mmc: " Shawn Guo
@ 2012-05-06 16:09 ` Chris Ball
2012-05-07 1:08 ` Shawn Guo
0 siblings, 1 reply; 14+ messages in thread
From: Chris Ball @ 2012-05-06 16:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Patch looks fine -- perhaps you could copy the explanation about the
dummy pinctrl state for non-DT boards from your series introduction
into this commit message, since the commit messages go into git and
the series description doesn't? Thanks.
On Sun, May 06 2012, Shawn Guo wrote:
> Cc: Chris Ball <cjb@laptop.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> drivers/mmc/host/mxs-mmc.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index e3f5af9..bb03ddd 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -39,6 +39,7 @@
> #include <linux/regulator/consumer.h>
> #include <linux/module.h>
> #include <linux/fsl/mxs-dma.h>
> +#include <linux/pinctrl/consumer.h>
>
> #include <mach/mxs.h>
> #include <mach/common.h>
> @@ -682,6 +683,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> struct mmc_host *mmc;
> struct resource *iores, *dmares, *r;
> struct mxs_mmc_platform_data *pdata;
> + struct pinctrl *pinctrl;
> int ret = 0, irq_err, irq_dma;
> dma_cap_mask_t mask;
>
> @@ -719,6 +721,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> host->irq = irq_err;
> host->sdio_irq_en = 0;
>
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> + if (IS_ERR(pinctrl)) {
> + ret = PTR_ERR(pinctrl);
> + goto out_iounmap;
> + }
> +
> host->clk = clk_get(&pdev->dev, NULL);
> if (IS_ERR(host->clk)) {
> ret = PTR_ERR(host->clk);
Acked-by: Chris Ball <cjb@laptop.org>
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/9] mmc: mxs-mmc: adopt pinctrl support
2012-05-06 16:09 ` Chris Ball
@ 2012-05-07 1:08 ` Shawn Guo
0 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-07 1:08 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, May 06, 2012 at 12:09:40PM -0400, Chris Ball wrote:
> Hi,
>
> Patch looks fine -- perhaps you could copy the explanation about the
> dummy pinctrl state for non-DT boards from your series introduction
> into this commit message, since the commit messages go into git and
> the series description doesn't? Thanks.
>
Yeah, I thought about doing that. But after a second thought, I did
not do because I think device drivers should not care about these
underneath details. Pinctrl subsystem and platform should just sort
these out and make them invisible to device drivers.
> Acked-by: Chris Ball <cjb@laptop.org>
>
Thanks, Chris.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/9] mtd: nand: gpmi: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (3 preceding siblings ...)
2012-05-06 15:35 ` [PATCH 4/9] mmc: mxs-mmc: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
2012-05-06 15:35 ` [PATCH 6/9] i2c: mxs: " Shawn Guo
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 9ec51ce..8478fd9 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -24,6 +24,7 @@
#include <linux/module.h>
#include <linux/mtd/gpmi-nand.h>
#include <linux/mtd/partitions.h>
+#include <linux/pinctrl/consumer.h>
#include "gpmi-nand.h"
/* add our owner bbt descriptor */
@@ -476,6 +477,7 @@ acquire_err:
static int __devinit acquire_resources(struct gpmi_nand_data *this)
{
struct resources *res = &this->resources;
+ struct pinctrl *pinctrl;
int ret;
ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME);
@@ -494,6 +496,12 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
if (ret)
goto exit_dma_channels;
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto exit_pin;
+ }
+
res->clock = clk_get(&this->pdev->dev, NULL);
if (IS_ERR(res->clock)) {
pr_err("can not get the clock\n");
@@ -503,6 +511,7 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
return 0;
exit_clock:
+exit_pin:
release_dma_channels(this);
exit_dma_channels:
release_bch_irq(this);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/9] i2c: mxs: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (4 preceding siblings ...)
2012-05-06 15:35 ` [PATCH 5/9] mtd: nand: gpmi: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
2012-05-06 15:35 ` [PATCH 7/9] ASoC: mxs-saif: " Shawn Guo
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/i2c/busses/i2c-mxs.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 3d471d5..7c7711d 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/jiffies.h>
#include <linux/io.h>
+#include <linux/pinctrl/consumer.h>
#include <mach/common.h>
@@ -323,10 +324,15 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct mxs_i2c_dev *i2c;
struct i2c_adapter *adap;
+ struct pinctrl *pinctrl;
struct resource *res;
resource_size_t res_size;
int err, irq;
+ pinctrl = devm_pinctrl_get_select_default(dev);
+ if (IS_ERR(pinctrl))
+ return PTR_ERR(pinctrl);
+
i2c = devm_kzalloc(dev, sizeof(struct mxs_i2c_dev), GFP_KERNEL);
if (!i2c)
return -ENOMEM;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 7/9] ASoC: mxs-saif: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (5 preceding siblings ...)
2012-05-06 15:35 ` [PATCH 6/9] i2c: mxs: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
2012-05-06 15:35 ` [PATCH 8/9] video: mxsfb: " Shawn Guo
2012-05-06 15:35 ` [PATCH 9/9] ARM: mxs: enable " Shawn Guo
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
sound/soc/mxs/mxs-saif.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 53f4fd8..7fd224b 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/time.h>
#include <linux/fsl/mxs-dma.h>
+#include <linux/pinctrl/consumer.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -625,6 +626,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct resource *iores, *dmares;
struct mxs_saif *saif;
struct mxs_saif_platform_data *pdata;
+ struct pinctrl *pinctrl;
int ret = 0;
if (pdev->id >= ARRAY_SIZE(mxs_saif))
@@ -650,6 +652,12 @@ static int mxs_saif_probe(struct platform_device *pdev)
saif->master_id = saif->id;
}
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ return ret;
+ }
+
saif->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(saif->clk)) {
ret = PTR_ERR(saif->clk);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 8/9] video: mxsfb: adopt pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (6 preceding siblings ...)
2012-05-06 15:35 ` [PATCH 7/9] ASoC: mxs-saif: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
2012-05-06 15:35 ` [PATCH 9/9] ARM: mxs: enable " Shawn Guo
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/video/mxsfb.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 4a89f88..6c6bc57 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -45,6 +45,7 @@
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
+#include <linux/pinctrl/consumer.h>
#include <mach/mxsfb.h>
#define REG_SET 4
@@ -756,6 +757,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
struct mxsfb_info *host;
struct fb_info *fb_info;
struct fb_modelist *modelist;
+ struct pinctrl *pinctrl;
int i, ret;
if (!pdata) {
@@ -793,6 +795,12 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto error_getpin;
+ }
+
host->clk = clk_get(&host->pdev->dev, NULL);
if (IS_ERR(host->clk)) {
ret = PTR_ERR(host->clk);
@@ -848,6 +856,7 @@ error_init_fb:
error_pseudo_pallette:
clk_put(host->clk);
error_getclock:
+error_getpin:
iounmap(host->base);
error_ioremap:
framebuffer_release(fb_info);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 9/9] ARM: mxs: enable pinctrl support
2012-05-06 15:34 [PATCH 0/9] Enable pinctrl support for mach-mxs Shawn Guo
` (7 preceding siblings ...)
2012-05-06 15:35 ` [PATCH 8/9] video: mxsfb: " Shawn Guo
@ 2012-05-06 15:35 ` Shawn Guo
8 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2012-05-06 15:35 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/Kconfig | 1 +
arch/arm/mach-mxs/Kconfig | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cf006d4..c67494f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -469,6 +469,7 @@ config ARCH_MXS
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select HAVE_CLK_PREPARE
+ select PINCTRL
help
Support for Freescale MXS-based family of processors
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index c57f996..07d5383 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -9,11 +9,13 @@ config SOC_IMX23
bool
select CPU_ARM926T
select HAVE_PWM
+ select PINCTRL_IMX23
config SOC_IMX28
bool
select CPU_ARM926T
select HAVE_PWM
+ select PINCTRL_IMX28
comment "MXS platforms:"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread