[alsa-devel] [PATCH V2 00/11] enable imx6q_sabrelite sgtl5000 audio support
Changes since v1:
- rebase to latest clk and pinctrl base - fix according v1 comments.
You can also get at: https://github.com/riczhao/kernel-imx/tree/topics/audio
Richard Zhao (11): dma: imx-sdma: make channel0 operations atomic ARM: dts: imx6q-sabrelite: add i2c1 pinctrl support ASoC: imx-audmux: add pinctrl support ARM: dts: imx6q-sabrelite: add audmux pinctrl support ARM: imx6q: add ssi1_ipg clk_lookup ASoC: fsl_ssi: convert to use devm_clk_get ARM: imx6q_sabrelite: clk_register_clkdev cko1 for sgtl5000 ARM: dts: imx6q-sabrelite: add sound device imx6q-sabrelite-sgtl5000 ARM: dts: imx6q-sabrelite: add serial2 pinctrl support ARM: imx6q: change clkdev device name from xxxx.uart to xxxx.serial ARM: imx6q: change clkdev device name from xxxx.enet to xxxx.ethernet
arch/arm/boot/dts/imx6q-sabrelite.dts | 20 +++++++++++ arch/arm/boot/dts/imx6q.dtsi | 23 +++++++++++++ arch/arm/mach-imx/clk-imx6q.c | 35 +++++++++++--------- arch/arm/mach-imx/mach-imx6q.c | 28 ++++++++++++++++ drivers/dma/imx-sdma.c | 57 ++++++++++++++++++--------------- sound/soc/fsl/fsl_ssi.c | 7 +--- sound/soc/fsl/imx-audmux.c | 8 +++++ 7 files changed, 132 insertions(+), 46 deletions(-)
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock. - Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- drivers/dma/imx-sdma.c | 57 ++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index fddccae..4fd48eb 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -24,7 +24,7 @@ #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/clk.h> -#include <linux/wait.h> +#include <linux/delay.h> #include <linux/sched.h> #include <linux/semaphore.h> #include <linux/spinlock.h> @@ -324,7 +324,7 @@ struct sdma_engine { struct dma_device dma_device; struct clk *clk_ipg; struct clk *clk_ahb; - struct mutex channel_0_lock; + spinlock_t channel_0_lock; struct sdma_script_start_addrs *script_addrs; };
@@ -402,19 +402,27 @@ static void sdma_enable_channel(struct sdma_engine *sdma, int channel) }
/* - * sdma_run_channel - run a channel and wait till it's done + * sdma_run_channel0 - run a channel and wait till it's done */ -static int sdma_run_channel(struct sdma_channel *sdmac) +static int sdma_run_channel0(struct sdma_engine *sdma) { - struct sdma_engine *sdma = sdmac->sdma; - int channel = sdmac->channel; int ret; + unsigned long timeout = 500;
- init_completion(&sdmac->done); + sdma_enable_channel(sdma, 0);
- sdma_enable_channel(sdma, channel); + while (!(ret = readl_relaxed(sdma->regs + SDMA_H_INTR) & 1)) { + if (timeout-- <= 0) + break; + udelay(1); + }
- ret = wait_for_completion_timeout(&sdmac->done, HZ); + if (ret) { + /* Clear the interrupt status */ + writel_relaxed(ret, sdma->regs + SDMA_H_INTR); + } else { + dev_err(sdma->dev, "Timeout waiting for CH0 ready\n"); + }
return ret ? 0 : -ETIMEDOUT; } @@ -426,17 +434,17 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, void *buf_virt; dma_addr_t buf_phys; int ret; - - mutex_lock(&sdma->channel_0_lock); + unsigned long flags;
buf_virt = dma_alloc_coherent(NULL, size, &buf_phys, GFP_KERNEL); if (!buf_virt) { - ret = -ENOMEM; - goto err_out; + return -ENOMEM; }
+ spin_lock_irqsave(&sdma->channel_0_lock, flags); + bd0->mode.command = C0_SETPM; bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; bd0->mode.count = size / 2; @@ -445,12 +453,11 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size,
memcpy(buf_virt, buf, size);
- ret = sdma_run_channel(&sdma->channel[0]); + ret = sdma_run_channel0(sdma);
- dma_free_coherent(NULL, size, buf_virt, buf_phys); + spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
-err_out: - mutex_unlock(&sdma->channel_0_lock); + dma_free_coherent(NULL, size, buf_virt, buf_phys);
return ret; } @@ -539,10 +546,6 @@ static void mxc_sdma_handle_channel(struct sdma_channel *sdmac) { complete(&sdmac->done);
- /* not interested in channel 0 interrupts */ - if (sdmac->channel == 0) - return; - if (sdmac->flags & IMX_DMA_SG_LOOP) sdma_handle_channel_loop(sdmac); else @@ -555,6 +558,8 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) unsigned long stat;
stat = readl_relaxed(sdma->regs + SDMA_H_INTR); + /* not interested in channel 0 interrupts */ + stat &= ~1; writel_relaxed(stat, sdma->regs + SDMA_H_INTR);
while (stat) { @@ -660,6 +665,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) struct sdma_context_data *context = sdma->context; struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd; int ret; + unsigned long flags;
if (sdmac->direction == DMA_DEV_TO_MEM) { load_address = sdmac->pc_from_device; @@ -677,7 +683,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]); dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]);
- mutex_lock(&sdma->channel_0_lock); + spin_lock_irqsave(&sdma->channel_0_lock, flags);
memset(context, 0, sizeof(*context)); context->channel_state.pc = load_address; @@ -696,10 +702,9 @@ static int sdma_load_context(struct sdma_channel *sdmac) bd0->mode.count = sizeof(*context) / 4; bd0->buffer_addr = sdma->context_phys; bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel; + ret = sdma_run_channel0(sdma);
- ret = sdma_run_channel(&sdma->channel[0]); - - mutex_unlock(&sdma->channel_0_lock); + spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
return ret; } @@ -1305,7 +1310,7 @@ static int __init sdma_probe(struct platform_device *pdev) if (!sdma) return -ENOMEM;
- mutex_init(&sdma->channel_0_lock); + spin_lock_init(&sdma->channel_0_lock);
sdma->dev = &pdev->dev;
On Wed, 2012-05-09 at 19:33 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Acked By: Vinod Koul vinod.koul@linux.intel.com
On Thu, May 10, 2012 at 09:23:58AM +0530, Vinod Koul wrote:
On Wed, 2012-05-09 at 19:33 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Acked By: Vinod Koul vinod.koul@linux.intel.com
Applied on imx/dt branch with Vinod's ack. Thanks.
On Thu, May 10, 2012 at 02:34:49PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 09:23:58AM +0530, Vinod Koul wrote:
On Wed, 2012-05-09 at 19:33 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Acked By: Vinod Koul vinod.koul@linux.intel.com
Applied on imx/dt branch with Vinod's ack. Thanks.
Hi Vinod,
Since Mark wouldn't like to have sound tree pulled into arm-soc to help a couple of patches in the series get merged in the coming window, I can not take the series as a whole to go with arm-soc. It makes less sense to have this patch go arm-soc then, so please take the patch.
On Thu, 2012-05-10 at 20:37 +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 02:34:49PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 09:23:58AM +0530, Vinod Koul wrote:
On Wed, 2012-05-09 at 19:33 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Acked By: Vinod Koul vinod.koul@linux.intel.com
Applied on imx/dt branch with Vinod's ack. Thanks.
Hi Vinod,
Since Mark wouldn't like to have sound tree pulled into arm-soc to help a couple of patches in the series get merged in the coming window, I can not take the series as a whole to go with arm-soc. It makes less sense to have this patch go arm-soc then, so please take the patch.
Sure, care to give an ACK before I apply.
On Fri, May 11, 2012 at 08:22:56AM +0530, Vinod Koul wrote:
Sure, care to give an ACK before I apply.
Acked-by: Shawn Guo shawn.guo@linaro.org
On Wed, 2012-05-09 at 19:33 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Can you pls rebase this against the slave-dma next and resend. It fails to apply for me.
drivers/dma/imx-sdma.c | 57 ++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index fddccae..4fd48eb 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -24,7 +24,7 @@ #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/clk.h> -#include <linux/wait.h> +#include <linux/delay.h> #include <linux/sched.h> #include <linux/semaphore.h> #include <linux/spinlock.h> @@ -324,7 +324,7 @@ struct sdma_engine { struct dma_device dma_device; struct clk *clk_ipg; struct clk *clk_ahb;
- struct mutex channel_0_lock;
- spinlock_t channel_0_lock; struct sdma_script_start_addrs *script_addrs;
};
@@ -402,19 +402,27 @@ static void sdma_enable_channel(struct sdma_engine *sdma, int channel) }
/*
- sdma_run_channel - run a channel and wait till it's done
*/
- sdma_run_channel0 - run a channel and wait till it's done
-static int sdma_run_channel(struct sdma_channel *sdmac) +static int sdma_run_channel0(struct sdma_engine *sdma) {
- struct sdma_engine *sdma = sdmac->sdma;
- int channel = sdmac->channel; int ret;
- unsigned long timeout = 500;
- init_completion(&sdmac->done);
- sdma_enable_channel(sdma, 0);
- sdma_enable_channel(sdma, channel);
- while (!(ret = readl_relaxed(sdma->regs + SDMA_H_INTR) & 1)) {
if (timeout-- <= 0)
break;
udelay(1);
- }
- ret = wait_for_completion_timeout(&sdmac->done, HZ);
if (ret) {
/* Clear the interrupt status */
writel_relaxed(ret, sdma->regs + SDMA_H_INTR);
} else {
dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");
}
return ret ? 0 : -ETIMEDOUT;
} @@ -426,17 +434,17 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, void *buf_virt; dma_addr_t buf_phys; int ret;
- mutex_lock(&sdma->channel_0_lock);
unsigned long flags;
buf_virt = dma_alloc_coherent(NULL, size, &buf_phys, GFP_KERNEL); if (!buf_virt) {
ret = -ENOMEM;
goto err_out;
return -ENOMEM;
}
spin_lock_irqsave(&sdma->channel_0_lock, flags);
bd0->mode.command = C0_SETPM; bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; bd0->mode.count = size / 2;
@@ -445,12 +453,11 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size,
memcpy(buf_virt, buf, size);
- ret = sdma_run_channel(&sdma->channel[0]);
- ret = sdma_run_channel0(sdma);
- dma_free_coherent(NULL, size, buf_virt, buf_phys);
- spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
-err_out:
- mutex_unlock(&sdma->channel_0_lock);
dma_free_coherent(NULL, size, buf_virt, buf_phys);
return ret;
} @@ -539,10 +546,6 @@ static void mxc_sdma_handle_channel(struct sdma_channel *sdmac) { complete(&sdmac->done);
- /* not interested in channel 0 interrupts */
- if (sdmac->channel == 0)
return;
- if (sdmac->flags & IMX_DMA_SG_LOOP) sdma_handle_channel_loop(sdmac); else
@@ -555,6 +558,8 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) unsigned long stat;
stat = readl_relaxed(sdma->regs + SDMA_H_INTR);
/* not interested in channel 0 interrupts */
stat &= ~1; writel_relaxed(stat, sdma->regs + SDMA_H_INTR);
while (stat) {
@@ -660,6 +665,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) struct sdma_context_data *context = sdma->context; struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd; int ret;
unsigned long flags;
if (sdmac->direction == DMA_DEV_TO_MEM) { load_address = sdmac->pc_from_device;
@@ -677,7 +683,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]); dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]);
- mutex_lock(&sdma->channel_0_lock);
spin_lock_irqsave(&sdma->channel_0_lock, flags);
memset(context, 0, sizeof(*context)); context->channel_state.pc = load_address;
@@ -696,10 +702,9 @@ static int sdma_load_context(struct sdma_channel *sdmac) bd0->mode.count = sizeof(*context) / 4; bd0->buffer_addr = sdma->context_phys; bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel;
- ret = sdma_run_channel0(sdma);
- ret = sdma_run_channel(&sdma->channel[0]);
- mutex_unlock(&sdma->channel_0_lock);
spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
return ret;
} @@ -1305,7 +1310,7 @@ static int __init sdma_probe(struct platform_device *pdev) if (!sdma) return -ENOMEM;
- mutex_init(&sdma->channel_0_lock);
spin_lock_init(&sdma->channel_0_lock);
sdma->dev = &pdev->dev;
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock. - Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- drivers/dma/imx-sdma.c | 57 ++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index d3e38e2..79aa749 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -24,7 +24,7 @@ #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/clk.h> -#include <linux/wait.h> +#include <linux/delay.h> #include <linux/sched.h> #include <linux/semaphore.h> #include <linux/spinlock.h> @@ -323,7 +323,7 @@ struct sdma_engine { dma_addr_t context_phys; struct dma_device dma_device; struct clk *clk; - struct mutex channel_0_lock; + spinlock_t channel_0_lock; struct sdma_script_start_addrs *script_addrs; };
@@ -401,19 +401,27 @@ static void sdma_enable_channel(struct sdma_engine *sdma, int channel) }
/* - * sdma_run_channel - run a channel and wait till it's done + * sdma_run_channel0 - run a channel and wait till it's done */ -static int sdma_run_channel(struct sdma_channel *sdmac) +static int sdma_run_channel0(struct sdma_engine *sdma) { - struct sdma_engine *sdma = sdmac->sdma; - int channel = sdmac->channel; int ret; + unsigned long timeout = 500;
- init_completion(&sdmac->done); + sdma_enable_channel(sdma, 0);
- sdma_enable_channel(sdma, channel); + while (!(ret = readl_relaxed(sdma->regs + SDMA_H_INTR) & 1)) { + if (timeout-- <= 0) + break; + udelay(1); + }
- ret = wait_for_completion_timeout(&sdmac->done, HZ); + if (ret) { + /* Clear the interrupt status */ + writel_relaxed(ret, sdma->regs + SDMA_H_INTR); + } else { + dev_err(sdma->dev, "Timeout waiting for CH0 ready\n"); + }
return ret ? 0 : -ETIMEDOUT; } @@ -425,17 +433,17 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, void *buf_virt; dma_addr_t buf_phys; int ret; - - mutex_lock(&sdma->channel_0_lock); + unsigned long flags;
buf_virt = dma_alloc_coherent(NULL, size, &buf_phys, GFP_KERNEL); if (!buf_virt) { - ret = -ENOMEM; - goto err_out; + return -ENOMEM; }
+ spin_lock_irqsave(&sdma->channel_0_lock, flags); + bd0->mode.command = C0_SETPM; bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; bd0->mode.count = size / 2; @@ -444,12 +452,11 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size,
memcpy(buf_virt, buf, size);
- ret = sdma_run_channel(&sdma->channel[0]); + ret = sdma_run_channel0(sdma);
- dma_free_coherent(NULL, size, buf_virt, buf_phys); + spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
-err_out: - mutex_unlock(&sdma->channel_0_lock); + dma_free_coherent(NULL, size, buf_virt, buf_phys);
return ret; } @@ -538,10 +545,6 @@ static void mxc_sdma_handle_channel(struct sdma_channel *sdmac) { complete(&sdmac->done);
- /* not interested in channel 0 interrupts */ - if (sdmac->channel == 0) - return; - if (sdmac->flags & IMX_DMA_SG_LOOP) sdma_handle_channel_loop(sdmac); else @@ -554,6 +557,8 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) unsigned long stat;
stat = readl_relaxed(sdma->regs + SDMA_H_INTR); + /* not interested in channel 0 interrupts */ + stat &= ~1; writel_relaxed(stat, sdma->regs + SDMA_H_INTR);
while (stat) { @@ -659,6 +664,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) struct sdma_context_data *context = sdma->context; struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd; int ret; + unsigned long flags;
if (sdmac->direction == DMA_DEV_TO_MEM) { load_address = sdmac->pc_from_device; @@ -676,7 +682,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]); dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]);
- mutex_lock(&sdma->channel_0_lock); + spin_lock_irqsave(&sdma->channel_0_lock, flags);
memset(context, 0, sizeof(*context)); context->channel_state.pc = load_address; @@ -695,10 +701,9 @@ static int sdma_load_context(struct sdma_channel *sdmac) bd0->mode.count = sizeof(*context) / 4; bd0->buffer_addr = sdma->context_phys; bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel; + ret = sdma_run_channel0(sdma);
- ret = sdma_run_channel(&sdma->channel[0]); - - mutex_unlock(&sdma->channel_0_lock); + spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
return ret; } @@ -1297,7 +1302,7 @@ static int __init sdma_probe(struct platform_device *pdev) if (!sdma) return -ENOMEM;
- mutex_init(&sdma->channel_0_lock); + spin_lock_init(&sdma->channel_0_lock);
sdma->dev = &pdev->dev;
On Fri, 2012-05-11 at 15:14 +0800, Richard Zhao wrote:
device_prep_dma_cyclic may be call in audio trigger function which is atomic context, so we make it atomic too.
- change channel0 lock to spinlock.
- Use polling to wait for channel0 finish running.
Signed-off-by: Richard Zhao richard.zhao@freescale.com
Thanks, Applied to slave-dma -next.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 2f631f2..85b7c6c 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -76,6 +76,8 @@ i2c@021a0000 { /* I2C1 */ status = "okay"; clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_1>;
codec: sgtl5000@0a { compatible = "fsl,sgtl5000"; diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 949f979..f95aa3c 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -486,6 +486,13 @@ reg = <0x020e0000 0x4000>;
/* shared pinctrl settings */ + i2c1 { + pinctrl_i2c1_1: i2c1grp-1 { + fsl,pins = <137 0x4001b8b1 /* MX6Q_PAD_EIM_D21__I2C1_SCL */ + 196 0x4001b8b1>; /* MX6Q_PAD_EIM_D28__I2C1_SDA */ + }; + }; + usdhc3 { pinctrl_usdhc3_1: usdhc3grp-1 { fsl,pins = <1273 0x17059 /* MX6Q_PAD_SD3_CMD__USDHC3_CMD */
On Wed, May 09, 2012 at 07:33:01PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng dong.aisheng@linaro.org
Regards Dong Aisheng
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- sound/soc/fsl/imx-audmux.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index f237003..0803274 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -26,6 +26,7 @@ #include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/pinctrl/consumer.h>
#include "imx-audmux.h"
@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); static int __devinit imx_audmux_probe(struct platform_device *pdev) { struct resource *res; + struct pinctrl *pinctrl; const struct of_device_id *of_id = of_match_device(imx_audmux_dt_ids, &pdev->dev);
@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev) if (!audmux_base) return -EADDRNOTAVAIL;
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) { + dev_err(&pdev->dev, "setup pinctrl failed!"); + return PTR_ERR(pinctrl); + } + audmux_clk = clk_get(&pdev->dev, "audmux"); if (IS_ERR(audmux_clk)) { dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
On Wed, May 09, 2012 at 07:33:02PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I guess this depends on some other tree and can't just be directly applied to ASoC?
On Wed, May 09, 2012 at 05:00:06PM +0100, Mark Brown wrote:
On Wed, May 09, 2012 at 07:33:02PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I guess this depends on some other tree and can't just be directly applied to ASoC?
It's based on your for-next. But for working, it depends on pinctl/for-next.
Thanks Richard
On Thu, May 10, 2012 at 08:35:33AM +0800, Richard Zhao wrote:
On Wed, May 09, 2012 at 05:00:06PM +0100, Mark Brown wrote:
On Wed, May 09, 2012 at 07:33:02PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I guess this depends on some other tree and can't just be directly applied to ASoC?
It's based on your for-next. But for working, it depends on pinctl/for-next.
Mark, may I have your ack to have it go through arm-soc? I will ask Arnd pull your sound/for-v3.5 branch into arm-soc as a dependency. You need to ensure the branch will not be rebased.
On Thu, May 10, 2012 at 02:39:06PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 08:35:33AM +0800, Richard Zhao wrote:
It's based on your for-next. But for working, it depends on pinctl/for-next.
Mark, may I have your ack to have it go through arm-soc? I will ask Arnd pull your sound/for-v3.5 branch into arm-soc as a dependency. You need to ensure the branch will not be rebased.
for-3.5 is the entire undifferentiated blob of ASoC stuff, it's not really suitable for merging elsewhere. It won't actually get rebased but the idea of merging it into other trees doesn't seem terribly clever, it'd make having topic branches in arm-soc a bit of a joke and if you pull it right now you'll get problems in -next due to the the ux500 stuff.
What does "working" mean in this context - what happens without the pinctl changes?
On Thu, May 10, 2012 at 09:44:04AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 02:39:06PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 08:35:33AM +0800, Richard Zhao wrote:
It's based on your for-next. But for working, it depends on pinctl/for-next.
Mark, may I have your ack to have it go through arm-soc? I will ask Arnd pull your sound/for-v3.5 branch into arm-soc as a dependency. You need to ensure the branch will not be rebased.
for-3.5 is the entire undifferentiated blob of ASoC stuff, it's not really suitable for merging elsewhere. It won't actually get rebased but the idea of merging it into other trees doesn't seem terribly clever, it'd make having topic branches in arm-soc a bit of a joke and if you pull it right now you'll get problems in -next due to the the ux500 stuff.
What does "working" mean in this context - what happens without the pinctl changes?
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
commit 6d4ca1fb467932773da7b808c52f3d7ef4461ba0 Author: Stephen Warren swarren@nvidia.com Date: Mon Apr 16 10:51:00 2012 -0600
pinctrl: implement devm_pinctrl_get()/put()
These functions allow the driver core to automatically clean up any allocations made by drivers, thus leading to simplified drivers.
Signed-off-by: Stephen Warren swarren@nvidia.com Signed-off-by: Linus Walleij linus.walleij@linaro.org
So it'll fail compile without pinctrl/for-next. I guess Linus may need to prepare a non-rebase base for others to merge.
Thanks Richard
On Thu, May 10, 2012 at 05:05:00PM +0800, Richard Zhao wrote:
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
Oh, dear. That's unfortunate, I guess it's not on a branch in pinctl which can be pulled separately (this is what I've been doing with things like regmap and regulator - creating new interfaces on easily mergeable branches)? Looking at it from the other perspective, what goes wrong if we defer this patch?
On Thu, May 10, 2012 at 10:27:34AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:05:00PM +0800, Richard Zhao wrote:
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
Oh, dear. That's unfortunate, I guess it's not on a branch in pinctl which can be pulled separately (this is what I've been doing with things like regmap and regulator - creating new interfaces on easily mergeable branches)? Looking at it from the other perspective, what goes wrong if we defer this patch?
I prefer to have a non-rebase pinctrl branch. We can not defer pinctrl patch for all drivers. pinctrl will be so widely used.
Hi Linus,
Could you comment?
Thanks Richard
On Thu, May 10, 2012 at 12:23 PM, Richard Zhao richard.zhao@freescale.com wrote:
On Thu, May 10, 2012 at 10:27:34AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:05:00PM +0800, Richard Zhao wrote:
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
Oh, dear. That's unfortunate, I guess it's not on a branch in pinctl which can be pulled separately (...)
I prefer to have a non-rebase pinctrl branch. We can not defer pinctrl patch for all drivers. pinctrl will be so widely used.
Hi Linus,
Could you comment?
You're lucky because a few ARM SoC:s wanted a stable tag to use for pinctrl merges.
Ref: git://git.linaro.org/people/triad/linux-pinctrl.git
The tag pinctrl-mergebase-20120418 contains the devm and other changes, Stephen is already using that for Tegra stuff and it's solid as a rock. Newer patches are put on top of this and since pinctrl has no deps in any directions it will be requested for pull as soon as the merge window opens.
Yours, Linus Walleij
On Thu, May 10, 2012 at 02:26:31PM +0200, Linus Walleij wrote:
On Thu, May 10, 2012 at 12:23 PM, Richard Zhao richard.zhao@freescale.com wrote:
On Thu, May 10, 2012 at 10:27:34AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:05:00PM +0800, Richard Zhao wrote:
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
Oh, dear. That's unfortunate, I guess it's not on a branch in pinctl which can be pulled separately (...)
I prefer to have a non-rebase pinctrl branch. We can not defer pinctrl patch for all drivers. pinctrl will be so widely used.
Hi Linus,
Could you comment?
You're lucky because a few ARM SoC:s wanted a stable tag to use for pinctrl merges.
Ref: git://git.linaro.org/people/triad/linux-pinctrl.git
The tag pinctrl-mergebase-20120418
I only find the tag at your kernel.org git tree. Linaro switched git server again? strange.
Mark,
Are you ok with that?
Thanks Richard
contains the devm and other changes, Stephen is already using that for Tegra stuff and it's solid as a rock. Newer patches are put on top of this and since pinctrl has no deps in any directions it will be requested for pull as soon as the merge window opens.
Yours, Linus Walleij
On Thu, May 10, 2012 at 3:41 PM, Richard Zhao richard.zhao@freescale.com wrote:
Ref: git://git.linaro.org/people/triad/linux-pinctrl.git
The tag pinctrl-mergebase-20120418
I only find the tag at your kernel.org git tree. Linaro switched git server again? strange.
No it's me who is strange. I meant to link the kernel.org server but my browser cache wanted something else.
This is the actual tag. http://git.kernel.org/?p=linux/kernel/git/linusw/linux-pinctrl.git;a=commit;...
Yours, Linus Walleij
On Thu, May 10, 2012 at 02:26:31PM +0200, Linus Walleij wrote:
The tag pinctrl-mergebase-20120418 contains the devm and other changes, Stephen is already using that for Tegra stuff and it's solid as a rock. Newer patches are put on top of this and since pinctrl has no deps in any directions it will be requested for pull as soon as the merge window opens.
Hi Linus,
pinctrl-mergebase-20120418 is not enough for me. I need mxs and dummy states support. So if your devel branch will never be rebased, we can simply ask Arnd and Olof to get that as the dependent branch?
On Fri, May 11, 2012 at 7:32 AM, Shawn Guo shawn.guo@linaro.org wrote:
pinctrl-mergebase-20120418 is not enough for me. I need mxs and dummy states support. So if your devel branch will never be rebased, we can simply ask Arnd and Olof to get that as the dependent branch?
Hm, yes the devel branch is getting real stable now, so I will only add things on top.
Basically the for-next branch is supposed to be even more stable, but right now it's a copy of devel.
ARM SoC guys: how do you want the pinctrl deps? I can make a tag today if that is preferred.
Also: short-cut to another subject: how have you other guys managed this? By e.g.:
git fetch <pinctrl tree>
git checkout -b my-pinwork v3.4-rc4 git merge pinctrl-tag (develop develop)
Or:
git checkout -b my-pinwork pinctrl-tag
?
I was a bit uncertain on how to do this for the pending Ux500 stuff so better ask. I merged it for now but maybe it's better if I just base the whole pullrequest on top of a stable pinctrl branch?
Yours, Linus Walleij
On Friday 11 May 2012, Linus Walleij wrote:
On Fri, May 11, 2012 at 7:32 AM, Shawn Guo shawn.guo@linaro.org wrote:
pinctrl-mergebase-20120418 is not enough for me. I need mxs and dummy states support. So if your devel branch will never be rebased, we can simply ask Arnd and Olof to get that as the dependent branch?
Hm, yes the devel branch is getting real stable now, so I will only add things on top.
Basically the for-next branch is supposed to be even more stable, but right now it's a copy of devel.
ARM SoC guys: how do you want the pinctrl deps? I can make a tag today if that is preferred.
No need for a signed tag, since we're not going to submit you changes upstream. Knowing that we can pull in the for-next branch is good enough, so we'll do that for anything that needs it.
Also: short-cut to another subject: how have you other guys managed this? By e.g.:
git fetch <pinctrl tree>
git checkout -b my-pinwork v3.4-rc4 git merge pinctrl-tag (develop develop)
Or:
git checkout -b my-pinwork pinctrl-tag
?
I was a bit uncertain on how to do this for the pending Ux500 stuff so better ask. I merged it for now but maybe it's better if I just base the whole pullrequest on top of a stable pinctrl branch?
No strong preference on my side. I've seen both ways getting done. In arm-soc we try to do a 'git pull --log --no-ff' for all changes that are being pulled into one of the main next/* branches, just like torvalds does when he pulls in branches from maintainers.
Arnd
On 05/10/2012 03:05 AM, Richard Zhao wrote:
On Thu, May 10, 2012 at 09:44:04AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 02:39:06PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 08:35:33AM +0800, Richard Zhao wrote:
It's based on your for-next. But for working, it depends on pinctl/for-next.
Mark, may I have your ack to have it go through arm-soc? I will ask Arnd pull your sound/for-v3.5 branch into arm-soc as a dependency. You need to ensure the branch will not be rebased.
for-3.5 is the entire undifferentiated blob of ASoC stuff, it's not really suitable for merging elsewhere. It won't actually get rebased but the idea of merging it into other trees doesn't seem terribly clever, it'd make having topic branches in arm-soc a bit of a joke and if you pull it right now you'll get problems in -next due to the the ux500 stuff.
What does "working" mean in this context - what happens without the pinctl changes?
devm_pinctrl_get_select_default function is added in below commit which is in pinctrl/for-next.
commit 6d4ca1fb467932773da7b808c52f3d7ef4461ba0 Author: Stephen Warren swarren@nvidia.com Date: Mon Apr 16 10:51:00 2012 -0600
pinctrl: implement devm_pinctrl_get()/put() These functions allow the driver core to automatically clean up any allocations made by drivers, thus leading to simplified drivers. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
So it'll fail compile without pinctrl/for-next. I guess Linus may need to prepare a non-rebase base for others to merge.
(CCing Linus)
There is one already.
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git tag pinctrl-mergebase-20120418 The commit is in for-next and devel branches, but not the tip of those.
On Thu, May 10, 2012 at 09:44:04AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 02:39:06PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 08:35:33AM +0800, Richard Zhao wrote:
It's based on your for-next. But for working, it depends on pinctl/for-next.
Mark, may I have your ack to have it go through arm-soc? I will ask Arnd pull your sound/for-v3.5 branch into arm-soc as a dependency. You need to ensure the branch will not be rebased.
for-3.5 is the entire undifferentiated blob of ASoC stuff, it's not really suitable for merging elsewhere. It won't actually get rebased but the idea of merging it into other trees doesn't seem terribly clever, it'd make having topic branches in arm-soc a bit of a joke and if you pull it right now you'll get problems in -next due to the the ux500 stuff.
Pulling it into arm-soc as a dependency only means we will have it as a base for other branches that depend on. It does not change anything about how the branch flows to Linus. Arnd will only send those arm-soc branches that depend on sound/for-3.5 after it gets merged by Linus.
What does "working" mean in this context - what happens without the pinctl changes?
It will break all the imx-audmux users that haven't got any pinctrl states defined for imx-audmux. We have patches on imx (arm-soc) tree defining pinctrl states either in DT or dummy states in board files to make sure pinctrl API works fine for every imx-audmux users.
On Thu, May 10, 2012 at 05:07:18PM +0800, Shawn Guo wrote:
Pulling it into arm-soc as a dependency only means we will have it as a base for other branches that depend on. It does not change anything about how the branch flows to Linus. Arnd will only send those arm-soc branches that depend on sound/for-3.5 after it gets merged by Linus.
I don't see what difference that really makes to anything... exactly who sends pull requests to Linus is pretty immaterial, really.
On Thu, May 10, 2012 at 10:25:36AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:07:18PM +0800, Shawn Guo wrote:
Pulling it into arm-soc as a dependency only means we will have it as a base for other branches that depend on. It does not change anything about how the branch flows to Linus. Arnd will only send those arm-soc branches that depend on sound/for-3.5 after it gets merged by Linus.
I don't see what difference that really makes to anything... exactly who sends pull requests to Linus is pretty immaterial, really.
Ok, since you do mind having sound branch pulled into arm-soc to help this patch go through arm-soc in the coming merge window, let's wait for the next.
On Thu, May 10, 2012 at 11:07 AM, Shawn Guo shawn.guo@linaro.org wrote:
Pulling it into arm-soc as a dependency only means we will have it as a base for other branches that depend on. It does not change anything about how the branch flows to Linus. Arnd will only send those arm-soc branches that depend on sound/for-3.5 after it gets merged by Linus.
Oh... um... subject is about pinctrl ... but ... no.. Aha, he mean Torvalds! :-)
return -ELINWAL;
On Wed, May 09, 2012 at 07:33:02PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
sound/soc/fsl/imx-audmux.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng dong.aisheng@linaro.org
I guess you may want it to go through arm-soc tree which already has a patch asking pinctrl to provide dummies or it may break the drivers.
Regards Dong Aisheng
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index f237003..0803274 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -26,6 +26,7 @@ #include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/pinctrl/consumer.h>
#include "imx-audmux.h"
@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); static int __devinit imx_audmux_probe(struct platform_device *pdev) { struct resource *res;
- struct pinctrl *pinctrl; const struct of_device_id *of_id = of_match_device(imx_audmux_dt_ids, &pdev->dev);
@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev) if (!audmux_base) return -EADDRNOTAVAIL;
- pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
- if (IS_ERR(pinctrl)) {
dev_err(&pdev->dev, "setup pinctrl failed!");
return PTR_ERR(pinctrl);
- }
- audmux_clk = clk_get(&pdev->dev, "audmux"); if (IS_ERR(audmux_clk)) { dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
-- 1.7.5.4
linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 9 +++++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 85b7c6c..5b51deb 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -67,6 +67,8 @@
audmux@021d8000 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux_1>; };
uart2: serial@021e8000 { diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index f95aa3c..5795b93 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -486,6 +486,15 @@ reg = <0x020e0000 0x4000>;
/* shared pinctrl settings */ + audmux { + pinctrl_audmux_1: audmux-1 { + fsl,pins = <18 0x80000000 /* MX6Q_PAD_SD2_DAT0__AUDMUX_AUD4_RXD */ + 1586 0x80000000 /* MX6Q_PAD_SD2_DAT3__AUDMUX_AUD4_TXC */ + 11 0x80000000 /* MX6Q_PAD_SD2_DAT2__AUDMUX_AUD4_TXD */ + 3 0x80000000>; /* MX6Q_PAD_SD2_DAT1__AUDMUX_AUD4_TXFS */ + }; + }; + i2c1 { pinctrl_i2c1_1: i2c1grp-1 { fsl,pins = <137 0x4001b8b1 /* MX6Q_PAD_EIM_D21__I2C1_SCL */
On Wed, May 09, 2012 at 07:33:03PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 9 +++++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng dong.aisheng@linaro.org
Regards Dong Aisheng
It's used by audio drivers.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/mach-imx/clk-imx6q.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index f40a35d..92550c5 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -155,7 +155,8 @@ enum mx6q_clks { gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, - pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, clk_max + pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, + ssi2_ipg, ssi3_ipg, clk_max };
static struct clk *clk[clk_max]; @@ -367,9 +368,9 @@ int __init mx6q_clocks_init(void) clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); - clk[ssi1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18); - clk[ssi2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20); - clk[ssi3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22); + clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); + clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); + clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); clk[uart_ipg] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); clk[uart_serial] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); clk[usboh3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); @@ -418,6 +419,7 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[sdma], NULL, "20ec000.sdma"); clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); + clk_register_clkdev(clk[ssi1_ipg], NULL, "2028000.ssi");
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { c = clk_get_sys(clks_init_on[i], NULL);
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- sound/soc/fsl/fsl_ssi.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 4ed2afd..b10a427 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -725,7 +725,7 @@ static int __devinit fsl_ssi_probe(struct platform_device *pdev) u32 dma_events[2]; ssi_private->ssi_on_imx = true;
- ssi_private->clk = clk_get(&pdev->dev, NULL); + ssi_private->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ssi_private->clk)) { ret = PTR_ERR(ssi_private->clk); dev_err(&pdev->dev, "could not get clock: %d\n", ret); @@ -842,10 +842,8 @@ error_dev: device_remove_file(&pdev->dev, dev_attr);
error_clk: - if (ssi_private->ssi_on_imx) { + if (ssi_private->ssi_on_imx) clk_disable_unprepare(ssi_private->clk); - clk_put(ssi_private->clk); - }
error_irq: free_irq(ssi_private->irq, ssi_private); @@ -871,7 +869,6 @@ static int fsl_ssi_remove(struct platform_device *pdev) if (ssi_private->ssi_on_imx) { platform_device_unregister(ssi_private->imx_pcm_pdev); clk_disable_unprepare(ssi_private->clk); - clk_put(ssi_private->clk); } snd_soc_unregister_dai(&pdev->dev); device_remove_file(&pdev->dev, &ssi_private->dev_attr);
On Wed, May 09, 2012 at 07:33:05PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I'll apply this when devm_clk_get() makes it into mainline (hopefully in the merge window); please remind me if I forget.
On 9 May 2012 19:50, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Wed, May 09, 2012 at 07:33:05PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I'll apply this when devm_clk_get() makes it into mainline (hopefully in the merge window); please remind me if I forget.
We will have rmk's clkdev branch appear on arm-soc as dependency anyway. Can we have this series go over arm-soc tree, since we will have all the dependencies on clk and pinctrl meet and conflicts solved there?
Regards, Shawn
On Wed, May 09, 2012 at 07:59:20PM +0800, Shawn Guo wrote:
On 9 May 2012 19:50, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
I'll apply this when devm_clk_get() makes it into mainline (hopefully in the merge window); please remind me if I forget.
We will have rmk's clkdev branch appear on arm-soc as dependency anyway. Can we have this series go over arm-soc tree, since we will have all the dependencies on clk and pinctrl meet and conflicts solved there?
This change is totally unrelated to the rest of the series, it's just a random cleanup to the driver - it really shouldn't have been part of the series at all.
On 9 May 2012 19:59, Shawn Guo shawn.guo@linaro.org wrote:
On 9 May 2012 19:50, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Wed, May 09, 2012 at 07:33:05PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
I'll apply this when devm_clk_get() makes it into mainline (hopefully in the merge window); please remind me if I forget.
We will have rmk's clkdev branch appear on arm-soc as dependency anyway. Can we have this series go over arm-soc tree, since we will have all the dependencies on clk and pinctrl meet and conflicts solved there?
Ah, I just realized that the prerequisite patches on fsl_ssi.c have already applied on sound tree, so yes, we have to wait for the next merge window then.
Regards, Shawn
Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
It's a simple change that only affects i.MX, so ...
Acked-by: Timur Tabi timur@freescale.com
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/mach-imx/clk-imx6q.c | 3 +++ arch/arm/mach-imx/mach-imx6q.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 92550c5..096fcfb 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -420,6 +420,9 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); clk_register_clkdev(clk[ssi1_ipg], NULL, "2028000.ssi"); + clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL); + clk_register_clkdev(clk[ahb], "ahb", NULL); + clk_register_clkdev(clk[cko1], "cko1", NULL);
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { c = clk_get_sys(clks_init_on[i], NULL); diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 74e44d3..494c365 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -10,6 +10,8 @@ * http://www.gnu.org/copyleft/gpl.html */
+#include <linux/clk.h> +#include <linux/clkdev.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/io.h> @@ -76,10 +78,36 @@ static int ksz9021rn_phy_fixup(struct phy_device *phydev) return 0; }
+static void __init imx6q_sabrelite_cko1_setup(void) +{ + struct clk *cko1_sel, *ahb, *cko1; + unsigned long rate; + + cko1_sel = clk_get_sys(NULL, "cko1_sel"); + ahb = clk_get_sys(NULL, "ahb"); + cko1 = clk_get_sys(NULL, "cko1"); + if (IS_ERR(cko1_sel) || IS_ERR(ahb) || IS_ERR(cko1)) { + pr_err("cko1 setup failed!\n"); + goto put_clk; + } + clk_set_parent(cko1_sel, ahb); + rate = clk_round_rate(cko1, 16000000); + clk_set_rate(cko1, rate); + clk_register_clkdev(cko1, NULL, "0-000a"); +put_clk: + if (!IS_ERR(cko1_sel)) + clk_put(cko1_sel); + if (!IS_ERR(ahb)) + clk_put(ahb); + if (!IS_ERR(cko1)) + clk_put(cko1); +} + static void __init imx6q_sabrelite_init(void) { phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, ksz9021rn_phy_fixup); + imx6q_sabrelite_cko1_setup(); }
static void __init imx6q_init_machine(void)
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 5b51deb..5a35bfd 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -110,4 +110,18 @@ regulator-always-on; }; }; + + sound { + compatible = "fsl,imx6q-sabrelite-sgtl5000", + "fsl,imx-audio-sgtl5000"; + model = "imx6q-sabrelite-sgtl5000"; + ssi-controller = <&ssi1>; + audio-codec = <&codec>; + audio-routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "Headphone Jack", "HP_OUT"; + mux-int-port = <1>; + mux-ext-port = <4>; + }; };
On Wed, May 09, 2012 at 07:33:07PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/boot/dts/imx6q-sabrelite.dts | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 5b51deb..5a35bfd 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -110,4 +110,18 @@ regulator-always-on; }; };
- sound {
compatible = "fsl,imx6q-sabrelite-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx6q-sabrelite-sgtl5000";
ssi-controller = <&ssi1>;
audio-codec = <&codec>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Mic Bias" is a SUPPLY for both "MIC_IN" and "Mic Jack", so it should look like:
"Mic Jack", "Mic Bias", "MIC_IN", "Mic Bias",
Regards, Shawn
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <4>;
- };
};
1.7.5.4
On Thu, May 10, 2012 at 02:48:19PM +0800, Shawn Guo wrote:
On Wed, May 09, 2012 at 07:33:07PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/boot/dts/imx6q-sabrelite.dts | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 5b51deb..5a35bfd 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -110,4 +110,18 @@ regulator-always-on; }; };
- sound {
compatible = "fsl,imx6q-sabrelite-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx6q-sabrelite-sgtl5000";
ssi-controller = <&ssi1>;
audio-codec = <&codec>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Mic Bias" is a SUPPLY for both "MIC_IN" and "Mic Jack", so it should look like:
"Mic Jack", "Mic Bias", "MIC_IN", "Mic Bias",
Not really. The circuit: MIC_IN <-- capacitor <--> Mic Jack / Mic Bias /
DC can not pass the capacitor. So Mic Bias only supply Jack.
Thanks Richard
Regards, Shawn
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <4>;
- };
};
1.7.5.4
On Thu, May 10, 2012 at 05:34:45PM +0800, Richard Zhao wrote:
"Mic Bias" is a SUPPLY for both "MIC_IN" and "Mic Jack", so it should look like:
"Mic Jack", "Mic Bias", "MIC_IN", "Mic Bias",
Not really. The circuit: MIC_IN <-- capacitor <--> Mic Jack / Mic Bias /
The "Mic Bias" here is really a SGTL5000 internal supply.
Regards, Shawn
DC can not pass the capacitor. So Mic Bias only supply Jack.
On Thu, May 10, 2012 at 05:41:15PM +0800, Shawn Guo wrote:
The "Mic Bias" here is really a SGTL5000 internal supply.
If it is then what's providing the bias to the mic? It's common for chips to have a micbias supply which comes out of the chip and is used by mics, this is my understanding of what this circuit is.
On Thu, May 10, 2012 at 10:45:08AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:41:15PM +0800, Shawn Guo wrote:
The "Mic Bias" here is really a SGTL5000 internal supply.
If it is then what's providing the bias to the mic? It's common for chips to have a micbias supply which comes out of the chip and is used by mics, this is my understanding of what this circuit is.
+1
On Thu, May 10, 2012 at 10:45:08AM +0100, Mark Brown wrote:
On Thu, May 10, 2012 at 05:41:15PM +0800, Shawn Guo wrote:
The "Mic Bias" here is really a SGTL5000 internal supply.
If it is then what's providing the bias to the mic? It's common for chips to have a micbias supply which comes out of the chip and is used by mics, this is my understanding of what this circuit is.
I did not make myself clear, but you made :) Yes, this is exactly the thing on my mind, and the circuit will look like:
STGTL5000 BOARD | MIC_IN ---+--- JACK ^ | ^ | | | | | | MIC_BAIS----+-----/ |
Isn't you helped me create this understanding? [1]
Regards, Shawn
On Thu, May 10, 2012 at 07:49:58PM +0800, Shawn Guo wrote:
I did not make myself clear, but you made :) Yes, this is exactly the thing on my mind, and the circuit will look like:
It seems I was just misled by the impression that we should have a route of MIC_IN <-- Mic Bais. I just checked through the SGTL5000 data sheet and it does not really mention about this.
Richard,
Will test your route setting and then apply the patch if everything goes fine.
On Thu, May 10, 2012 at 05:41:15PM +0800, Shawn Guo wrote:
On Thu, May 10, 2012 at 05:34:45PM +0800, Richard Zhao wrote:
"Mic Bias" is a SUPPLY for both "MIC_IN" and "Mic Jack", so it should look like:
"Mic Jack", "Mic Bias", "MIC_IN", "Mic Bias",
Not really. The circuit: MIC_IN <-- capacitor <--> Mic Jack / Mic Bias /
The "Mic Bias" here is really a SGTL5000 internal supply.
Look SGTL5000 datasheet for "MIC_BIAS".
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 5a35bfd..e0ec929 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -73,6 +73,8 @@
uart2: serial@021e8000 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_serial2_1>; };
i2c@021a0000 { /* I2C1 */ diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 5795b93..31c3d5f 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -502,6 +502,13 @@ }; };
+ serial2 { + pinctrl_serial2_1: serial2grp-1 { + fsl,pins = <183 0x1b0b1 /* MX6Q_PAD_EIM_D26__UART2_TXD */ + 191 0x1b0b1>; /* MX6Q_PAD_EIM_D27__UART2_RXD */ + }; + }; + usdhc3 { pinctrl_usdhc3_1: usdhc3grp-1 { fsl,pins = <1273 0x17059 /* MX6Q_PAD_SD3_CMD__USDHC3_CMD */
On Wed, May 09, 2012 at 07:33:08PM +0800, Richard Zhao wrote:
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/boot/dts/imx6q-sabrelite.dts | 2 ++ arch/arm/boot/dts/imx6q.dtsi | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
Acked-by: Dong Aisheng dong.aisheng@linaro.org
Regards Dong Aisheng
It's because the dts changed the node name.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/mach-imx/clk-imx6q.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 096fcfb..4ac1282 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -393,16 +393,16 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); clk_register_clkdev(clk[twd], NULL, "smp_twd"); clk_register_clkdev(clk[usboh3], NULL, "usboh3"); - clk_register_clkdev(clk[uart_serial], "per", "2020000.uart"); - clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.uart"); - clk_register_clkdev(clk[uart_serial], "per", "21e8000.uart"); - clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.uart"); - clk_register_clkdev(clk[uart_serial], "per", "21ec000.uart"); - clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.uart"); - clk_register_clkdev(clk[uart_serial], "per", "21f0000.uart"); - clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.uart"); - clk_register_clkdev(clk[uart_serial], "per", "21f4000.uart"); - clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.uart"); + clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); + clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); + clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); + clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.serial"); + clk_register_clkdev(clk[uart_serial], "per", "21ec000.serial"); + clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.serial"); + clk_register_clkdev(clk[uart_serial], "per", "21f0000.serial"); + clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial"); + clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial"); + clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial"); clk_register_clkdev(clk[enet], NULL, "2188000.enet"); clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc"); clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc");
On Wed, May 09, 2012 at 07:33:09PM +0800, Richard Zhao wrote:
It's because the dts changed the node name.
Dirk had sent the same patch, but I told him that I will rebase my DT branch on top Sascha's clk, the issue will be solved by the rebasing, so I'm not taking the last two patches.
Regards, Shawn
Signed-off-by: Richard Zhao richard.zhao@freescale.com
arch/arm/mach-imx/clk-imx6q.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 096fcfb..4ac1282 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -393,16 +393,16 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); clk_register_clkdev(clk[twd], NULL, "smp_twd"); clk_register_clkdev(clk[usboh3], NULL, "usboh3");
- clk_register_clkdev(clk[uart_serial], "per", "2020000.uart");
- clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.uart");
- clk_register_clkdev(clk[uart_serial], "per", "21e8000.uart");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.uart");
- clk_register_clkdev(clk[uart_serial], "per", "21ec000.uart");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.uart");
- clk_register_clkdev(clk[uart_serial], "per", "21f0000.uart");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.uart");
- clk_register_clkdev(clk[uart_serial], "per", "21f4000.uart");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.uart");
- clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
- clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
- clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.serial");
- clk_register_clkdev(clk[uart_serial], "per", "21ec000.serial");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.serial");
- clk_register_clkdev(clk[uart_serial], "per", "21f0000.serial");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial");
- clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial");
- clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial"); clk_register_clkdev(clk[enet], NULL, "2188000.enet"); clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc"); clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc");
-- 1.7.5.4
It's because the dts changed the node name.
Signed-off-by: Richard Zhao richard.zhao@freescale.com --- arch/arm/mach-imx/clk-imx6q.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 4ac1282..cab02d0 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -403,7 +403,7 @@ int __init mx6q_clocks_init(void) clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial"); clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial"); clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial"); - clk_register_clkdev(clk[enet], NULL, "2188000.enet"); + clk_register_clkdev(clk[enet], NULL, "2188000.ethernet"); clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc"); clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc"); clk_register_clkdev(clk[usdhc3], NULL, "2198000.usdhc");
On Wed, May 09, 2012 at 07:32:59PM +0800, Richard Zhao wrote:
ARM: dts: imx6q-sabrelite: add i2c1 pinctrl support ARM: dts: imx6q-sabrelite: add audmux pinctrl support ARM: imx6q: add ssi1_ipg clk_lookup ARM: imx6q_sabrelite: clk_register_clkdev cko1 for sgtl5000 ARM: dts: imx6q-sabrelite: add sound device imx6q-sabrelite-sgtl5000 ARM: dts: imx6q-sabrelite: add serial2 pinctrl support
I picked up above 6 patches. Thanks.
Hi Mark,
ASoC: imx-audmux: add pinctrl support ASoC: fsl_ssi: convert to use devm_clk_get
Linus has sent out pull request for pinctrl. So is that ok for you to pick up the above two patch?
Thanks Richard
On Mon, May 21, 2012 at 08:59:31PM +0800, Richard Zhao wrote:
ASoC: imx-audmux: add pinctrl support ASoC: fsl_ssi: convert to use devm_clk_get
Linus has sent out pull request for pinctrl. So is that ok for you to pick up the above two patch?
No, apart from anything else the second patch depends on clkdev which is nothing to do with pinctrl! For the first patch it wasn't clear if the changes in pinctrl were the actual dependencies or if there were more things needed from the ARM tree, and in any case until those patches are actually in the ASoC tree we'll break the build if they get applied.
Guys, you really need to think about how you're organising what you're doing more. You need to split your work out into focused lines of development rather than just having a single branch.
This patch series contains a whole bunch of different changes (the devm_clk_get() change is as far as I can tell completely unrelated to the rest for example) with unclear dependencies on multiple external trees. You should be splitting unrelated changes out, trying to minimise interdependencies, and clearly identifying the dependencies that are there we can get things applied in a timely fashion.
Please resend these patches *after* their dependencies are in mainline.
On Mon, May 21, 2012 at 03:45:44PM +0100, Mark Brown wrote:
On Mon, May 21, 2012 at 08:59:31PM +0800, Richard Zhao wrote:
ASoC: imx-audmux: add pinctrl support ASoC: fsl_ssi: convert to use devm_clk_get
Linus has sent out pull request for pinctrl. So is that ok for you to pick up the above two patch?
No, apart from anything else the second patch depends on clkdev which is nothing to do with pinctrl!
All right, It's my fault to mix a clean up patch. It may hold until the merge window is closed.
For the first patch it wasn't clear if the changes in pinctrl were the actual dependencies or if there were more things needed from the ARM tree,
I remembered someone already explained the dependencies. It depends on imx pinctrl work and dummy pinctrl enabled in ARM platform code. It is why Shawn suggest it goes to ARM SoC.
and in any case until those patches are actually in the ASoC tree we'll break the build if they get applied.
All righ, It's ok, if you think, I have to wait for one more cycle to see the patch on mainline.
Guys, you really need to think about how you're organising what you're doing more. You need to split your work out into focused lines of development rather than just having a single branch.
Except the clean up patch, others are all related to enable audio. Do you mean I supposed to split them in advance?
This patch series contains a whole bunch of different changes (the devm_clk_get() change is as far as I can tell completely unrelated to the rest for example) with unclear dependencies on multiple external trees. You should be splitting unrelated changes out, trying to minimise interdependencies, and clearly identifying the dependencies that are there we can get things applied in a timely fashion.
hmm.. I should write more about dependencies in commit message.
Please resend these patches *after* their dependencies are in mainline.
OK.
Thanks Richard
On Tue, May 22, 2012 at 09:39:21AM +0800, Richard Zhao wrote:
On Mon, May 21, 2012 at 03:45:44PM +0100, Mark Brown wrote:
For the first patch it wasn't clear if the changes in pinctrl were the actual dependencies or if there were more things needed from the ARM tree,
I remembered someone already explained the dependencies. It depends on imx pinctrl work and dummy pinctrl enabled in ARM platform code. It is why Shawn suggest it goes to ARM SoC.
There was mention of some changes but only a vauge description of them, I've no idea where they are or anything, initially people had mentioned an already cross-merged point in Linus' tree but apparently that wasn't sufficient due to these arch specific bits and I don't know where those are.
We should really have got this resolved in -next...
Guys, you really need to think about how you're organising what you're doing more. You need to split your work out into focused lines of development rather than just having a single branch.
Except the clean up patch, others are all related to enable audio. Do you mean I supposed to split them in advance?
Well, a lot of the time there's no actual dependency (eg, you add a driver and add registration of that device so there's no need for them to go in together since both are perfectly fine without the other) then it is best to merge things separately. If there are dependencies then that needs to be handled differently but it needs communication and ideally the dependencies would be on focused things that can just be pulled in.
In the case of things like the devm_clk_get() cleanup if there's any complexity at all then it's usually best just to punt for a release.
participants (10)
-
Arnd Bergmann
-
Dong Aisheng
-
Linus Walleij
-
Mark Brown
-
Richard Zhao
-
Shawn Guo
-
Shawn Guo
-
Stephen Warren
-
Timur Tabi
-
Vinod Koul