From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] PWM: add pwm framework support
Date: Mon, 4 Jul 2011 14:43:18 +0200 [thread overview]
Message-ID: <20110704124318.GI6069@pengutronix.de> (raw)
In-Reply-To: <4E11994B.7070103@gmail.com>
On Mon, Jul 04, 2011 at 08:43:23PM +1000, Ryan Mallon wrote:
> On 04/07/11 17:55, Sascha Hauer wrote:
> > I am tired of discussing this. It seems we can't agree and unless
> > someone else jumps in here we will probably have to wait for another
> > year until something moves in the PWM area.
>
> If we are going to introduce a new framework for pwms then we should
> create one which meets the needs of at least all of the in kernel
> drivers. This patch series provides no solution for either the atmel or
> ep93xx drivers, so it is not a complete solution. At some point the
> api/framework _must_ be changed. If we can introduce transition layers
> then we should do that now so they we can provide a common framework
> along with some forward thinking about how the other drivers are going
> to be migrated to the new framework. This patch series doesn't even
> migrate _any_ of the existing drivers.
>
> It doesn't have to be an all or nothing approach. Possibly Bill's series
> is perhaps too involved by changing the api, introducing sysfs support
> and reworking the pwm users. But your series is at the opposite end of
> the spectrum. It does too little. It will take a few release cycles to
> get all of the existing drivers migrated and since we can't change the
> api until that happens the atmel and ep93xx drivers will take longer
> still. At the very least your series should migrate some of the drivers.
>
> The timeline argument is a bit poor. Yes, there has been discussion for
> a lengthy time about how the pwm api should be developed, but I think
> that is because it is non-trivial to come up with a framework which is
> good enough to support all of the pwm hardware (some of which is already
> in the mainline). Getting something merged now just because it can be
> done quickly is not a good idea if it all has to get reworked in the
> future so that it can support all the hardware.
>
> The pwm framework needs to incorporate at least the following:
> - sysfs access (ep93xx driver)
The sysfs interface will likely raise smoe more discussion, that's why I
intentionally have no support for it. It can be added later, but right
now I see no reason why we should add artificial barriers to merge these
patches.
> - Multiple channels per device (atmel driver)
Again, this can be added later.
>
> The mxs driver you introduce looks like it could be implemented as a
> single device (continuous mmio space) with multiple channels rather than
> the pwm core/driver approach you have. I also can't see anything in this
> patch set which hooks up the mxs pwms to an actual board (i.e. nothing
> calls mxs_add_mxs_pwm)?
Why should anyone register a device for which no driver is in the tree?
>
> The other nice things to have for the pwm framework are:
> - More fine grained control of pwms: pwm_period_ns, period_duty_ns, etc
> - Polarity control
> - Synchronisation support for multi-channel devices
> - Interrupt handler support
> - Sleeping vs non-sleeping configuration api
>
> The fine-grained control api could be added now. pwm_config could be
> left as is for the time being (the new api could be a wrapper around it
> to start with). Polarity control and interrupt handling apis could also
> be defined without affecting the drivers which don't need to implement
> them. Multiple channels and the sleeping/non-sleeping api are the more
> difficult ones, but at least having some sort of indication about how
> these plan to be solved would be useful.
Again, why should we add these *now*? It only raises the chance that
there's more discussion.
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 |
next prev parent reply other threads:[~2011-07-04 12:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 10:41 [PATCH v3] implement a generic PWM framework Sascha Hauer
2011-06-30 10:41 ` [PATCH 1/3] PWM: add pwm framework support Sascha Hauer
2011-06-30 11:07 ` Bill Gatliff
2011-06-30 12:41 ` Arnd Bergmann
2011-06-30 16:17 ` Bill Gatliff
2011-06-30 17:02 ` Sascha Hauer
2011-06-30 19:45 ` Bill Gatliff
2011-06-30 23:24 ` Ryan Mallon
2011-07-01 0:33 ` H Hartley Sweeten
2011-07-01 0:55 ` Mike Frysinger
2011-07-01 7:37 ` Sascha Hauer
2011-07-01 8:28 ` Ryan Mallon
2011-07-01 8:54 ` Sascha Hauer
2011-07-02 0:40 ` Ryan Mallon
2011-07-04 7:55 ` Sascha Hauer
2011-07-04 8:50 ` Dmitry Eremin-Solenikov
2011-07-04 10:43 ` Ryan Mallon
2011-07-04 12:43 ` Sascha Hauer [this message]
2011-07-04 14:07 ` Arnd Bergmann
2011-12-07 8:53 ` Thierry Reding
2011-12-07 9:07 ` Sascha Hauer
2011-12-14 10:03 ` Thierry Reding
2011-12-14 11:37 ` Sascha Hauer
[not found] ` <20110704110523.GB316@e-circ.dyndns.org>
2011-07-04 13:53 ` Arnd Bergmann
2011-06-30 10:41 ` [PATCH 2/3] ARM mxs: adjust pwm resources to what the driver expects Sascha Hauer
2011-06-30 11:30 ` Arnd Bergmann
2011-06-30 10:41 ` [PATCH 3/3] pwm: Add a i.MX23/28 pwm driver Sascha Hauer
2011-06-30 11:42 ` Arnd Bergmann
2011-06-30 15:11 ` 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=20110704124318.GI6069@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 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).