Re: [[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 21:42, Bill Gatliff wrote: > Mike Frysinger wrote: >> On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: >>>  #include >>> +#include >> >> if there's going to be a bunch of new pwm related headers, perhaps a >> subdir makes more sense: linux/pwm/xxx > > In general I don't

Re: [[RFC] 3/5] Expunge old Atmel PWMC driver, replacing it with one that conforms to the PWM API

2009-10-19 Thread Bill Gatliff
Mike Frysinger wrote: + ap->clk = clk_get(&pdev->dev, "pwm_clk"); + if (IS_ERR(ap->clk)) { + pr_info("%s: clk_get error %ld\n", + ap->pwm.bus_id, PTR_ERR(ap->clk)); + ret = -ENODEV; + goto err_clk_get; shouldnt it

Re: [[RFC] 1/5] API to consolidate PWM devices behind a common user and kernel interface

2009-10-19 Thread Bill Gatliff
Mike Frysinger wrote: On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: +A generic PWM device framework must accomodate the substantial accommodate Heh, and to think I sometimes get paid to write! :) Similar and redundant feedback [snipped] +synchronize, unsynchronize -- (op

Re: [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin

2009-10-19 Thread Bill Gatliff
Mike Frysinger wrote: On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: --- /dev/null +++ b/drivers/pwm/gpio.c @@ -0,0 +1,318 @@ +#define DEBUG 99 whoops Indeed! + pr_debug("%s:%d start, %lu ticks\n", +dev_name(p->pwm->dev), p->chan, p->duty_ticks);

Re: [[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load

2009-10-19 Thread Bill Gatliff
Mike Frysinger wrote: On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -1,153 +1,167 @@ -/* - * linux/drivers/leds-pwm.c - * - * simple PWM based LED control - * - * Copyright 2009 Luotao Fu @ Pengutronix (l...@pengutronix.de) -

Re: [[RFC] 3/5] Expunge old Atmel PWMC driver, replacing it with one that conforms to the PWM API

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: > --- /dev/null > +++ b/drivers/pwm/atmel-pwm.c > +       const struct atmel_pwm *ap > +               = container_of(p->pwm, struct atmel_pwm, pwm); make a helper ? > +       pr_debug("%s:%d sync_mask %x\n", > +                p->pwm->bus_id, p-

Re: [[RFC] 5/5] Incorporate PWM API code into KBuild

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: > --- a/drivers/Makefile > +++ b/drivers/Makefile > @@ -6,6 +6,8 @@ >  # > >  obj-y                          += gpio/ > +obj-$(CONFIG_GENERIC_PWM)      += pwm/ > + >  obj-$(CONFIG_PCI)              += pci/ spurious new line > --- /dev/null > +++

Re: [[RFC] 1/5] API to consolidate PWM devices behind a common user and kernel interface

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: > +A generic PWM device framework must accomodate the substantial accommodate > +be accomodated by the Generic PWM Device API framework. accommodated > +bus_id -- the plaintext name of the device.  Users will bind to a plain text > +synchroni

Re: [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: > --- /dev/null > +++ b/drivers/pwm/gpio.c > @@ -0,0 +1,318 @@ > +#define DEBUG 99 whoops > +       pr_debug("%s:%d start, %lu ticks\n", > +                dev_name(p->pwm->dev), p->chan, p->duty_ticks); you already have a struct device, so this

Re: [[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load

2009-10-19 Thread Mike Frysinger
On Mon, Oct 19, 2009 at 16:32, Bill Gatliff wrote: > --- a/drivers/leds/leds-pwm.c > +++ b/drivers/leds/leds-pwm.c > @@ -1,153 +1,167 @@ > -/* > - * linux/drivers/leds-pwm.c > - * > - * simple PWM based LED control > - * > - * Copyright 2009 Luotao Fu @ Pengutronix (l...@pengutronix.de) > - * > - *

Re: How to create a git repo on git.kernel.org?

2009-10-19 Thread Bill Gatliff
Bill Gatliff wrote: Guys: How does one go about creating a git tree on git.kernel.org? I'd like to create one there as a public repository for the PWM API stuff, and for a couple of boards that I'd like to get into mainline. Thanks! b.g. Why is it that you don't find the relevant line

Re: How to create a git repo on git.kernel.org?

2009-10-19 Thread Sam Ravnborg
On Mon, Oct 19, 2009 at 03:40:44PM -0500, Bill Gatliff wrote: > Guys: > > > How does one go about creating a git tree on git.kernel.org? I'd like > to create one there as a public repository for the PWM API stuff, and > for a couple of boards that I'd like to get into mainline. Step one is to

How to create a git repo on git.kernel.org?

2009-10-19 Thread Bill Gatliff
Guys: How does one go about creating a git tree on git.kernel.org? I'd like to create one there as a public repository for the PWM API stuff, and for a couple of boards that I'd like to get into mainline. Thanks! b.g. -- Bill Gatliff b...@billgatliff.com -- To unsubscribe from this list:

[[RFC] 0/5] Generic PWM API Proposal

2009-10-19 Thread Bill Gatliff
This patch series extends the existing PWM API into something more generic, and adds support for hotplugging. A driver for the Atmel SAM9263 PWMC peripheral is provided, as well as a "leds-pwm" wedge and an "led-dim" trigger that allow the LED API to take advantage of this new API. The code has

[[RFC] 5/5] Incorporate PWM API code into KBuild

2009-10-19 Thread Bill Gatliff
Signed-off-by: Bill Gatliff --- drivers/Kconfig |2 ++ drivers/Makefile |2 ++ drivers/pwm/Kconfig | 30 ++ drivers/pwm/Makefile |7 +++ 4 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 drivers/pwm/Kconfig create mode

[[RFC] 1/5] API to consolidate PWM devices behind a common user and kernel interface

2009-10-19 Thread Bill Gatliff
Signed-off-by: Bill Gatliff --- Documentation/pwm.txt | 258 ++ drivers/pwm/pwm.c | 692 + include/linux/pwm.h | 179 +++-- 3 files changed, 1109 insertions(+), 20 deletions(-) create mode 100644 Documentation/pwm.

[[RFC] 3/5] Expunge old Atmel PWMC driver, replacing it with one that conforms to the PWM API

2009-10-19 Thread Bill Gatliff
Signed-off-by: Bill Gatliff --- drivers/misc/Makefile|6 +- drivers/misc/atmel_pwm.c | 409 -- drivers/pwm/atmel-pwm.c | 633 ++ 3 files changed, 638 insertions(+), 410 deletions(-) delete mode 100644 drivers/mis

[[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin

2009-10-19 Thread Bill Gatliff
Signed-off-by: Bill Gatliff --- drivers/pwm/gpio.c | 318 1 files changed, 318 insertions(+), 0 deletions(-) create mode 100644 drivers/pwm/gpio.c diff --git a/drivers/pwm/gpio.c b/drivers/pwm/gpio.c new file mode 100644 index 000..35e5

[[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load

2009-10-19 Thread Bill Gatliff
Signed-off-by: Bill Gatliff --- drivers/leds/Kconfig | 32 ++- drivers/leds/Makefile |3 + drivers/leds/leds-pwm.c| 224 +++- drivers/leds/ledtrig-dim.c | 95 +++ include/linux/pwm-led.h| 34 +++ 5 file