linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/6] Proposal for a Generic PWM Device API
@ 2008-10-08 16:43 Bill Gatliff
  0 siblings, 0 replies; 34+ messages in thread
From: Bill Gatliff @ 2008-10-08 16:43 UTC (permalink / raw)
  To: linux-embedded; +Cc: Bill Gatliff

This series proposes a "generic PWM" driver API.

This proposed API is motivated by the author's need to support
pluggable devices; a secondary objective is to consolidate the
existing PWM implementations behind an agreeable, consistent,
redundancy-reducing interface.

The code included in this patch draws heavily from the existing PWM
infrastructure and driver for the AT91SAM9263 PWMC.  The author is
grateful to Russell King, Eric Miao, David Brownell and others for
providing such tall "shoulders" to stand upon.  The proposed updates
to that code should not be interpreted as attempts to address
shortcomings, but rather to extend functionality in ways that were not
originally required.

The implementation of the proposed API is structurally similar to the
generic GPIO API, except that the PWM code uses platform bus_id
strings instead of integers to identify devices.  A configuration
structure is also provided, so that the API can be extended in a
source-code-compatible way to accomodate devices with features not
anticipated by the current code.

Pulse width modulated signals are used in an astounding number and
range of applications, and there is no "one true way" of either
realizing them or employing them to accomplish real work.  The current
proposal attempts to provide a useful feature set for the most basic
users, packaged in such a way as to allow the API to be extended in a
backwards-compatible way as new needs are identified.  Some of these
needs have already been identified.

The proposed code has been run-tested on a Cogent CSB737
(AT91SAM9263), mated to a custom circuit that drives multiple DC
motors and sensors.


Feedback is welcome!



b.g.
--
Bill Gatliff
<bgat@billgatliff.com>


==========================================================================

Bill Gatliff (6):
  [PWM] Generic PWM API implementation
  [PWM] Changes to existing pwm.h to adapt to generic PWM API
  [PWM] Documentation
  [PWM] Driver for Atmel PWMC peripheral
  [PWM] Install new Atmel PWMC driver in Kconfig, expunge old one
  [PWM] New LED driver and trigger that use PWM API

 Documentation/pwm.txt      |  258 +++++++++++++++++
 arch/arm/Kconfig           |    2 +
 drivers/Makefile           |    2 +
 drivers/leds/Kconfig       |   21 +-
 drivers/leds/Makefile      |    2 +
 drivers/leds/leds-pwm.c    |  141 ++++++++++
 drivers/leds/ledtrig-dim.c |   95 +++++++
 drivers/misc/Kconfig       |    9 -
 drivers/misc/Makefile      |    1 -
 drivers/misc/atmel_pwm.c   |  409 ---------------------------
 drivers/pwm/Kconfig        |   24 ++
 drivers/pwm/Makefile       |    6 +
 drivers/pwm/atmel-pwm.c    |  631 +++++++++++++++++++++++++++++++++++++++++
 drivers/pwm/pwm.c          |  667 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/pwm-led.h    |   34 +++
 include/linux/pwm.h        |  168 ++++++++++--
 16 files changed, 2023 insertions(+), 447 deletions(-)
 create mode 100644 Documentation/pwm.txt
 create mode 100644 drivers/leds/leds-pwm.c
 create mode 100644 drivers/leds/ledtrig-dim.c
 delete mode 100644 drivers/misc/atmel_pwm.c
 create mode 100644 drivers/pwm/Kconfig
 create mode 100644 drivers/pwm/Makefile
 create mode 100644 drivers/pwm/atmel-pwm.c
 create mode 100644 drivers/pwm/pwm.c
 create mode 100644 include/linux/pwm-led.h

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2008-10-13  7:40 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
     [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

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).