All of lore.kernel.org
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM i.MX: Move i.MX pwm driver to pwm framework
Date: Fri, 16 Mar 2012 10:27:39 +0100	[thread overview]
Message-ID: <20120316092739.GH3852@pengutronix.de> (raw)
In-Reply-To: <20120316081748.GF7758@S2101-09.ap.freescale.net>

On Fri, Mar 16, 2012 at 04:17:51PM +0800, Shawn Guo wrote:
> On Fri, Mar 16, 2012 at 09:08:32AM +0100, Thierry Reding wrote:
> > * Shawn Guo wrote:
> > > On Thu, Mar 15, 2012 at 10:04:35AM +0100, Sascha Hauer wrote:
> > > > diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
> > > > index e859c51..fc7571e 100644
> > > > --- a/drivers/pwm/Makefile
> > > > +++ b/drivers/pwm/Makefile
> > > > @@ -1,4 +1,5 @@
> > > >  obj-$(CONFIG_PWM)		+= core.o
> > > >  obj-$(CONFIG_PWM_BFIN)		+= pwm-bfin.o
> > > > +obj-$(CONFIG_PWM_IMX)		+= imx-pwm.o
> > > 
> > > s/imx-pwm.o/pwm-imx.o
> > 
> > Yes, I'll make that change when I integrate the patch in my series.
> > 
> Thanks for taking this on.
> 
> > > > @@ -98,7 +98,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> > > >  		else
> > > >  			cr |= MX3_PWMCR_CLKSRC_IPG_HIGH;
> > > >  
> > > > -		writel(cr, pwm->mmio_base + MX3_PWMCR);
> > > > +		writel(cr, imxpwm->mmio_base + MX3_PWMCR);
> > > >  	} else if (cpu_is_mx1() || cpu_is_mx21()) {
> > > 
> > > Since we are here, can we move one step further to get rid of these
> > > cpu_is_xxx()?  Then, we can remove <mach/hardware.h> inclusion from
> > > the driver.
> > 
> > I guess this could be handled by using several names for the driver and
> > handling the differences using a table of platform_device_id:s. Perhaps
> > you had something different in mind?
> > 
> Same thing on my mind.
> 
> > > >  static int __devinit mxc_pwm_probe(struct platform_device *pdev)
> > > 
> > > Should we take this opportunity to rename the driver from mxc_pwm to
> > > imx_pwm?
> > 
> > If we decide to rename maybe it should be done in two steps. First it can be
> > renamed internally and in the second step the name could be changed along
> > with all users. I just want to avoid too much churn in this series, which is
> > already growing way larger than I had hoped.
> > 
> It seems I'm asking too much.  Okay, we can do that after it gets moved.

Indeed. The pwm driver became a horrible piece of code over time, it's
time to refactor it. I just wanted to make the move first, then look for
further cleanups.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-03-16  9:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15  9:04 [PATCH] move pwm drivers to new framework Sascha Hauer
2012-03-15  9:04 ` [PATCH 1/3] ARM i.MX: Move i.MX pwm driver to pwm framework Sascha Hauer
2012-03-16  7:49   ` Shawn Guo
2012-03-16  8:08     ` Thierry Reding
2012-03-16  8:17       ` Shawn Guo
2012-03-16  9:27         ` Sascha Hauer [this message]
2012-03-15  9:04 ` [PATCH 2/3] ARM Samsung: Move s3c " Sascha Hauer
2012-03-15  9:04 ` [PATCH 3/3] ARM vt8500: Move vt8500 " Sascha Hauer

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=20120316092739.GH3852@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.