Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Philipp Zabel
Hi Lothar, Am Mittwoch, den 02.11.2016, 09:51 +0100 schrieb Lothar Waßmann: > Hi, > > On Wed, 2 Nov 2016 09:06:45 +0100 Sascha Hauer wrote: > > On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > > > Hi, > > > > > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > > > On

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Philipp Zabel
Hi Lothar, Am Mittwoch, den 02.11.2016, 09:51 +0100 schrieb Lothar Waßmann: > Hi, > > On Wed, 2 Nov 2016 09:06:45 +0100 Sascha Hauer wrote: > > On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > > > Hi, > > > > > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > > > On

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Wed, 2 Nov 2016 09:06:45 +0100 Sascha Hauer wrote: > On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > > Hi, > > > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > > > Hi, > > > > > > > > On

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Wed, 2 Nov 2016 09:06:45 +0100 Sascha Hauer wrote: > On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > > Hi, > > > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > > > Hi, > > > > > > > > On

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Sascha Hauer
On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > Hi, > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > > Hi, > > > > > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > > > As said, even

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Sascha Hauer
On Wed, Nov 02, 2016 at 08:56:20AM +0100, Lothar Waßmann wrote: > Hi, > > On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > > Hi, > > > > > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > > > As said, even

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > Hi, > > > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > > As said, even the commit 7b27c160c68 introducing the register clk did not > > > enable the

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Wed, 2 Nov 2016 08:36:14 +0100 Sascha Hauer wrote: > On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > > Hi, > > > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > > As said, even the commit 7b27c160c68 introducing the register clk did not > > > enable the

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Sascha Hauer
On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > Hi, > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > As said, even the commit 7b27c160c68 introducing the register clk did not > > enable the clock consistently for all register accesses. Maybe it's best > > to

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Sascha Hauer
On Wed, Nov 02, 2016 at 08:18:52AM +0100, Lothar Waßmann wrote: > Hi, > > On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > > As said, even the commit 7b27c160c68 introducing the register clk did not > > enable the clock consistently for all register accesses. Maybe it's best > > to

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > As said, even the commit 7b27c160c68 introducing the register clk did not > enable the clock consistently for all register accesses. Maybe it's best > to include the following patch so that we can find a clear culprit and > do not bury

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-02 Thread Lothar Waßmann
Hi, On Mon, 31 Oct 2016 06:59:04 +0100 Sascha Hauer wrote: > As said, even the commit 7b27c160c68 introducing the register clk did not > enable the clock consistently for all register accesses. Maybe it's best > to include the following patch so that we can find a clear culprit and > do not bury

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 10:29:37AM +0100, Sascha Hauer wrote: > > accesses. This is true for the ->config() callback, but not for the > > ->set_enable() callback. Given that the ipg clock is not consistently > > enabled for all register accesses we can assume that either it is not > > required at

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 10:29:37AM +0100, Sascha Hauer wrote: > > accesses. This is true for the ->config() callback, but not for the > > ->set_enable() callback. Given that the ipg clock is not consistently > > enabled for all register accesses we can assume that either it is not > > required at

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Lukasz Majewski
Hi Sascha > On Tue, Nov 01, 2016 at 06:57:23AM +0100, Lukasz Majewski wrote: > > Hi Sascha, > > > > > The current assumption as discussed by Philipp and me is that the > > > ipg clk is only needed when the pwm output is driven by the ipg > > > clk (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Lukasz Majewski
Hi Sascha > On Tue, Nov 01, 2016 at 06:57:23AM +0100, Lukasz Majewski wrote: > > Hi Sascha, > > > > > The current assumption as discussed by Philipp and me is that the > > > ipg clk is only needed when the pwm output is driven by the ipg > > > clk (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Sascha Hauer
On Tue, Nov 01, 2016 at 06:57:23AM +0100, Lukasz Majewski wrote: > Hi Sascha, > > > The current assumption as discussed by Philipp and me is that the ipg > > clk is only needed when the pwm output is driven by the ipg clk > > (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) > > At least on my setup

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-11-01 Thread Sascha Hauer
On Tue, Nov 01, 2016 at 06:57:23AM +0100, Lukasz Majewski wrote: > Hi Sascha, > > > The current assumption as discussed by Philipp and me is that the ipg > > clk is only needed when the pwm output is driven by the ipg clk > > (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) > > At least on my setup

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > The current assumption as discussed by Philipp and me is that the ipg > clk is only needed when the pwm output is driven by the ipg clk > (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) At least on my setup (i.MX6q) the ipg clock (ipg_clk) don't need to be explicitly enabled in the

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > The current assumption as discussed by Philipp and me is that the ipg > clk is only needed when the pwm output is driven by the ipg clk > (MX3_PWMCR[16:17] = MX3_PWMCR_CLKSRC_IPG) At least on my setup (i.MX6q) the ipg clock (ipg_clk) don't need to be explicitly enabled in the

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > On Mon, Oct 31, 2016 at 06:59:04AM +0100, Sascha Hauer wrote: > > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > > On Thu, 27 Oct 2016 08:29:39 +0200 > > > Lukasz Majewski wrote: > > > > > > > The code has been rewritten to remove

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > On Mon, Oct 31, 2016 at 06:59:04AM +0100, Sascha Hauer wrote: > > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > > On Thu, 27 Oct 2016 08:29:39 +0200 > > > Lukasz Majewski wrote: > > > > > > > The code has been rewritten to remove "generic" calls to > > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 06:59:04AM +0100, Sascha Hauer wrote: > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > On Thu, 27 Oct 2016 08:29:39 +0200 > > Lukasz Majewski wrote: > > > > > The code has been rewritten to remove "generic" calls to > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 06:59:04AM +0100, Sascha Hauer wrote: > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > On Thu, 27 Oct 2016 08:29:39 +0200 > > Lukasz Majewski wrote: > > > > > The code has been rewritten to remove "generic" calls to > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 09:06:00AM +0100, Lukasz Majewski wrote: > Hi Sascha, > > > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > > On Thu, 27 Oct 2016 08:29:39 +0200 > > > Lukasz Majewski wrote: > > > > > > > The code has been rewritten to remove

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Sascha Hauer
On Mon, Oct 31, 2016 at 09:06:00AM +0100, Lukasz Majewski wrote: > Hi Sascha, > > > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > > On Thu, 27 Oct 2016 08:29:39 +0200 > > > Lukasz Majewski wrote: > > > > > > > The code has been rewritten to remove "generic" calls to > > >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > On Thu, 27 Oct 2016 08:29:39 +0200 > > Lukasz Majewski wrote: > > > > > The code has been rewritten to remove "generic" calls to > > > imx_pwm_{enable|disable|config}. > > > > > > Such

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-31 Thread Lukasz Majewski
Hi Sascha, > On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > > On Thu, 27 Oct 2016 08:29:39 +0200 > > Lukasz Majewski wrote: > > > > > The code has been rewritten to remove "generic" calls to > > > imx_pwm_{enable|disable|config}. > > > > > > Such approach would facilitate

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-30 Thread Sascha Hauer
On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > On Thu, 27 Oct 2016 08:29:39 +0200 > Lukasz Majewski wrote: > > > The code has been rewritten to remove "generic" calls to > > imx_pwm_{enable|disable|config}. > > > > Such approach would facilitate switch

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-30 Thread Sascha Hauer
On Thu, Oct 27, 2016 at 09:40:05AM +0200, Boris Brezillon wrote: > On Thu, 27 Oct 2016 08:29:39 +0200 > Lukasz Majewski wrote: > > > The code has been rewritten to remove "generic" calls to > > imx_pwm_{enable|disable|config}. > > > > Such approach would facilitate switch to atomic PWM (a.k.a

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Lukasz Majewski
Hi Boris, > On Thu, 27 Oct 2016 08:29:39 +0200 > Lukasz Majewski wrote: > > > The code has been rewritten to remove "generic" calls to > > imx_pwm_{enable|disable|config}. > > > > Such approach would facilitate switch to atomic PWM (a.k.a > > ->apply()) implementation. >

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Lukasz Majewski
Hi Boris, > On Thu, 27 Oct 2016 08:29:39 +0200 > Lukasz Majewski wrote: > > > The code has been rewritten to remove "generic" calls to > > imx_pwm_{enable|disable|config}. > > > > Such approach would facilitate switch to atomic PWM (a.k.a > > ->apply()) implementation. > > > > Suggested-by:

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Boris Brezillon
On Thu, 27 Oct 2016 08:29:39 +0200 Lukasz Majewski wrote: > The code has been rewritten to remove "generic" calls to > imx_pwm_{enable|disable|config}. > > Such approach would facilitate switch to atomic PWM (a.k.a ->apply()) > implementation. > > Suggested-by: Stefan

Re: [PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Boris Brezillon
On Thu, 27 Oct 2016 08:29:39 +0200 Lukasz Majewski wrote: > The code has been rewritten to remove "generic" calls to > imx_pwm_{enable|disable|config}. > > Such approach would facilitate switch to atomic PWM (a.k.a ->apply()) > implementation. > > Suggested-by: Stefan Agner > Suggested-by:

[PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Lukasz Majewski
The code has been rewritten to remove "generic" calls to imx_pwm_{enable|disable|config}. Such approach would facilitate switch to atomic PWM (a.k.a ->apply()) implementation. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon

[PATCH v2 03/10] pwm: imx: Rewrite imx_pwm_*_v1 code to facilitate switch to atomic pwm operation

2016-10-27 Thread Lukasz Majewski
The code has been rewritten to remove "generic" calls to imx_pwm_{enable|disable|config}. Such approach would facilitate switch to atomic PWM (a.k.a ->apply()) implementation. Suggested-by: Stefan Agner Suggested-by: Boris Brezillon Signed-off-by: Lukasz Majewski --- Changes for v2: - Add