All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: "Zha, Qipeng" <qipeng.zha@intel.com>
Cc: "linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>
Subject: Re: git tree
Date: Wed, 11 Mar 2015 11:51:48 +0100	[thread overview]
Message-ID: <20150311105147.GA22149@ulmo.nvidia.com> (raw)
In-Reply-To: <C6287702A945AC47BE5DB5DFD4B5C6DD01844B9A@SHSMSX104.ccr.corp.intel.com>

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

On Thu, Mar 05, 2015 at 07:53:16AM +0000, Zha, Qipeng wrote:
> Hi 
> 
> I got pwm subsystem git tree info as below from v3.19-rc6 MAINTAINER
> And I clone it, found the version is v3.12 Is the tree current
> maintain tree ? or there is a new one, thanks.
> 
> git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git

You're probably looking at the master branch, but I don't update that.
Use the for-next branch, which is what gets merged into linux-next.

Thierry

> -----Original Message-----
> From: linux-pwm-owner@vger.kernel.org [mailto:linux-pwm-owner@vger.kernel.org] On Behalf Of Shawn Guo
> Sent: Monday, March 02, 2015 8:32 PM
> To: Gaetan Hug
> Cc: thierry.reding@gmail.com; linux-pwm@vger.kernel.org; linux-kernel@vger.kernel.org; fabio.estevam@freescale.com
> Subject: Re: [PATCH] pwm: mxs: fix period divider computation
> 
> On Wed, Feb 18, 2015 at 02:06:34PM +0100, Gaetan Hug wrote:
> > The driver computes which clock divider it sould be using from the 
> > requested period. This computation assumes that the link between the 
> > register value and the actual divider value is raising 2 to the power 
> > of the registry value.
> > 
> >     div = 1 << regvalue
> > 
> > This is true only for the first 5 values out of 8. Next values are 64,
> > 256 and, 1024 - instead of 32, 64, 128.
> 
> Just checked i.MX28 Reference Manual, and yes, this is the case.
> 
> > This affects only the users requesting a period > 0.04369s.
> > 
> > Replace the computation with a look-up table.
> 
> Your SoB is missing here.  Otherwise,
> 
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> 
> > ---
> >  drivers/pwm/pwm-mxs.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index
> > f75ecb0..c65e183 100644
> > --- a/drivers/pwm/pwm-mxs.c
> > +++ b/drivers/pwm/pwm-mxs.c
> > @@ -35,6 +35,8 @@
> >  #define  PERIOD_CDIV(div)	(((div) & 0x7) << 20)
> >  #define  PERIOD_CDIV_MAX	8
> >  
> > +static unsigned const int cdiv[PERIOD_CDIV_MAX] = {1, 2, 4, 8, 16, 
> > +64, 256, 1024};
> > +
> >  struct mxs_pwm_chip {
> >  	struct pwm_chip chip;
> >  	struct clk *clk;
> > @@ -54,13 +56,13 @@ static int mxs_pwm_config(struct pwm_chip *chip, 
> > struct pwm_device *pwm,
> >  
> >  	rate = clk_get_rate(mxs->clk);
> >  	while (1) {
> > -		c = rate / (1 << div);
> > +		c = rate / cdiv[div];
> >  		c = c * period_ns;
> >  		do_div(c, 1000000000);
> >  		if (c < PERIOD_PERIOD_MAX)
> >  			break;
> >  		div++;
> > -		if (div > PERIOD_CDIV_MAX)
> > +		if (div >= PERIOD_CDIV_MAX)
> >  			return -EINVAL;
> >  	}
> >  
> > --
> > 1.7.10.4
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-11 10:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05  7:53 git tree Zha, Qipeng
2015-03-11 10:51 ` Thierry Reding [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-05  6:18 Zha, Qipeng
2015-03-05  7:47 ` Zha, Qipeng
2015-03-06 17:30   ` Darren Hart
2009-06-24  9:34 Ryan
2009-06-24 11:10 ` Tony Lindgren
2009-06-25 14:08   ` Pandita, Vikram
2009-06-25 14:40     ` Tony Lindgren
2007-07-30 12:14 Luís Vitório Cargnini
2007-07-30 12:37 ` Felipe Balbi
2007-07-17 11:41 Git tree Veda N
2007-07-17 12:03 ` Trilok Soni
2007-07-25 15:15 ` Maximus
     [not found] <20070417022050.26A645C0062@mail41-blu.bigfish.com>
2007-04-17  7:48 ` git tree Grant Likely
2007-04-22  1:00   ` David H. Lynch Jr
2007-04-22  5:43     ` Grant Likely
2006-07-13 22:41 Git tree Luís Cargnini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150311105147.GA22149@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=qipeng.zha@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.