From: Thierry Reding <thierry.reding@gmail.com>
To: Naidu Tellapati <naidu.tellapati@gmail.com>
Cc: linux-pwm@vger.kernel.org
Subject: Re: quck help on PDM DAC driver
Date: Mon, 22 Sep 2014 11:48:16 +0200 [thread overview]
Message-ID: <20140922094814.GL1470@ulmo> (raw)
In-Reply-To: <CAC3mp02joXnMME8WWq0jrT5fm5SUMkJ15H_DC3Oaz=y9C_DyCw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Sun, Sep 21, 2014 at 04:15:42PM +0530, Naidu Tellapati wrote:
> Hi Thierry and all,
>
> Many thanks in advance. My name is Naidu Tellapati. I am from India.
>
> The Pulse Density Modulation DAC which we have on our SOC produces a
> form of analogue output according to the relative density of output
> pulses to the intended analogue signal amplitude. The 4 PDM outputs
> are provided that can be used to control targets such as an LCD
> backlight. After going through Linux PWM documentation, I understand
> that our PDM DAC driver does not exactly fit into the Linux PWM
> framework.
>
> The PDM DAC block takes only input clock and a 12 bit value (as input
> pulse) configured in one of the SOC configuration registers as an
> input and based on some simple internal logic, the block produces a
> form of analogue output according to the relative density of output
> pulses to the intended analogue signal amplitude. The PDM DAC block
> won't take duty_cycle as input configuration parameters. Instead it
> takes 12 bit value (input pulse) as a configuration parameter.
What does this 12-bit value represent? It sounds to me like it's exactly
what the duty-cycle is for other devices. And if it's the only parameter
then it seems to me like the device simply has a fixed period.
Both of the above should be possible to do in the current PWM framework.
For example, you could compute the period (in ns) of the PDM based on
the input clock frequency and inter/extrapolate the 12-bit parameter to
range [0..period].
You can also add checks to refuse setting a period in pwm_config() that
doesn't correspond to the fixed period derived from the input clock.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-09-22 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 10:45 quck help on PDM DAC driver Naidu Tellapati
2014-09-22 9:48 ` Thierry Reding [this message]
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=20140922094814.GL1470@ulmo \
--to=thierry.reding@gmail.com \
--cc=linux-pwm@vger.kernel.org \
--cc=naidu.tellapati@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).