Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-04-02 Thread Bill Gatliff
Guys:

On Wed, Mar 30, 2011 at 7:49 PM, Mike Frysinger vapier@gmail.com wrote:
 On Wed, Mar 30, 2011 at 20:43, Bill Gatliff wrote:
 On Wed, Mar 30, 2011 at 6:57 PM, Mike Frysinger wrote:
 On Sat, Mar 12, 2011 at 23:24, Bill Gatliff wrote:
 +T:     git git://git.billgatliff.com/pwm.git

 $ git clone git://git.billgatliff.com/pwm.git
 Cloning into pwm...
 fatal: The remote end hung up unexpectedly

 I just tried http://git.billgatliff.com/pwm.git, and that's working.
 FWIW.  I don't know why git:// has suddenly stopped working...

 seems to be working, albeit with significantly more overhead.  i guess
 a one-off fetch is fine for now for me to play.

If anyone cares, git://git.billgatliff.com/pwm.git is back up.


b.g.
-- 
Bill Gatliff
b...@billgatliff.com
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-03-30 Thread Mike Frysinger
On Sat, Mar 12, 2011 at 23:24, Bill Gatliff wrote:
 +T:     git git://git.billgatliff.com/pwm.git

$ git clone git://git.billgatliff.com/pwm.git
Cloning into pwm...
fatal: The remote end hung up unexpectedly

:(

why not get an account on kernel.org like everyone else and push your
tree there ?
-mike
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-03-30 Thread Bill Gatliff
Mike:

On Wed, Mar 30, 2011 at 6:57 PM, Mike Frysinger vapier@gmail.com wrote:
 On Sat, Mar 12, 2011 at 23:24, Bill Gatliff wrote:
 +T:     git git://git.billgatliff.com/pwm.git

 $ git clone git://git.billgatliff.com/pwm.git
 Cloning into pwm...
 fatal: The remote end hung up unexpectedly

 :(

 why not get an account on kernel.org like everyone else and push your
 tree there ?

Tried that once, got no response.

I'm open to trying again if you can direct me to the right place.


b.g.
-- 
Bill Gatliff
b...@billgatliff.com
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-03-30 Thread Mike Frysinger
On Wed, Mar 30, 2011 at 20:33, Bill Gatliff wrote:
 On Wed, Mar 30, 2011 at 6:57 PM, Mike Frysinger wrote:
 On Sat, Mar 12, 2011 at 23:24, Bill Gatliff wrote:
 +T:     git git://git.billgatliff.com/pwm.git

 $ git clone git://git.billgatliff.com/pwm.git
 Cloning into pwm...
 fatal: The remote end hung up unexpectedly

 :(

 why not get an account on kernel.org like everyone else and push your
 tree there ?

 Tried that once, got no response.

 I'm open to trying again if you can direct me to the right place.

i used this:
https://accounts.kernel.org/

make sure to mention your PWM framework ?
-mike
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-03-30 Thread Mike Frysinger
On Wed, Mar 30, 2011 at 20:36, Mike Frysinger wrote:
 On Wed, Mar 30, 2011 at 20:33, Bill Gatliff wrote:
 On Wed, Mar 30, 2011 at 6:57 PM, Mike Frysinger wrote:
 On Sat, Mar 12, 2011 at 23:24, Bill Gatliff wrote:
 +T:     git git://git.billgatliff.com/pwm.git

 $ git clone git://git.billgatliff.com/pwm.git
 Cloning into pwm...
 fatal: The remote end hung up unexpectedly

 :(

 why not get an account on kernel.org like everyone else and push your
 tree there ?

 Tried that once, got no response.

 I'm open to trying again if you can direct me to the right place.

 i used this:
 https://accounts.kernel.org/

 make sure to mention your PWM framework ?

in the mean time, you could easily use a free service like
http://repo.or.cz/ ...
-mike
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PWM v8 1/3] PWM: Implement a generic PWM framework

2011-03-17 Thread Lars-Peter Clausen
On 03/13/2011 05:24 AM, Bill Gatliff wrote:
 Updates the existing PWM-related functions to support multiple
 and/or hotplugged PWM devices, and adds a sysfs interface.
 Moves the code to drivers/pwm.
 
 For now, this new code can exist alongside the current PWM
 implementations; the existing implementations will be migrated
 to this new framework as time permits.  Eventually, the current
 PWM implementation will be deprecated and then expunged.
 
 Signed-off-by: Bill Gatliff b...@billgatliff.com
 ---
  Documentation/pwm.txt   |  276 ++
  MAINTAINERS |8 +
  drivers/Kconfig |2 +
  drivers/Makefile|2 +
  drivers/pwm/Kconfig |   10 +
  drivers/pwm/Makefile|4 +
  drivers/pwm/pwm.c   |  594 
 +++
  include/linux/pwm/pwm.h |  140 +++
  8 files changed, 1036 insertions(+), 0 deletions(-)
  create mode 100644 Documentation/pwm.txt
  create mode 100644 drivers/pwm/Kconfig
  create mode 100644 drivers/pwm/Makefile
  create mode 100644 drivers/pwm/pwm.c
  create mode 100644 include/linux/pwm/pwm.h
 
 diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt
 new file mode 100644
 index 000..6a0c95d
 --- /dev/null
 +++ b/Documentation/pwm.txt
 @@ -0,0 +1,276 @@
 +   Generic PWM Device API
 +
 +  February 7, 2011
 +Bill Gatliff
 +b...@billgatliff.com
 +
 +
 +
 +The code in drivers/pwm and include/linux/pwm/ implements an API for
 +applications involving pulse-width-modulation signals.  This document
 +describes how the API implementation facilitates both PWM-generating
 +devices, and users of those devices.
 +
 +
 +Motivation
 +
 +The primary goals for implementing the generic PWM API are to
 +consolidate the various PWM implementations within a consistent and
 +redundancy-reducing framework, and to facilitate the use of
 +hotpluggable PWM devices.
 +
 +Previous PWM-related implementations within the Linux kernel achieved
 +their consistency via cut-and-paste, but did not need to (and didn't)
 +facilitate more than one PWM-generating device within the system---
 +hotplug or otherwise.  The Generic PWM Device API might be most
 +appropriately viewed as an update to those implementations, rather
 +than a complete rewrite.
 +
 +
 +Challenges
 +
 +One of the difficulties in implementing a generic PWM framework is the
 +fact that pulse-width-modulation applications involve real-world
 +signals, which often must be carefully managed to prevent destruction
 +of hardware that is linked to those signals.  A DC motor that
 +experiences a brief interruption in the PWM signal controlling it
 +might destructively overheat; it could suddenly change speed, losing
 +synchronization with a sensor; it could even suddenly change direction
 +or torque, breaking the mechanical device connected to it.
 +
 +(A generic PWM device framework is not directly responsible for
 +preventing the above scenarios: that responsibility lies with the
 +hardware designer, and the application and driver authors.  But it
 +must to the greatest extent possible make it easy to avoid such
 +problems).
 +
 +A generic PWM device framework must accommodate the substantial
 +differences between available PWM-generating hardware devices, without
 +becoming sub-optimal for any of them.
 +
 +Finally, a generic PWM device framework must be relatively
 +lightweight, computationally speaking.  Some PWM users demand
 +high-speed outputs, plus the ability to regulate those outputs
 +quickly.  A device framework must be able to keep up with such
 +hardware, while still leaving time to do real work.
 +
 +The Generic PWM Device API is an attempt to meet all of the above
 +requirements.  At its initial publication, the API was already in use
 +managing small DC motors, sensors and solenoids through a
 +custom-designed, optically-isolated H-bridge driver.
 +
 +
 +Functional Overview
 +
 +The Generic PWM Device API framework is implemented in
 +include/linux/pwm/pwm.h and drivers/pwm/pwm.c.  The functions therein
 +use information from pwm_device and pwm_config structures to invoke
 +services in PWM peripheral device drivers.  Consult
 +drivers/pwm/atmel-pwmc.c for an example driver for the Atmel PWMC
 +peripheral.
 +
 +There are two classes of adopters of the PWM framework:
 +
 +  Users -- those wishing to employ the API merely to produce PWM
 +  signals; once they have identified the appropriate physical output
 +  on the platform in question, they don't care about the details of
 +  the underlying hardware
 +
 +  Driver authors -- those wishing to bind devices that can generate
 +  PWM signals to the Generic PWM Device API, so that the services of
 +  those devices become available to users. Assuming the hardware can
 +  support the needs of a user, driver authors don't care about the
 +  details of the user's application
 +
 +Generally speaking,