linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olliver Schinagl <o.schinagl@ultimaker.com>
To: Olliver Schinagl <oliver@schinagl.nl>,
	Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Joachim Eastwood <manabian@gmail.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Olliver Schinagl <oliver+list@schinagl.nl>,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Olliver Schinagl <o.schinagl@ultimaker.com>,
	Olliver Schinagl <oliver@schinagl.nl>
Subject: [PATCH 00/10]
Date: Mon, 26 Oct 2015 22:32:31 +0100	[thread overview]
Message-ID: <1445895161-2317-1-git-send-email-o.schinagl@ultimaker.com> (raw)

Hey Thierry,

With this patch set I wanted to add some new features to the PWM framework,
while doing so, I ran into 2 minor things with the lpc18xx and sunxi driver.

The lpc18xx I bumped into because I was trying to learn from existing drivers.
Here I only added the setter to set the chip_data, since I think it is bad
practice to set data directly in the struct, I'll be happy to stand corrected
however and that patch not applied.

Since I use the sunxi platform a lot, I used this platform to test things with
and to also ran into some issues with the hardware PWM as can be seen in its
commit log.

The major feature of this patch-set however is the introduction of the Generic
GPIO based PWM driver based on the high-resolution timers. On an Olimex Lime2
featuring an Allwinner A20 SoC, I can toggle quite reliably at 100 kHz. At 150
kHz the SoC started to show signs of being to slow and the scope traces started
to become inconsistent.
Naturally of course, a GPIO based PWM is heavily dependent on system load and
on the SoC. For some use cases a bit-banged PWM might not be ideal, audio for
example does not sound 'pitch-perfect' but does work pretty alright. It really
is up to the users what one might one to use a bit-banged GPIO driver for.

Finally, I've started to add a 'pulse' option to the PWM framework and
added it to the sunxi and gpio variants. It currently does not work and I
did not wanted to submit it until Boris's PWM patches where in, but I also
felt an early review on the intention would be a good idea.
The idea is using this new feature, we can start emitting a fixed number of
pulses, using the PWM 'hardware' guaranteeing properly timed output.
Not all hardware may support this at all (might be emulated however) and the
sunxi hardware for example is limited to 1 pulse max (but may emulate more with
timers for example). The GPIO driver is able to produce a lot of timed pulses
however.

Thanks,

Olliver

Signed-off-by: Olliver Schinagl <oliver@schinagl.nL>

Olliver Schinagl (10):
  pwm: lpc18xx_pwm: use pwm_set_chip_data
  pwm: sunxi: fix whitespace issue
  pwm: sunxi: Yield some time to the pwm-block to become ready
  pwm: core: use bitops
  pwm: sysfs: do not unnecessarily store result in var
  pwm: sysfs: make use of the DEVICE_ATTR_[RW][WO] macro's
  pwm: gpio: Add a generic gpio based PWM driver
  pwm: core: add pulse feature to the PWM framework
  pwm: pwm_gpio: add pulse option
  pwm: sunxi: Add possibility to pulse the sunxi pwm output

 Documentation/devicetree/bindings/pwm/pwm-gpio.txt |  18 ++
 MAINTAINERS                                        |   5 +
 drivers/pwm/Kconfig                                |  15 ++
 drivers/pwm/Makefile                               |   1 +
 drivers/pwm/core.c                                 |  30 ++-
 drivers/pwm/pwm-gpio.c                             | 276 +++++++++++++++++++++
 drivers/pwm/pwm-lpc18xx-sct.c                      |  11 +-
 drivers/pwm/pwm-sun4i.c                            |  73 ++++--
 drivers/pwm/sysfs.c                                | 133 +++++++---
 include/linux/pwm.h                                |  71 +++++-
 10 files changed, 556 insertions(+), 77 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.txt
 create mode 100644 drivers/pwm/pwm-gpio.c

-- 
2.6.1


             reply	other threads:[~2015-10-26 21:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 21:32 Olliver Schinagl [this message]
2015-10-26 21:32 ` [PATCH 01/10] pwm: lpc18xx_pwm: use pwm_set_chip_data Olliver Schinagl
2015-10-26 21:58   ` Ezequiel Garcia
2015-10-27  7:22     ` Olliver Schinagl
2015-10-26 21:32 ` [PATCH 02/10] pwm: sunxi: fix whitespace issue Olliver Schinagl
2015-11-06 16:08   ` Thierry Reding
2015-10-26 21:32 ` [PATCH 03/10] pwm: sunxi: Yield some time to the pwm-block to become ready Olliver Schinagl
2015-11-06 16:12   ` Thierry Reding
2015-11-06 16:34   ` Chen-Yu Tsai
2015-10-26 21:32 ` [PATCH 04/10] pwm: core: use bitops Olliver Schinagl
2015-11-06 14:46   ` Thierry Reding
2015-11-06 14:49     ` Olliver Schinagl
2015-11-06 21:36       ` Andy Shevchenko
2015-10-26 21:32 ` [PATCH 05/10] pwm: sysfs: do not unnecessarily store result in var Olliver Schinagl
2015-11-06 14:51   ` Thierry Reding
2015-10-26 21:32 ` [PATCH 06/10] pwm: sysfs: make use of the DEVICE_ATTR_[RW][WO] macro's Olliver Schinagl
2015-11-06 14:52   ` Thierry Reding
2015-10-26 21:32 ` [PATCH 07/10] pwm: gpio: Add a generic gpio based PWM driver Olliver Schinagl
2015-10-27  7:42   ` Rob Herring
2015-10-27  8:50     ` Olliver Schinagl
2015-11-06 15:57   ` Thierry Reding
2015-10-26 21:32 ` [PATCH 08/10] pwm: core: add pulse feature to the PWM framework Olliver Schinagl
2015-10-26 21:59   ` kbuild test robot
2015-10-26 22:09   ` kbuild test robot
2015-10-26 22:10   ` kbuild test robot
2015-10-26 22:11   ` kbuild test robot
2015-10-26 23:06   ` kbuild test robot
2015-11-06 15:18   ` Thierry Reding
2015-11-06 15:46     ` Olliver Schinagl
2015-11-06 16:05       ` Thierry Reding
2015-11-06 16:18         ` Olliver Schinagl
2015-10-26 21:32 ` [PATCH 09/10] pwm: pwm_gpio: add pulse option Olliver Schinagl
2015-10-26 21:32 ` [PATCH 10/10] pwm: sunxi: Add possibility to pulse the sunxi pwm output Olliver Schinagl

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=1445895161-2317-1-git-send-email-o.schinagl@ultimaker.com \
    --to=o.schinagl@ultimaker.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=oliver+list@schinagl.nl \
    --cc=oliver@schinagl.nl \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.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).