[PATCH V3 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare

2011-11-11 Thread Richard Zhao
Signed-off-by: Richard Zhao --- include/linux/clk.h | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 7213b52..a7dc00d 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -107,6 +107,26 @@ static

[PATCH V3 03/14] ARM: mxc: ahci: add clk_prepare/clk_unprepare

2011-11-11 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c index d8a56ae..ade4a1c 100644 --- a

[PATCH V3 02/14] ARM: mxc: time: add clk_prepare/clk_unprepare

2011-11-11 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/time.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 4b0fe28..b4e8b18 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c @@ -292,7 +292,7

[PATCH V3 00/14] add clk_prepare/clk_unprepare to imx drivers

2011-11-11 Thread Richard Zhao
Changes since V2: - fix clk_prepare_enable bug Changes since V1: - Add common helper functions clk_prepare_enable/clk_disable_unprepare - serial/imx: move clk_disable_unprepare before clk_put Richard Zhao (14): clk: add helper functions clk_prepare_enable and clk_disable_unprepare

Re: [PATCH V2 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare

2011-11-11 Thread Richard Zhao
On Fri, Nov 11, 2011 at 09:49:50AM +0100, Sascha Hauer wrote: > On Fri, Nov 11, 2011 at 09:10:16AM +0800, Richard Zhao wrote: > > Signed-off-by: Richard Zhao > > --- > > include/linux/clk.h | 19 +++ > > 1 files changed, 19 insertions(+), 0 deletio

[PATCH V2 14/14] mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- drivers/mmc/host/sdhci-esdhc-imx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index ae57769..f1ae37e 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b

[PATCH V2 13/14] i2c: imx: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 58832e5..8d1ab6f 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c

[PATCH V2 08/14] ARM: pm-imx5: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-mx5/pm-imx5.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c index 98052fc..2bdc85f 100644 --- a/arch/arm/mach-mx5/pm-imx5.c +++ b/arch/arm/mach-mx5/pm-imx5.c

[PATCH V2 04/14] ARM: mxc: pwm: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/pwm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 42d74ea..68c7199b 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c @@ -118,7 +118,7 @@ int

[PATCH V2 09/14] ARM: mx31moboard: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/mach-mx31moboard.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 07034f4..d1a9337 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c

[PATCH V2 03/14] ARM: mxc: ahci: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c index d8a56ae..ade4a1c 100644 --- a

[PATCH V2 00/14] add clk_prepare/clk_unprepare to imx drivers

2011-11-10 Thread Richard Zhao
Changes from V1: - Add common helper functions clk_prepare_enable/clk_disable_unprepare - serial/imx: move clk_disable_unprepare before clk_put Thanks Richard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More major

[PATCH V2 11/14] serial: imx: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- drivers/tty/serial/imx.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 163fc90..8f3709f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1390,7

[PATCH V2 07/14] ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/audmux-v2.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index 8cced35..0e51fc3 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc

[PATCH V2 12/14] net: fec: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- drivers/net/ethernet/freescale/fec.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index 1124ce0..e96fa44 100644 --- a/drivers/net/ethernet/freescale

[PATCH V2 10/14] ARM: mxs: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-mxs/system.c |2 +- arch/arm/mach-mxs/timer.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c index 20ec3bd..9760a12 100644 --- a/arch/arm/mach-mxs/system.c +++ b

[PATCH V2 06/14] ARM: mxc: arch_reset: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/system.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index 9dad8dc..a667adc 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c @@ -54,7

[PATCH V2 05/14] ARM: mxc: epit: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/epit.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c index d3467f8..9129c9e 100644 --- a/arch/arm/plat-mxc/epit.c +++ b/arch/arm/plat-mxc/epit.c @@ -203,7 +203,7

[PATCH V2 02/14] ARM: mxc: time: add clk_prepare/clk_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/time.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 4b0fe28..b4e8b18 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c @@ -292,7 +292,7

[PATCH V2 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare

2011-11-10 Thread Richard Zhao
Signed-off-by: Richard Zhao --- include/linux/clk.h | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 7213b52..63985f7 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -107,6 +107,25 @@ static

[PATCH 1/1] i2c: imx: convert clk_prepare/clk_unprepare

2011-11-09 Thread Richard Zhao
Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 58832e5..aad623b 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c

Re: [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP

2009-11-09 Thread Richard Zhao
On Sat, Oct 31, 2009 at 10:47 AM, Richard Zhao wrote: > On Fri, Oct 30, 2009 at 8:40 AM, Ben Dooks wrote: >> Does anyone have any comments on these, or shall I look at merging >> them as fixes? >> >> -- >> Ben (b...@fluff.org, http://www.fluff.org/) &g

Re: [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP

2009-10-30 Thread Richard Zhao
On Fri, Oct 30, 2009 at 8:40 AM, Ben Dooks wrote: > Does anyone have any comments on these, or shall I look at merging > them as fixes? > > -- > Ben (b...@fluff.org, http://www.fluff.org/) > >  'a smiley only costs 4 bytes' > Thanks, Ben! I've test these patch on imx31 pdk and imx51 pdk. Richa

Re: [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP

2009-10-21 Thread Richard Zhao
On Sat, Oct 17, 2009 at 5:46 PM, Richard Zhao wrote: > The controller can't do anything else before it actually generates START/STOP. > So we check busy bit to make sure START/STOP is successfully finished. > > If we don't check busy bit, START/STOP may fail on some fast C

Re: [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP

2009-10-20 Thread Richard Zhao
On Sat, Oct 17, 2009 at 5:46 PM, Richard Zhao wrote: > The controller can't do anything else before it actually generates START/STOP. > So we check busy bit to make sure START/STOP is successfully finished. > > If we don't check busy bit, START/STOP may fail on some fast C

[PATCH V1 3/3] i2c: imx: disable clock when it's possible to save power.

2009-10-17 Thread Richard Zhao
Enable clock before START, disable it after STOP. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 671d37c..e3654d6 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -121,6 +121,7 @@ struct imx_i2c_struct

[PATCH V1 2/3] i2c: imx: only imx1 needs disable delay

2009-10-17 Thread Richard Zhao
check cpu_is_mx1() when disable delay. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 6055e92..671d37c 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -225,11 +225,13 @@ static void i2c_imx_stop(struct

[PATCH V1 1/3] i2c: imx: check busy bit when START/STOP

2009-10-17 Thread Richard Zhao
The controller can't do anything else before it actually generates START/STOP. So we check busy bit to make sure START/STOP is successfully finished. If we don't check busy bit, START/STOP may fail on some fast CPUs. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i

Re: [PATCH 4/4] i2c: imx: disable clock when it's possible to save power.

2009-10-04 Thread Richard Zhao
On Thu, Oct 1, 2009 at 4:00 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 03:56:29PM +0800, Richard Zhao wrote: >> On Thu, Oct 1, 2009 at 3:34 PM, Sascha Hauer wrote: >> > On Thu, Oct 01, 2009 at 09:13:33AM +0800, Richard Zhao wrote: >> >> Enable clock befor

Re: [PATCH 3/4] i2c: imx: add macros and printk to make debug easy

2009-10-04 Thread Richard Zhao
On Thu, Oct 1, 2009 at 5:30 PM, Richard Zhao wrote: > On Thu, Oct 1, 2009 at 4:26 PM, Sascha Hauer wrote: >> On Thu, Oct 01, 2009 at 04:01:50PM +0800, Richard Zhao wrote: >>> On Thu, Oct 1, 2009 at 3:29 PM, Sascha Hauer wrote: >>> > On Thu, Oct 01, 2009 at 09:13:

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-04 Thread Richard Zhao
On Fri, Oct 2, 2009 at 10:11 PM, Wolfram Sang wrote: > On Fri, Oct 02, 2009 at 04:17:09PM +0800, Richard Zhao wrote: >> On Fri, Oct 2, 2009 at 3:26 PM, Sascha Hauer wrote: >> > On Fri, Oct 02, 2009 at 08:57:04AM +0800, Richard Zhao wrote: >> >> On Fri, Oct 2,

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-02 Thread Richard Zhao
On Fri, Oct 2, 2009 at 3:26 PM, Sascha Hauer wrote: > On Fri, Oct 02, 2009 at 08:57:04AM +0800, Richard Zhao wrote: >> On Fri, Oct 2, 2009 at 12:37 AM, Wolfram Sang wrote: >> >> > Ah, so 'make the driver work on i.MX51' is a good statement which should >

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-01 Thread Richard Zhao
On Fri, Oct 2, 2009 at 12:37 AM, Wolfram Sang wrote: >> > Ah, so 'make the driver work on i.MX51' is a good statement which should >> > be part of the commit message. >> Well, maybe I can mention it. >> But I think the good point is to present what you modified, not the side >> effect. > > It is

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 5:52 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 05:11:30PM +0800, Richard Zhao wrote: >> On Thu, Oct 1, 2009 at 4:38 PM, Sascha Hauer wrote: >> > On Thu, Oct 01, 2009 at 04:03:20PM +0800, Richard Zhao wrote: >> >> On Thu, Oct 1, 2009 a

Re: [PATCH 3/4] i2c: imx: add macros and printk to make debug easy

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 4:26 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 04:01:50PM +0800, Richard Zhao wrote: >> On Thu, Oct 1, 2009 at 3:29 PM, Sascha Hauer wrote: >> > On Thu, Oct 01, 2009 at 09:13:32AM +0800, Richard Zhao wrote: >> >> When CONFIG_I2C_DEBUG

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 4:38 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 04:03:20PM +0800, Richard Zhao wrote: >> On Thu, Oct 1, 2009 at 9:13 AM, Richard Zhao wrote: >> > After START/RESTART, wait for busy bit to be set and >> > after STOP, wait for busy bit to

Re: [PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 9:13 AM, Richard Zhao wrote: > After START/RESTART, wait for busy bit to be set and > after STOP, wait for busy bit to be clear. > > Signed-off-by: Richard Zhao > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index 4a

Re: [PATCH 3/4] i2c: imx: add macros and printk to make debug easy

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 3:29 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 09:13:32AM +0800, Richard Zhao wrote: >> When CONFIG_I2C_DEBUG_BUS is enabled, it helps dump registers at operation >> fail condition, and print i2c_msg to xfer. >> >> Signed-off-by: Richard

Re: [PATCH 2/4] i2c: imx: only imx1 needs disable delay

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 3:26 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 09:13:31AM +0800, Richard Zhao wrote: >> check cpu_is_mx1() when set disable_delay. >> >> Signed-off-by: Richard Zhao >> >> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/

Re: [PATCH 4/4] i2c: imx: disable clock when it's possible to save power.

2009-10-01 Thread Richard Zhao
On Thu, Oct 1, 2009 at 3:34 PM, Sascha Hauer wrote: > On Thu, Oct 01, 2009 at 09:13:33AM +0800, Richard Zhao wrote: >> Enable clock before START, disable it after STOP. > > The clk_diable/enable calls in suspend/resume should be removed also. > > Sascha > >>

[PATCH 4/4] i2c: imx: disable clock when it's possible to save power.

2009-09-30 Thread Richard Zhao
Enable clock before START, disable it after STOP. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 87faea4..72ddea3 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -120,6 +120,7 @@ struct imx_i2c_struct

[PATCH 2/4] i2c: imx: only imx1 needs disable delay

2009-09-30 Thread Richard Zhao
check cpu_is_mx1() when set disable_delay. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 156cc95..c1e541c 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -254,14 +254,16 @@ static void __init

[PATCH 3/4] i2c: imx: add macros and printk to make debug easy

2009-09-30 Thread Richard Zhao
When CONFIG_I2C_DEBUG_BUS is enabled, it helps dump registers at operation fail condition, and print i2c_msg to xfer. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c1e541c..87faea4 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b

[PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-09-30 Thread Richard Zhao
After START/RESTART, wait for busy bit to be set and after STOP, wait for busy bit to be clear. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 4afba3e..156cc95 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c

[PATCH 4/4] i2c: imx: disable clock when it's possible to save power.

2009-09-29 Thread Richard Zhao
Enable clock before START, disable it after STOP. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 87faea4..72ddea3 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -120,6 +120,7 @@ struct imx_i2c_struct

[PATCH 3/4] i2c: imx: add macros and printk to make debug easy

2009-09-29 Thread Richard Zhao
When CONFIG_I2C_DEBUG_BUS is enabled, it helps dump registers at operation fail condition, and print i2c_msg to xfer. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c1e541c..87faea4 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b

[PATCH 2/4] i2c: imx: only imx1 needs disable delay

2009-09-29 Thread Richard Zhao
check cpu_is_mx1() when set disable_delay. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 156cc95..c1e541c 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -254,14 +254,16 @@ static void __init

[PATCH 1/4] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
After START/RESTART, wait for busy bit to be set and after STOP, wait for busy bit to be clear. Signed-off-by: Richard Zhao diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 4afba3e..156cc95 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c

Re: [PATCH] i2c: imx: add macros and printk to make debug easy

2009-09-29 Thread Richard Zhao
On Wed, Sep 30, 2009 at 1:48 PM, Richard Zhao wrote: > When CONFIG_I2C_DEBUG_BUS is enabled, it helps dump registers at operation > fail condition, and print i2c_msg to xfer. > > Signed-off-by: Richard Zhao > --- >  drivers/i2c/busse

[PATCH] i2c: imx: disable clock when it's possible to save power.

2009-09-29 Thread Richard Zhao
Enable clock before START, disable it after STOP. Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 87faea4..72ddea3 100644 --- a

[PATCH] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
After START/RESTART, wait for busy bit to be set and after STOP, wait for busy bit to be clear. Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 46 + 1 files changed, 32 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH] i2c: imx: add macros and printk to make debug easy

2009-09-29 Thread Richard Zhao
When CONFIG_I2C_DEBUG_BUS is enabled, it helps dump registers at operation fail condition, and print i2c_msg to xfer. Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 49 -- 1 files changed, 42 insertions(+), 7 deletions(-) diff --git a

[PATCH] i2c: imx: only imx1 needs disable delay

2009-09-29 Thread Richard Zhao
check cpu_is_mx1() when set disable_delay. Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 156cc95..c1e541c 100644 --- a

Re: [PATCH] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
On Tue, Sep 29, 2009 at 10:06 PM, Sascha Hauer wrote: > On Tue, Sep 29, 2009 at 09:54:05PM +0800, Richard Zhao wrote: >> Thanks, Sacha. See comments inline. >> >> On Tue, Sep 29, 2009 at 9:25 PM, Sascha Hauer wrote: >> > Hi Richard, >> > >> &g

Re: [PATCH] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
On Tue, Sep 29, 2009 at 10:24 PM, Mark Brown wrote: > On Tue, Sep 29, 2009 at 09:54:05PM +0800, Richard Zhao wrote: >> On Tue, Sep 29, 2009 at 9:25 PM, Sascha Hauer wrote: > >> > I think it's generally a good idea to start/stop the clocks when needed >> > as

Re: [PATCH] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
Thanks, Sacha. See comments inline. On Tue, Sep 29, 2009 at 9:25 PM, Sascha Hauer wrote: > Hi Richard, > > > On Tue, Sep 29, 2009 at 07:41:44PM +0800, Richard Zhao wrote: >> After START, wait busy bit to be set and >> after STOP, wait busy bit to be clear. >> >&

[PATCH] i2c: imx: check busy bit when START/STOP

2009-09-29 Thread Richard Zhao
After START, wait busy bit to be set and after STOP, wait busy bit to be clear. Disable clock when it's possible to save power. Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 116 -- 1 files changed, 88 insertions(+), 28 dele

Re: [PATCH 1/5] I2C driver for MXC

2009-03-30 Thread Richard Zhao
On Mon, Mar 30, 2009 at 9:50 PM, Guennadi Liakhovetski wrote: > Ok, I just was informed, that there is a hardware bug on the board I am > using. So, please ignore my objections. Sorry for the wasted time. > > Thanks > Guennadi > --- It seems Guennadi's patch is based on a newer(not latest) version

<    1   2