All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  0:53 ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Arnd Bergmann, Olof Johansson, Sascha Hauer, Dong Aisheng,
	Shawn Guo, spi-devel-general, Grant Likely, linux-i2c,
	Wolfram Sang, linux-can, Marc Kleine-Budde, netdev,
	David S. Miller, linux-serial, Greg Kroah-Hartman

With patch 5b3aa5f (pinctrl: add pinctrl_provide_dummies interface for
platforms to use) applied on pinctrl tree, and patch "ARM: imx: enable
pinctrl dummy states" [1] being there, we are ready to adopt pinctrl
API for imx drivers.  So let's start from a few outstanding ones.

I would expect to ask Arnd and Olof to pull pinctrl tree into arm-soc
as a dependency and then have series [1] and this patch set go through
arm-soc tree to ease the merge process.

Resend to have subsystem lists Cc-ed.

Regards,
Shawn

[1] http://thread.gmane.org/gmane.linux.kernel.mmc/14180

Shawn Guo (5):
  tty: serial: imx: adopt pinctrl support
  net: fec: adopt pinctrl support
  can: flexcan: adopt pinctrl support
  i2c: imx: adopt pinctrl support
  spi/imx: adopt pinctrl support

 drivers/i2c/busses/i2c-imx.c         |    8 ++++++++
 drivers/net/can/flexcan.c            |    6 ++++++
 drivers/net/ethernet/freescale/fec.c |    9 +++++++++
 drivers/spi/spi-imx.c                |    8 ++++++++
 drivers/tty/serial/imx.c             |    8 ++++++++
 5 files changed, 39 insertions(+), 0 deletions(-)

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  0:53 ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

With patch 5b3aa5f (pinctrl: add pinctrl_provide_dummies interface for
platforms to use) applied on pinctrl tree, and patch "ARM: imx: enable
pinctrl dummy states" [1] being there, we are ready to adopt pinctrl
API for imx drivers.  So let's start from a few outstanding ones.

I would expect to ask Arnd and Olof to pull pinctrl tree into arm-soc
as a dependency and then have series [1] and this patch set go through
arm-soc tree to ease the merge process.

Resend to have subsystem lists Cc-ed.

Regards,
Shawn

[1] http://thread.gmane.org/gmane.linux.kernel.mmc/14180

Shawn Guo (5):
  tty: serial: imx: adopt pinctrl support
  net: fec: adopt pinctrl support
  can: flexcan: adopt pinctrl support
  i2c: imx: adopt pinctrl support
  spi/imx: adopt pinctrl support

 drivers/i2c/busses/i2c-imx.c         |    8 ++++++++
 drivers/net/can/flexcan.c            |    6 ++++++
 drivers/net/ethernet/freescale/fec.c |    9 +++++++++
 drivers/spi/spi-imx.c                |    8 ++++++++
 drivers/tty/serial/imx.c             |    8 ++++++++
 5 files changed, 39 insertions(+), 0 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support
  2012-05-07  0:53 ` Shawn Guo
@ 2012-05-07  0:53   ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Arnd Bergmann, Olof Johansson, Sascha Hauer, Dong Aisheng,
	Shawn Guo, linux-serial, Greg Kroah-Hartman

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/tty/serial/imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index e7fecee..ec20673 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -47,6 +47,7 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 	void __iomem *base;
 	int ret = 0;
 	struct resource *res;
+	struct pinctrl *pinctrl;
 
 	sport = kzalloc(sizeof(*sport), GFP_KERNEL);
 	if (!sport)
@@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev)
 	sport->timer.function = imx_timeout;
 	sport->timer.data     = (unsigned long)sport;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto unmap;
+	}
+
 	sport->clk = clk_get(&pdev->dev, "uart");
 	if (IS_ERR(sport->clk)) {
 		ret = PTR_ERR(sport->clk);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support
@ 2012-05-07  0:53   ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: linux-serial at vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/tty/serial/imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index e7fecee..ec20673 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -47,6 +47,7 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 	void __iomem *base;
 	int ret = 0;
 	struct resource *res;
+	struct pinctrl *pinctrl;
 
 	sport = kzalloc(sizeof(*sport), GFP_KERNEL);
 	if (!sport)
@@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev)
 	sport->timer.function = imx_timeout;
 	sport->timer.data     = (unsigned long)sport;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto unmap;
+	}
+
 	sport->clk = clk_get(&pdev->dev, "uart");
 	if (IS_ERR(sport->clk)) {
 		ret = PTR_ERR(sport->clk);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 2/5] net: fec: adopt pinctrl support
  2012-05-07  0:53 ` Shawn Guo
@ 2012-05-07  0:53   ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Arnd Bergmann, Olof Johansson, Sascha Hauer, Dong Aisheng,
	Shawn Guo, netdev, David S. Miller

Cc: netdev@vger.kernel.org
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/net/ethernet/freescale/fec.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index a12b3f5..500c106 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -48,6 +48,7 @@
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/of_net.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <asm/cacheflush.h>
 
@@ -1542,6 +1543,7 @@ fec_probe(struct platform_device *pdev)
 	struct resource *r;
 	const struct of_device_id *of_id;
 	static int dev_id;
+	struct pinctrl *pinctrl;
 
 	of_id = of_match_device(fec_dt_ids, &pdev->dev);
 	if (of_id)
@@ -1609,6 +1611,12 @@ fec_probe(struct platform_device *pdev)
 		}
 	}
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto failed_pin;
+	}
+
 	fep->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(fep->clk)) {
 		ret = PTR_ERR(fep->clk);
@@ -1639,6 +1647,7 @@ failed_mii_init:
 failed_init:
 	clk_disable_unprepare(fep->clk);
 	clk_put(fep->clk);
+failed_pin:
 failed_clk:
 	for (i = 0; i < FEC_IRQ_NUM; i++) {
 		irq = platform_get_irq(pdev, i);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 2/5] net: fec: adopt pinctrl support
@ 2012-05-07  0:53   ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: netdev at vger.kernel.org
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/net/ethernet/freescale/fec.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index a12b3f5..500c106 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -48,6 +48,7 @@
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/of_net.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <asm/cacheflush.h>
 
@@ -1542,6 +1543,7 @@ fec_probe(struct platform_device *pdev)
 	struct resource *r;
 	const struct of_device_id *of_id;
 	static int dev_id;
+	struct pinctrl *pinctrl;
 
 	of_id = of_match_device(fec_dt_ids, &pdev->dev);
 	if (of_id)
@@ -1609,6 +1611,12 @@ fec_probe(struct platform_device *pdev)
 		}
 	}
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto failed_pin;
+	}
+
 	fep->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(fep->clk)) {
 		ret = PTR_ERR(fep->clk);
@@ -1639,6 +1647,7 @@ failed_mii_init:
 failed_init:
 	clk_disable_unprepare(fep->clk);
 	clk_put(fep->clk);
+failed_pin:
 failed_clk:
 	for (i = 0; i < FEC_IRQ_NUM; i++) {
 		irq = platform_get_irq(pdev, i);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  0:53 ` Shawn Guo
@ 2012-05-07  0:53   ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Arnd Bergmann, Olof Johansson, Sascha Hauer, Dong Aisheng,
	Shawn Guo, linux-can, Marc Kleine-Budde

Cc: linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/net/can/flexcan.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 1efb083..38c0690 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
+#include <linux/pinctrl/consumer.h>
 
 #define DRV_NAME			"flexcan"
 
@@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
 	struct flexcan_priv *priv;
 	struct resource *mem;
 	struct clk *clk = NULL;
+	struct pinctrl *pinctrl;
 	void __iomem *base;
 	resource_size_t mem_size;
 	int err, irq;
 	u32 clock_freq = 0;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		return PTR_ERR(pinctrl);
+
 	if (pdev->dev.of_node) {
 		const u32 *clock_freq_p;
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-05-07  0:53   ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: linux-can at vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/net/can/flexcan.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 1efb083..38c0690 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
+#include <linux/pinctrl/consumer.h>
 
 #define DRV_NAME			"flexcan"
 
@@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
 	struct flexcan_priv *priv;
 	struct resource *mem;
 	struct clk *clk = NULL;
+	struct pinctrl *pinctrl;
 	void __iomem *base;
 	resource_size_t mem_size;
 	int err, irq;
 	u32 clock_freq = 0;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		return PTR_ERR(pinctrl);
+
 	if (pdev->dev.of_node) {
 		const u32 *clock_freq_p;
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 4/5] i2c: imx: adopt pinctrl support
  2012-05-07  0:53 ` Shawn Guo
@ 2012-05-07  0:53     ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Arnd Bergmann, Olof Johansson, Sascha Hauer, Dong Aisheng,
	Shawn Guo, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang

Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/i2c/busses/i2c-imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index dfb84b7..56bce9a 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -51,6 +51,7 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_i2c.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/irqs.h>
 #include <mach/hardware.h>
@@ -470,6 +471,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
 	struct imx_i2c_struct *i2c_imx;
 	struct resource *res;
 	struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
+	struct pinctrl *pinctrl;
 	void __iomem *base;
 	resource_size_t res_size;
 	int irq, bitrate;
@@ -520,6 +522,12 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
 	i2c_imx->base			= base;
 	i2c_imx->res			= res;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto fail3;
+	}
+
 	/* Get I2C clock */
 	i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk");
 	if (IS_ERR(i2c_imx->clk)) {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 4/5] i2c: imx: adopt pinctrl support
@ 2012-05-07  0:53     ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: linux-i2c at vger.kernel.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/i2c/busses/i2c-imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index dfb84b7..56bce9a 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -51,6 +51,7 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_i2c.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/irqs.h>
 #include <mach/hardware.h>
@@ -470,6 +471,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
 	struct imx_i2c_struct *i2c_imx;
 	struct resource *res;
 	struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
+	struct pinctrl *pinctrl;
 	void __iomem *base;
 	resource_size_t res_size;
 	int irq, bitrate;
@@ -520,6 +522,12 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
 	i2c_imx->base			= base;
 	i2c_imx->res			= res;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto fail3;
+	}
+
 	/* Get I2C clock */
 	i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk");
 	if (IS_ERR(i2c_imx->clk)) {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
  2012-05-07  0:53 ` Shawn Guo
@ 2012-05-07  0:54     ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:54 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Shawn Guo, Arnd Bergmann, Olof Johansson,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Dong Aisheng

Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 570f220..69c9a66 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -37,6 +37,7 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/spi.h>
 
@@ -758,6 +759,7 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct spi_imx_data *spi_imx;
 	struct resource *res;
+	struct pinctrl *pinctrl;
 	int i, ret, num_cs;
 
 	if (!np && !mxc_platform_info) {
@@ -845,6 +847,12 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
 		goto out_iounmap;
 	}
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto out_free_irq;
+	}
+
 	spi_imx->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(spi_imx->clk)) {
 		dev_err(&pdev->dev, "unable to get clock\n");
-- 
1.7.5.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
@ 2012-05-07  0:54     ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  0:54 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: spi-devel-general at lists.sourceforge.net
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/spi/spi-imx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 570f220..69c9a66 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -37,6 +37,7 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/spi.h>
 
@@ -758,6 +759,7 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct spi_imx_data *spi_imx;
 	struct resource *res;
+	struct pinctrl *pinctrl;
 	int i, ret, num_cs;
 
 	if (!np && !mxc_platform_info) {
@@ -845,6 +847,12 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
 		goto out_iounmap;
 	}
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl)) {
+		ret = PTR_ERR(pinctrl);
+		goto out_free_irq;
+	}
+
 	spi_imx->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(spi_imx->clk)) {
 		dev_err(&pdev->dev, "unable to get clock\n");
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
  2012-05-07  0:53 ` Shawn Guo
  (?)
@ 2012-05-07  6:50   ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-07  6:50 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, netdev, Sascha Hauer,
	Wolfram Sang, linux-can, Grant Likely, Marc Kleine-Budde,
	linux-i2c, linux-serial, Greg Kroah-Hartman, Olof Johansson,
	spi-devel-general, Dong Aisheng, David S. Miller

On Mon, May 07, 2012 at 08:53:55AM +0800, Shawn Guo wrote:
> With patch 5b3aa5f (pinctrl: add pinctrl_provide_dummies interface for
> platforms to use) applied on pinctrl tree, and patch "ARM: imx: enable
> pinctrl dummy states" [1] being there, we are ready to adopt pinctrl
> API for imx drivers.  So let's start from a few outstanding ones.
> 
> I would expect to ask Arnd and Olof to pull pinctrl tree into arm-soc
> as a dependency and then have series [1] and this patch set go through
> arm-soc tree to ease the merge process.
> 
Shouldn't we add the pinctrl states in dts file at the same time
with this patch series or using another separate patch to add them
before this series to avoid breaking the exist mx6q platforms?

> Resend to have subsystem lists Cc-ed.
> 
> Regards,
> Shawn
> 
> [1] http://thread.gmane.org/gmane.linux.kernel.mmc/14180
> 
> Shawn Guo (5):
>   tty: serial: imx: adopt pinctrl support
...

>   net: fec: adopt pinctrl support
>   can: flexcan: adopt pinctrl support
This two also depends on another patch you sent.
[PATCH RESEND 1/9] ARM: mxs: enable pinctrl dummy states
http://www.spinics.net/lists/arm-kernel/msg173341.html

Maybe you can put this two in the mxs convert series to avoid breaking
mxs platforms.
[PATCH 0/9] Enable pinctrl support for mach-mxs
http://www.spinics.net/lists/arm-kernel/msg173312.html

Regards
Dong Aisheng

>   i2c: imx: adopt pinctrl support
>   spi/imx: adopt pinctrl support
> 
>  drivers/i2c/busses/i2c-imx.c         |    8 ++++++++
>  drivers/net/can/flexcan.c            |    6 ++++++
>  drivers/net/ethernet/freescale/fec.c |    9 +++++++++
>  drivers/spi/spi-imx.c                |    8 ++++++++
>  drivers/tty/serial/imx.c             |    8 ++++++++
>  5 files changed, 39 insertions(+), 0 deletions(-)
> 
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  6:50   ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-07  6:50 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, netdev, Sascha Hauer,
	Wolfram Sang, linux-can, Grant Likely, Marc Kleine-Budde,
	linux-i2c, linux-serial, Greg Kroah-Hartman, Olof Johansson,
	spi-devel-general, Dong Aisheng, David S. Miller

On Mon, May 07, 2012 at 08:53:55AM +0800, Shawn Guo wrote:
> With patch 5b3aa5f (pinctrl: add pinctrl_provide_dummies interface for
> platforms to use) applied on pinctrl tree, and patch "ARM: imx: enable
> pinctrl dummy states" [1] being there, we are ready to adopt pinctrl
> API for imx drivers.  So let's start from a few outstanding ones.
> 
> I would expect to ask Arnd and Olof to pull pinctrl tree into arm-soc
> as a dependency and then have series [1] and this patch set go through
> arm-soc tree to ease the merge process.
> 
Shouldn't we add the pinctrl states in dts file at the same time
with this patch series or using another separate patch to add them
before this series to avoid breaking the exist mx6q platforms?

> Resend to have subsystem lists Cc-ed.
> 
> Regards,
> Shawn
> 
> [1] http://thread.gmane.org/gmane.linux.kernel.mmc/14180
> 
> Shawn Guo (5):
>   tty: serial: imx: adopt pinctrl support
...

>   net: fec: adopt pinctrl support
>   can: flexcan: adopt pinctrl support
This two also depends on another patch you sent.
[PATCH RESEND 1/9] ARM: mxs: enable pinctrl dummy states
http://www.spinics.net/lists/arm-kernel/msg173341.html

Maybe you can put this two in the mxs convert series to avoid breaking
mxs platforms.
[PATCH 0/9] Enable pinctrl support for mach-mxs
http://www.spinics.net/lists/arm-kernel/msg173312.html

Regards
Dong Aisheng

>   i2c: imx: adopt pinctrl support
>   spi/imx: adopt pinctrl support
> 
>  drivers/i2c/busses/i2c-imx.c         |    8 ++++++++
>  drivers/net/can/flexcan.c            |    6 ++++++
>  drivers/net/ethernet/freescale/fec.c |    9 +++++++++
>  drivers/spi/spi-imx.c                |    8 ++++++++
>  drivers/tty/serial/imx.c             |    8 ++++++++
>  5 files changed, 39 insertions(+), 0 deletions(-)
> 
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  6:50   ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-07  6:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:53:55AM +0800, Shawn Guo wrote:
> With patch 5b3aa5f (pinctrl: add pinctrl_provide_dummies interface for
> platforms to use) applied on pinctrl tree, and patch "ARM: imx: enable
> pinctrl dummy states" [1] being there, we are ready to adopt pinctrl
> API for imx drivers.  So let's start from a few outstanding ones.
> 
> I would expect to ask Arnd and Olof to pull pinctrl tree into arm-soc
> as a dependency and then have series [1] and this patch set go through
> arm-soc tree to ease the merge process.
> 
Shouldn't we add the pinctrl states in dts file at the same time
with this patch series or using another separate patch to add them
before this series to avoid breaking the exist mx6q platforms?

> Resend to have subsystem lists Cc-ed.
> 
> Regards,
> Shawn
> 
> [1] http://thread.gmane.org/gmane.linux.kernel.mmc/14180
> 
> Shawn Guo (5):
>   tty: serial: imx: adopt pinctrl support
...

>   net: fec: adopt pinctrl support
>   can: flexcan: adopt pinctrl support
This two also depends on another patch you sent.
[PATCH RESEND 1/9] ARM: mxs: enable pinctrl dummy states
http://www.spinics.net/lists/arm-kernel/msg173341.html

Maybe you can put this two in the mxs convert series to avoid breaking
mxs platforms.
[PATCH 0/9] Enable pinctrl support for mach-mxs
http://www.spinics.net/lists/arm-kernel/msg173312.html

Regards
Dong Aisheng

>   i2c: imx: adopt pinctrl support
>   spi/imx: adopt pinctrl support
> 
>  drivers/i2c/busses/i2c-imx.c         |    8 ++++++++
>  drivers/net/can/flexcan.c            |    6 ++++++
>  drivers/net/ethernet/freescale/fec.c |    9 +++++++++
>  drivers/spi/spi-imx.c                |    8 ++++++++
>  drivers/tty/serial/imx.c             |    8 ++++++++
>  5 files changed, 39 insertions(+), 0 deletions(-)
> 
> -- 
> 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] 47+ messages in thread

* Re: [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
  2012-05-07  6:50   ` Dong Aisheng
@ 2012-05-07  7:34     ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  7:34 UTC (permalink / raw)
  To: Dong Aisheng
  Cc: linux-arm-kernel, Arnd Bergmann, netdev, Sascha Hauer,
	Wolfram Sang, linux-can, Grant Likely, Marc Kleine-Budde,
	linux-i2c, linux-serial, Greg Kroah-Hartman, Olof Johansson,
	spi-devel-general, Dong Aisheng, David S. Miller

On Mon, May 07, 2012 at 02:50:02PM +0800, Dong Aisheng wrote:
> Shouldn't we add the pinctrl states in dts file at the same time
> with this patch series or using another separate patch to add them
> before this series to avoid breaking the exist mx6q platforms?
> 
Ah, I just noticed that your patch "ARM: imx: enable pinctrl dummy
states" did not cover imx6q.  I think we should do the same for imx6q,
so that we can separate dts update from the driver change.  When all
imx6q boards' dts files get updated to have pins defined for the
devices, we can then remove dummy state for imx6q.  Doing so will ease
the pinctrl migration for those imx6q boards.

Will update your patch on my branch to have dummy state enabled for
imx6q.

> >   net: fec: adopt pinctrl support
> >   can: flexcan: adopt pinctrl support
> This two also depends on another patch you sent.
> [PATCH RESEND 1/9] ARM: mxs: enable pinctrl dummy states
> http://www.spinics.net/lists/arm-kernel/msg173341.html
> 
> Maybe you can put this two in the mxs convert series to avoid breaking
> mxs platforms.
> [PATCH 0/9] Enable pinctrl support for mach-mxs
> http://www.spinics.net/lists/arm-kernel/msg173312.html
> 
Right.  I'm going to merge these two series into one since there are
device drives shared between imx and mxs.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  7:34     ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 02:50:02PM +0800, Dong Aisheng wrote:
> Shouldn't we add the pinctrl states in dts file at the same time
> with this patch series or using another separate patch to add them
> before this series to avoid breaking the exist mx6q platforms?
> 
Ah, I just noticed that your patch "ARM: imx: enable pinctrl dummy
states" did not cover imx6q.  I think we should do the same for imx6q,
so that we can separate dts update from the driver change.  When all
imx6q boards' dts files get updated to have pins defined for the
devices, we can then remove dummy state for imx6q.  Doing so will ease
the pinctrl migration for those imx6q boards.

Will update your patch on my branch to have dummy state enabled for
imx6q.

> >   net: fec: adopt pinctrl support
> >   can: flexcan: adopt pinctrl support
> This two also depends on another patch you sent.
> [PATCH RESEND 1/9] ARM: mxs: enable pinctrl dummy states
> http://www.spinics.net/lists/arm-kernel/msg173341.html
> 
> Maybe you can put this two in the mxs convert series to avoid breaking
> mxs platforms.
> [PATCH 0/9] Enable pinctrl support for mach-mxs
> http://www.spinics.net/lists/arm-kernel/msg173312.html
> 
Right.  I'm going to merge these two series into one since there are
device drives shared between imx and mxs.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
  2012-05-07  7:34     ` Shawn Guo
@ 2012-05-07  7:53       ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-07  7:53 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Dong Aisheng-B29396, linux-arm-kernel, Arnd Bergmann, netdev,
	Sascha Hauer, Wolfram Sang, linux-can, Grant Likely,
	Marc Kleine-Budde, linux-i2c, linux-serial, Greg Kroah-Hartman,
	Olof Johansson, spi-devel-general, Dong Aisheng, David S. Miller

On Mon, May 07, 2012 at 03:34:06PM +0800, Shawn Guo wrote:
> On Mon, May 07, 2012 at 02:50:02PM +0800, Dong Aisheng wrote:
> > Shouldn't we add the pinctrl states in dts file at the same time
> > with this patch series or using another separate patch to add them
> > before this series to avoid breaking the exist mx6q platforms?
> > 
> Ah, I just noticed that your patch "ARM: imx: enable pinctrl dummy
> states" did not cover imx6q.  I think we should do the same for imx6q,
Yes, doing that was to force people to add pinctrl states in dts file
rather than using dummy state since mx6 supports pinctrl driver.

> so that we can separate dts update from the driver change.  When all
> imx6q boards' dts files get updated to have pins defined for the
> devices, we can then remove dummy state for imx6q.  Doing so will ease
> the pinctrl migration for those imx6q boards.
> 
Well, considering we have several mx6 boards, i think i can also be fine
with this way to ease the mx6q pinctrl migration.

> Will update your patch on my branch to have dummy state enabled for
> imx6q.
> 
Then go ahead.

Regards
Dong Aisheng


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers
@ 2012-05-07  7:53       ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-07  7:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 03:34:06PM +0800, Shawn Guo wrote:
> On Mon, May 07, 2012 at 02:50:02PM +0800, Dong Aisheng wrote:
> > Shouldn't we add the pinctrl states in dts file at the same time
> > with this patch series or using another separate patch to add them
> > before this series to avoid breaking the exist mx6q platforms?
> > 
> Ah, I just noticed that your patch "ARM: imx: enable pinctrl dummy
> states" did not cover imx6q.  I think we should do the same for imx6q,
Yes, doing that was to force people to add pinctrl states in dts file
rather than using dummy state since mx6 supports pinctrl driver.

> so that we can separate dts update from the driver change.  When all
> imx6q boards' dts files get updated to have pins defined for the
> devices, we can then remove dummy state for imx6q.  Doing so will ease
> the pinctrl migration for those imx6q boards.
> 
Well, considering we have several mx6 boards, i think i can also be fine
with this way to ease the mx6q pinctrl migration.

> Will update your patch on my branch to have dummy state enabled for
> imx6q.
> 
Then go ahead.

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-05-07  8:06     ` Marc Kleine-Budde
  -1 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-05-07  8:06 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Dong Aisheng, linux-can, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

Hello,

On 05/07/2012 02:53 AM, Shawn Guo wrote:
> Cc: linux-can@vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---

It doesn't compile yet against net-next/master, which is based on v3.4-rc4:

/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
function 'flexcan_probe':
/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
error: implicit declaration of function 'devm_pinctrl_get_select_default'
/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
warning: assignment makes pointer from integer without a cast

Which tree does this series depend on? If this should go over the
linux-can tree, I have to ask David first to merge this.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-05-07  8:06     ` Marc Kleine-Budde
  0 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-05-07  8:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On 05/07/2012 02:53 AM, Shawn Guo wrote:
> Cc: linux-can at vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---

It doesn't compile yet against net-next/master, which is based on v3.4-rc4:

/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
function 'flexcan_probe':
/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
error: implicit declaration of function 'devm_pinctrl_get_select_default'
/home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
warning: assignment makes pointer from integer without a cast

Which tree does this series depend on? If this should go over the
linux-can tree, I have to ask David first to merge this.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120507/0a7929ce/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  8:06     ` Marc Kleine-Budde
@ 2012-05-07  8:17       ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  8:17 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: linux-arm-kernel, Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Dong Aisheng, linux-can, Linux Netdev List

On 7 May 2012 16:06, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> It doesn't compile yet against net-next/master, which is based on v3.4-rc4:
>
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
> function 'flexcan_probe':
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
> error: implicit declaration of function 'devm_pinctrl_get_select_default'
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
> warning: assignment makes pointer from integer without a cast
>
> Which tree does this series depend on? If this should go over the
> linux-can tree, I have to ask David first to merge this.
>
Thanks for the response, Marc.  The patch depends on pinctrl tree and
a couple of other patches that will go through arm-soc tree, so I
would like to ask for your ack to have the patch go over arm-soc tree.

Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-05-07  8:17       ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-07  8:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 7 May 2012 16:06, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> It doesn't compile yet against net-next/master, which is based on v3.4-rc4:
>
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
> function 'flexcan_probe':
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
> error: implicit declaration of function 'devm_pinctrl_get_select_default'
> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
> warning: assignment makes pointer from integer without a cast
>
> Which tree does this series depend on? If this should go over the
> linux-can tree, I have to ask David first to merge this.
>
Thanks for the response, Marc.  The patch depends on pinctrl tree and
a couple of other patches that will go through arm-soc tree, so I
would like to ask for your ack to have the patch go over arm-soc tree.

Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  8:17       ` Shawn Guo
@ 2012-05-07  8:29         ` Marc Kleine-Budde
  -1 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-05-07  8:29 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Dong Aisheng, linux-can, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

On 05/07/2012 10:17 AM, Shawn Guo wrote:
> On 7 May 2012 16:06, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>> It doesn't compile yet against net-next/master, which is based on v3.4-rc4:
>>
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
>> function 'flexcan_probe':
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
>> error: implicit declaration of function 'devm_pinctrl_get_select_default'
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
>> warning: assignment makes pointer from integer without a cast
>>
>> Which tree does this series depend on? If this should go over the
>> linux-can tree, I have to ask David first to merge this.
>>
> Thanks for the response, Marc.  The patch depends on pinctrl tree and
> a couple of other patches that will go through arm-soc tree, so I
> would like to ask for your ack to have the patch go over arm-soc tree.

Fine with me. David, is this okay? Shawn, better wait for David's okay.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-05-07  8:29         ` Marc Kleine-Budde
  0 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-05-07  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/07/2012 10:17 AM, Shawn Guo wrote:
> On 7 May 2012 16:06, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>> It doesn't compile yet against net-next/master, which is based on v3.4-rc4:
>>
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c: In
>> function 'flexcan_probe':
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
>> error: implicit declaration of function 'devm_pinctrl_get_select_default'
>> /home/frogger/pengutronix/socketcan/linux/drivers/net/can/flexcan.c:937:
>> warning: assignment makes pointer from integer without a cast
>>
>> Which tree does this series depend on? If this should go over the
>> linux-can tree, I have to ask David first to merge this.
>>
> Thanks for the response, Marc.  The patch depends on pinctrl tree and
> a couple of other patches that will go through arm-soc tree, so I
> would like to ask for your ack to have the patch go over arm-soc tree.

Fine with me. David, is this okay? Shawn, better wait for David's okay.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120507/e673a848/attachment.sig>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-05-08  3:43     ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:43 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, Greg Kroah-Hartman,
	Sascha Hauer, linux-serial, Olof Johansson, Dong Aisheng

On Mon, May 07, 2012 at 08:53:56AM +0800, Shawn Guo wrote:
> Cc: linux-serial@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/tty/serial/imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support
@ 2012-05-08  3:43     ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:53:56AM +0800, Shawn Guo wrote:
> Cc: linux-serial at vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/tty/serial/imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 2/5] net: fec: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-05-08  3:44     ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:44 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, netdev, Sascha Hauer,
	Olof Johansson, Dong Aisheng, David S. Miller

On Mon, May 07, 2012 at 08:53:57AM +0800, Shawn Guo wrote:
> Cc: netdev@vger.kernel.org
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 2/5] net: fec: adopt pinctrl support
@ 2012-05-08  3:44     ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:53:57AM +0800, Shawn Guo wrote:
> Cc: netdev at vger.kernel.org
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-05-08  3:44     ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:44 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, Sascha Hauer, linux-can,
	Marc Kleine-Budde, Olof Johansson, Dong Aisheng

On Mon, May 07, 2012 at 08:53:58AM +0800, Shawn Guo wrote:
> Cc: linux-can@vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-05-08  3:44     ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:53:58AM +0800, Shawn Guo wrote:
> Cc: linux-can at vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 4/5] i2c: imx: adopt pinctrl support
  2012-05-07  0:53     ` Shawn Guo
@ 2012-05-08  3:45         ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:45 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Arnd Bergmann,
	Sascha Hauer, Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	Olof Johansson, Dong Aisheng

On Mon, May 07, 2012 at 08:53:59AM +0800, Shawn Guo wrote:
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng <dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 4/5] i2c: imx: adopt pinctrl support
@ 2012-05-08  3:45         ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:53:59AM +0800, Shawn Guo wrote:
> Cc: linux-i2c at vger.kernel.org
> Cc: Wolfram Sang <w.sang@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/i2c/busses/i2c-imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
  2012-05-07  0:54     ` Shawn Guo
@ 2012-05-08  3:45       ` Dong Aisheng
  -1 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:45 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Arnd Bergmann, Sascha Hauer, Grant Likely, Olof Johansson,
	spi-devel-general, Dong Aisheng, linux-arm-kernel

On Mon, May 07, 2012 at 08:54:00AM +0800, Shawn Guo wrote:
> Cc: spi-devel-general@lists.sourceforge.net
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/spi/spi-imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
@ 2012-05-08  3:45       ` Dong Aisheng
  0 siblings, 0 replies; 47+ messages in thread
From: Dong Aisheng @ 2012-05-08  3:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 07, 2012 at 08:54:00AM +0800, Shawn Guo wrote:
> Cc: spi-devel-general at lists.sourceforge.net
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/spi/spi-imx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 2/5] net: fec: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-05-11 22:31     ` David Miller
  -1 siblings, 0 replies; 47+ messages in thread
From: David Miller @ 2012-05-11 22:31 UTC (permalink / raw)
  To: shawn.guo; +Cc: arnd, netdev, s.hauer, olof, dong.aisheng, linux-arm-kernel

From: Shawn Guo <shawn.guo@linaro.org>
Date: Mon,  7 May 2012 08:53:57 +0800

> Cc: netdev@vger.kernel.org
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 2/5] net: fec: adopt pinctrl support
@ 2012-05-11 22:31     ` David Miller
  0 siblings, 0 replies; 47+ messages in thread
From: David Miller @ 2012-05-11 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

From: Shawn Guo <shawn.guo@linaro.org>
Date: Mon,  7 May 2012 08:53:57 +0800

> Cc: netdev at vger.kernel.org
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
  2012-05-08  3:45       ` Dong Aisheng
@ 2012-05-20  4:40           ` Grant Likely
  -1 siblings, 0 replies; 47+ messages in thread
From: Grant Likely @ 2012-05-20  4:40 UTC (permalink / raw)
  To: Dong Aisheng, Shawn Guo
  Cc: Arnd Bergmann, Olof Johansson,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Dong Aisheng,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, 8 May 2012 11:45:46 +0800, Dong Aisheng <aisheng.dong-KZfg59tc24xl57MIdRCFDg@public.gmane.org> wrote:
> On Mon, May 07, 2012 at 08:54:00AM +0800, Shawn Guo wrote:
> > Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> > Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/spi/spi-imx.c |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> Acked-by: Dong Aisheng <dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

Can I assume all the patches in this series will be merged via the
same branch?

g.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
@ 2012-05-20  4:40           ` Grant Likely
  0 siblings, 0 replies; 47+ messages in thread
From: Grant Likely @ 2012-05-20  4:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 8 May 2012 11:45:46 +0800, Dong Aisheng <aisheng.dong@freescale.com> wrote:
> On Mon, May 07, 2012 at 08:54:00AM +0800, Shawn Guo wrote:
> > Cc: spi-devel-general at lists.sourceforge.net
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> >  drivers/spi/spi-imx.c |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

Can I assume all the patches in this series will be merged via the
same branch?

g.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
  2012-05-20  4:40           ` Grant Likely
@ 2012-05-20  5:19             ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-20  5:19 UTC (permalink / raw)
  To: Grant Likely
  Cc: Dong Aisheng, Dong Aisheng, Arnd Bergmann, Olof Johansson,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Shawn Guo,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, May 19, 2012 at 10:40:30PM -0600, Grant Likely wrote:
> Can I assume all the patches in this series will be merged via the
> same branch?
> 
Yes, we will have them all go via arm-soc.

-- 
Regards,
Shawn


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 5/5] spi/imx: adopt pinctrl support
@ 2012-05-20  5:19             ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-05-20  5:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, May 19, 2012 at 10:40:30PM -0600, Grant Likely wrote:
> Can I assume all the patches in this series will be merged via the
> same branch?
> 
Yes, we will have them all go via arm-soc.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-05-07  0:53   ` Shawn Guo
@ 2012-07-01 22:49     ` Marc Kleine-Budde
  -1 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-07-01 22:49 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Dong Aisheng, linux-can

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

On 05/07/2012 02:53 AM, Shawn Guo wrote:
> Cc: linux-can@vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/net/can/flexcan.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 1efb083..38c0690 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -35,6 +35,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> +#include <linux/pinctrl/consumer.h>
>  
>  #define DRV_NAME			"flexcan"
>  
> @@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
>  	struct flexcan_priv *priv;
>  	struct resource *mem;
>  	struct clk *clk = NULL;
> +	struct pinctrl *pinctrl;
>  	void __iomem *base;
>  	resource_size_t mem_size;
>  	int err, irq;
>  	u32 clock_freq = 0;
>  
> +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> +	if (IS_ERR(pinctrl))
> +		return PTR_ERR(pinctrl);
> +
>  	if (pdev->dev.of_node) {
>  		const u32 *clock_freq_p;

I'm on mx28 and trying to load the flexcan driver via DT, but
devm_pinctrl_get_select_default fails with -19.

What am I doing wrong? Will this fail with the same error on non DT
platforms?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-07-01 22:49     ` Marc Kleine-Budde
  0 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-07-01 22:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/07/2012 02:53 AM, Shawn Guo wrote:
> Cc: linux-can at vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/net/can/flexcan.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 1efb083..38c0690 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -35,6 +35,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> +#include <linux/pinctrl/consumer.h>
>  
>  #define DRV_NAME			"flexcan"
>  
> @@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
>  	struct flexcan_priv *priv;
>  	struct resource *mem;
>  	struct clk *clk = NULL;
> +	struct pinctrl *pinctrl;
>  	void __iomem *base;
>  	resource_size_t mem_size;
>  	int err, irq;
>  	u32 clock_freq = 0;
>  
> +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> +	if (IS_ERR(pinctrl))
> +		return PTR_ERR(pinctrl);
> +
>  	if (pdev->dev.of_node) {
>  		const u32 *clock_freq_p;

I'm on mx28 and trying to load the flexcan driver via DT, but
devm_pinctrl_get_select_default fails with -19.

What am I doing wrong? Will this fail with the same error on non DT
platforms?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120702/bf197aab/attachment.sig>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-07-01 22:49     ` Marc Kleine-Budde
@ 2012-07-02  1:52       ` Shawn Guo
  -1 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-07-02  1:52 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: linux-arm-kernel, Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Dong Aisheng, linux-can

On Mon, Jul 02, 2012 at 12:49:37AM +0200, Marc Kleine-Budde wrote:
> > +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> > +	if (IS_ERR(pinctrl))
> > +		return PTR_ERR(pinctrl);
> > +
> >  	if (pdev->dev.of_node) {
> >  		const u32 *clock_freq_p;
> 
> I'm on mx28 and trying to load the flexcan driver via DT, but
> devm_pinctrl_get_select_default fails with -19.
> 
You need to have pinctrl state setup in dts, some like:

http://article.gmane.org/gmane.linux.ports.arm.kernel/174148

> What am I doing wrong? Will this fail with the same error on non DT
> platforms?
> 
No, it will not, because a dummy pinctrl state is provided by
calling pinctrl_provide_dummies() in mx28_soc_init().

-- 
Regards,
Shawn


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-07-02  1:52       ` Shawn Guo
  0 siblings, 0 replies; 47+ messages in thread
From: Shawn Guo @ 2012-07-02  1:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 02, 2012 at 12:49:37AM +0200, Marc Kleine-Budde wrote:
> > +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> > +	if (IS_ERR(pinctrl))
> > +		return PTR_ERR(pinctrl);
> > +
> >  	if (pdev->dev.of_node) {
> >  		const u32 *clock_freq_p;
> 
> I'm on mx28 and trying to load the flexcan driver via DT, but
> devm_pinctrl_get_select_default fails with -19.
> 
You need to have pinctrl state setup in dts, some like:

http://article.gmane.org/gmane.linux.ports.arm.kernel/174148

> What am I doing wrong? Will this fail with the same error on non DT
> platforms?
> 
No, it will not, because a dummy pinctrl state is provided by
calling pinctrl_provide_dummies() in mx28_soc_init().

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
  2012-07-02  1:52       ` Shawn Guo
@ 2012-07-03 10:00         ` Marc Kleine-Budde
  -1 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-07-03 10:00 UTC (permalink / raw)
  To: Shawn Guo; +Cc: linux-arm-kernel, linux-can

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

On 07/02/2012 03:52 AM, Shawn Guo wrote:
> On Mon, Jul 02, 2012 at 12:49:37AM +0200, Marc Kleine-Budde wrote:
>>> +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
>>> +	if (IS_ERR(pinctrl))
>>> +		return PTR_ERR(pinctrl);
>>> +
>>>  	if (pdev->dev.of_node) {
>>>  		const u32 *clock_freq_p;
>>
>> I'm on mx28 and trying to load the flexcan driver via DT, but
>> devm_pinctrl_get_select_default fails with -19.
>>
> You need to have pinctrl state setup in dts, some like:
> 
> http://article.gmane.org/gmane.linux.ports.arm.kernel/174148

Works like charm.

tnx, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH RESEND 3/5] can: flexcan: adopt pinctrl support
@ 2012-07-03 10:00         ` Marc Kleine-Budde
  0 siblings, 0 replies; 47+ messages in thread
From: Marc Kleine-Budde @ 2012-07-03 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/02/2012 03:52 AM, Shawn Guo wrote:
> On Mon, Jul 02, 2012 at 12:49:37AM +0200, Marc Kleine-Budde wrote:
>>> +	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
>>> +	if (IS_ERR(pinctrl))
>>> +		return PTR_ERR(pinctrl);
>>> +
>>>  	if (pdev->dev.of_node) {
>>>  		const u32 *clock_freq_p;
>>
>> I'm on mx28 and trying to load the flexcan driver via DT, but
>> devm_pinctrl_get_select_default fails with -19.
>>
> You need to have pinctrl state setup in dts, some like:
> 
> http://article.gmane.org/gmane.linux.ports.arm.kernel/174148

Works like charm.

tnx, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120703/003854e2/attachment.sig>

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2012-07-03 10:00 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07  0:53 [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers Shawn Guo
2012-05-07  0:53 ` Shawn Guo
2012-05-07  0:53 ` [PATCH RESEND 1/5] tty: serial: imx: adopt pinctrl support Shawn Guo
2012-05-07  0:53   ` Shawn Guo
2012-05-08  3:43   ` Dong Aisheng
2012-05-08  3:43     ` Dong Aisheng
2012-05-07  0:53 ` [PATCH RESEND 2/5] net: fec: " Shawn Guo
2012-05-07  0:53   ` Shawn Guo
2012-05-08  3:44   ` Dong Aisheng
2012-05-08  3:44     ` Dong Aisheng
2012-05-11 22:31   ` David Miller
2012-05-11 22:31     ` David Miller
2012-05-07  0:53 ` [PATCH RESEND 3/5] can: flexcan: " Shawn Guo
2012-05-07  0:53   ` Shawn Guo
2012-05-07  8:06   ` Marc Kleine-Budde
2012-05-07  8:06     ` Marc Kleine-Budde
2012-05-07  8:17     ` Shawn Guo
2012-05-07  8:17       ` Shawn Guo
2012-05-07  8:29       ` Marc Kleine-Budde
2012-05-07  8:29         ` Marc Kleine-Budde
2012-05-08  3:44   ` Dong Aisheng
2012-05-08  3:44     ` Dong Aisheng
2012-07-01 22:49   ` Marc Kleine-Budde
2012-07-01 22:49     ` Marc Kleine-Budde
2012-07-02  1:52     ` Shawn Guo
2012-07-02  1:52       ` Shawn Guo
2012-07-03 10:00       ` Marc Kleine-Budde
2012-07-03 10:00         ` Marc Kleine-Budde
     [not found] ` <1336352040-28447-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-05-07  0:53   ` [PATCH RESEND 4/5] i2c: imx: " Shawn Guo
2012-05-07  0:53     ` Shawn Guo
     [not found]     ` <1336352040-28447-5-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-05-08  3:45       ` Dong Aisheng
2012-05-08  3:45         ` Dong Aisheng
2012-05-07  0:54   ` [PATCH RESEND 5/5] spi/imx: " Shawn Guo
2012-05-07  0:54     ` Shawn Guo
2012-05-08  3:45     ` Dong Aisheng
2012-05-08  3:45       ` Dong Aisheng
     [not found]       ` <20120508034545.GJ23607-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-05-20  4:40         ` Grant Likely
2012-05-20  4:40           ` Grant Likely
2012-05-20  5:19           ` Shawn Guo
2012-05-20  5:19             ` Shawn Guo
2012-05-07  6:50 ` [PATCH RESEND 0/5] Adopt pinctrl support for a few outstanding imx drivers Dong Aisheng
2012-05-07  6:50   ` Dong Aisheng
2012-05-07  6:50   ` Dong Aisheng
2012-05-07  7:34   ` Shawn Guo
2012-05-07  7:34     ` Shawn Guo
2012-05-07  7:53     ` Dong Aisheng
2012-05-07  7:53       ` Dong Aisheng

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.