From: Gordon Hollingworth <gordon@raspberrypi.org>
To: "linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>
Subject: PWM DMA interface
Date: Mon, 9 Jun 2014 10:49:46 +0000 [thread overview]
Message-ID: <CFBB4FD9.4313A%gordon@raspberrypi.org> (raw)
Hi,
I've been writing a driver that uses the PWM to talk to devices that
communicate through a pwm like signal. To achieve this some devices have
a dma interface that you can stream data at to the pwm...
We use something similar to this on Raspberry Pi to do audio output, we
use the PWM interface to output a 'stream' of audio data which is
subsequently filtered (RC filter) to give an audio output.
I was hoping to create a driver that was suitably upstreamable and thought
about implementing within the world of the pwm class (and was coming here
to ask for guidance). Basically I was thinking about implementing it in
as an extension of the pwm class:
Add parameter to config() to enable dma access, this will then create a
suitable /dev/pwm_dma0 etc. interface to write data to
Only issue is we have a number of parameters / modes we'd like to support
that are likely to be platform specific rather than general:
1) Ability to switch between three different modes:
A) serial mode (where the output is actually just a serialisation of the
fifo data.)
B) two formats of mark space ratio, giving a standard duty cycle or a
distributed mark space
2) Ability to set a 'silence value' i.e. what value you transmit when the
fifo runs dry
Whats your take on it? In the end if not I'll implement a pwm_dma driver
as a platform device specific to the 2835 device
Thanks
Gordon
--
Director of Engineering, Raspberry Pi (Trading) Limited
T: +44 (0) 1223 322633
M: +44 (0) 7450 946289
E: gordon@raspberrypi.org
W: www.raspberrypi.org
next reply other threads:[~2014-06-09 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 10:49 Gordon Hollingworth [this message]
2014-06-17 22:54 ` PWM DMA interface Thierry Reding
2014-06-18 8:20 ` Gordon Hollingworth
2014-06-18 22:12 ` Thierry Reding
2014-06-19 15:12 ` Gordon Hollingworth
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=CFBB4FD9.4313A%gordon@raspberrypi.org \
--to=gordon@raspberrypi.org \
--cc=linux-pwm@vger.kernel.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).