From: "Mike Frysinger" <vapier.adi@gmail.com>
To: Bill Gatliff <bgat@billgatliff.com>
Cc: linux-embedded@vger.kernel.org
Subject: Re: [RFC 0/6] Proposal for a Generic PWM Device API
Date: Thu, 9 Oct 2008 00:33:48 -0400 [thread overview]
Message-ID: <8bd0f97a0810082133ucd89b0fg6d0d5c92fd31b5b3@mail.gmail.com> (raw)
In-Reply-To: <48ED862D.8000601@billgatliff.com>
On Thu, Oct 9, 2008 at 00:18, Bill Gatliff wrote:
> Mike Frysinger wrote:
>> if you'd seriously play with a Blackfin board, i think we can arrange that
>
> I'd seriously *love* to play with one, but I'm pretty strapped for time for
> another couple of months. The only purpose it would serve near-term would be to
> prove out the input capabilities of a device that I probably wouldn't have time
> to write a driver for. :(
i'll probably look at the Blackfin-pwm core soonish ... we already
implemented a generic framework for it (look for "gptimers"), so it
shouldnt take too much time to transition code for it.
>> while true, hardware that can support PWM as both input/output would
>> suffer from two frameworks. if there's ambiguity in behavior (using
>> "get" in an output mode), then we can just stick it in the
>> documentation and move on. the GPIO framework already has this
>> behavior (set a pin to output and then try and read the data) and i
>> dont recall it ever being an issue there.
>
> Good point. I think I'm sold on the idea now.
>
> We'd need a PWM_CONFIG_<something> to tell the hardware to switch to
> "measurement mode" if such a mode is supported (suggestions for <something>
> welcomed). The config function would return an error if the measurement mode
> wasn't supported by the device. PWM_CONFIG_INPUT and PWM_CONFIG_OUTPUT, perhaps?
only part on Kconfig i think we'll need is each implementation
selecting "GENERIC_PWM_INPUT" and "GENERIC_PWM_OUTPUT". are we
looking towards having multiple master implementations being usable
simultaneously ?
otherwise, i dont think defining things in terms of "generating" and
"measuring" is really needed ... "input" and "output" seems
straightforward enough.
> In output mode, the pwm_get_*() methods would return the driven values if the
> device didn't support a (simultaneous) measurement mode, or cached values if the
> device's configuration registers were write-only. In measurement mode, they'd
> return the measured values.
the current generic core looks like it could handle this easily enough
since we're working with an array of function pointers.
-mike
next prev parent reply other threads:[~2008-10-09 4:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 1/6] [PWM] Generic PWM API implementation Bill Gatliff
[not found] ` <4b5c3aa2b1bc2b7efad834da49c2dec8c0a8726b.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 2/6] [PWM] Changes to existing include/linux/pwm.h to adapt to generic PWM API Bill Gatliff
[not found] ` <88de40673cc33e014928c2ee3a86bdac566021c8.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 3/6] [PWM] Documentation Bill Gatliff
[not found] ` <7b16004ca5f8030184c2de96cbcee38657d56252.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 4/6] [PWM] Driver for Atmel PWMC peripheral Bill Gatliff
[not found] ` <5640f37b779f953c83e79c16b2a0466c0f5da702.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 5/6] [PWM] Install new Atmel PWMC driver in Kconfig, expunge old one Bill Gatliff
[not found] ` <475b4a5985463015fdfa943b9835ab8136dbc06a.1223482372.git.bgat@billgatliff.com>
2008-10-08 16:43 ` [RFC 6/6] [PWM] New LED driver and trigger that use PWM API Bill Gatliff
2008-10-09 5:21 ` [RFC 5/6] [PWM] Install new Atmel PWMC driver in Kconfig, expunge old one Hans-Christian Egtvedt
2008-10-09 12:16 ` Haavard Skinnemoen
2008-10-09 12:17 ` Hans-Christian Egtvedt
2008-10-09 14:04 ` Bill Gatliff
2008-10-09 13:40 ` Bill Gatliff
2008-10-09 13:44 ` Hans-Christian Egtvedt
2008-10-09 8:17 ` [RFC 1/6] [PWM] Generic PWM API implementation Marc Pignat
2008-10-08 19:27 ` [RFC 0/6] Proposal for a Generic PWM Device API Mike Frysinger
2008-10-09 2:23 ` Bill Gatliff
2008-10-09 2:29 ` Bill Gatliff
2008-10-09 2:32 ` Mike Frysinger
2008-10-09 3:46 ` Bill Gatliff
2008-10-09 4:05 ` Mike Frysinger
2008-10-09 4:18 ` Bill Gatliff
2008-10-09 4:33 ` Mike Frysinger [this message]
[not found] ` <1223608819.8157.127.camel@pasglop>
[not found] ` <48EED4D1.2040506@billgatliff.com>
2008-10-10 9:00 ` Geert Uytterhoeven
2008-10-10 9:36 ` Paul Mundt
2008-10-10 9:46 ` David Woodhouse
2008-10-10 13:59 ` Bill Gatliff
2008-10-10 14:03 ` Bill Gatliff
2008-10-10 14:32 ` Haavard Skinnemoen
2008-10-10 17:28 ` Paul Mundt
2008-10-10 19:15 ` Bill Gatliff
2008-10-10 13:59 ` Bill Gatliff
2008-10-10 17:40 ` Paul Mundt
2008-10-10 19:42 ` Bill Gatliff
2008-10-13 7:40 ` Geert Uytterhoeven
2008-10-08 16:43 Bill Gatliff
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=8bd0f97a0810082133ucd89b0fg6d0d5c92fd31b5b3@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=bgat@billgatliff.com \
--cc=linux-embedded@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).