From: Thierry Reding <thierry.reding@gmail.com>
To: Tony Lindgren <tony@atomide.com>
Cc: NeilBrown <neilb@suse.de>,
Thierry Reding <thierry.reding@avionic-design.de>,
Grant Erickson <marathon96@gmail.com>,
Jon Hunter <jon-hunter@ti.com>,
linux-omap@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH/RFC] pwm: omap: Add PWM support using dual-mode timers
Date: Thu, 12 Dec 2013 13:59:30 +0100 [thread overview]
Message-ID: <20131212125929.GL11524@ulmo.nvidia.com> (raw)
In-Reply-To: <20131029212318.GI15154@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]
On Tue, Oct 29, 2013 at 02:23:18PM -0700, Tony Lindgren wrote:
> * NeilBrown <neilb@suse.de> [131023 23:36]:
> >
> > I submitted this in December last year. I got lots of good feedback
> > and fixed some things, but it never got accepted. Not entirely sure
> > why, maybe I dropped the ball.
> >
> > Anyway, here is again with device-tree support added.
> >
> > This is only an RFC and not a real submission for two reasons, both of which
> > are really directed as Jon.
> >
> > 1/ I have to
> >
> > #include <../arch/arm/plat-omap/include/plat/dmtimer.h>
> >
> > which is incredibly ugly.
> > Is there any reason this cannot be moved to include/linux/omap-dmtimer.h?
>
> Yes that's what at least dw_apb_timer and sh_timer are doing.
>
> > 2/ I found that I need to call
> >
> > omap_dm_timer_write_counter(omap->dm_timer, DM_TIMER_LOAD_MIN);
> >
> > when using device-tree. This is because with devicetree
> > omap_timer_restore_context() is called much more often and it sets the counter
> > register to 0 .. it takes a long time to count up to DM_TIMER_LOAD_MIN from there.
> >
> > Now I don't object to calling omap_dm_timer_write_counter (though it might be nice if
> > omap_dm_timer_set_load wrote the one value to both LOAD_REG and COUNTER_REG).
> > However it seems wrong that I have to call it *after* starting the counter.
> > Currently _write_counter refuses to run if the timer hasn't been started.
> >
> > So Jon:
> > a/ can we change omap_dm_timer_write_counter to work when the timer isn't
> > running?
> > b/ can we have omap_dm_timer_set_load also set the counter?
> >
> >
> > For anyone else generous enough to read my code: is this otherwise acceptable?
>
> Did not look beyond the dmtimer stuff, but let's start by moving dmtimer.c to
> live under drivers and move the header, then do the pwm patches.
Why does the driver have to move? There is certainly some precedent for
having arch-specific code in arch/ but expose the public API via some
header in include/linux. Sometimes there's just no proper place for the
driver elsewhere, so rather than moving it somewhere more or less random
keeping it in arch/arm/plat-omap is just as good.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-12 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 6:36 [PATCH/RFC] pwm: omap: Add PWM support using dual-mode timers NeilBrown
2013-10-29 21:23 ` Tony Lindgren
2013-12-12 12:59 ` Thierry Reding [this message]
2013-12-13 17:41 ` Tony Lindgren
2013-12-12 13:43 ` Thierry Reding
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=20131212125929.GL11524@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=jon-hunter@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=marathon96@gmail.com \
--cc=neilb@suse.de \
--cc=thierry.reding@avionic-design.de \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).