Re: [RFC 0/6] Proposal for a Generic PWM Device API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 8, 2008 at 22:23, Bill Gatliff wrote:
> Mike Frysinger wrote:
>> On Wed, Oct 8, 2008 at 12:43, Bill Gatliff wrote:
>>> This series proposes a "generic PWM" driver API.
>>
>> seems that the API is solely geared to handle PWM as an output signal.
>
> True.  The peripherals I'm currently targeting are output-only devices, and the
> API reflects that.
>
>>  what about input ?
>
> Well, the SAM9263 has timer/counters that could be used to measure PWM period
> and duty cycle.  But they are a different peripheral entirely.  I haven't done
> an exhaustive survey, but I'm not aware of any PWM-generating hardware that is
> simultaneously PWM-measuring hardware as well.  Seems like they are either one
> or the other.

the Blackfin timers/pwm's can flip between input and ouput based on
the configuration register.  everything else (pin/etc...) is
unchanged.

> Are you proposing that the API accommodate both input and output devices?

i dont think we should preclude it from the outset.

>> all the utility config functions lack "set" in their name.  it's a
>> little confusing as to whether the function is a get or set at first
>> glance.  rather than expecting drivers to poke directly into the
>> structure, a set of "get" functions would work better (even if they're
>> simply #define's that poke into the structure) and line up better with
>> how the GPIO framework operates.
>
> Good point.
>
> Originally, I was thinking along the lines of a set-and-forget use case.  Do you
> use "get" functionality much when generating PWM signals in your applications?

not really, but i see the existing code you've posted could already
utilize some of the "get" functions ...
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux