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

2010-02-11 Thread Pavel Machek
Hi! +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

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

2010-02-11 Thread Pavel Machek
+static void +gpio_pwm_work (struct work_struct *work) +{ + struct gpio_pwm *gp = container_of(work, struct gpio_pwm, work); + + if (gp-active) + gpio_direction_output(gp-gpio, gp-polarity ? 1 : 0); + else + gpio_direction_output(gp-gpio, gp-polarity ?

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

2010-02-11 Thread Bill Gatliff
Pavel Machek wrote: Exactly; if your hw can be damaged by software, it was misdesigned. Is the paragraph #1 really neccessary? It provides a little background on the subject matter. I don't think it's mandatory, but I don't see the harm in keeping it. I think it improves the document

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

2010-02-11 Thread Pavel Machek
+pwm_free() -- Marks a PWM channel as no longer in use. The PWM device +is stopped before it is released by the API. free is normally used for something else. Rename to open/close? ... or request/release? Works for me. +pwm_start(), pwm_stop() -- Turns the PWM signal on and

Re: [PATCH 03/11] readahead: bump up the default readahead size

2010-02-11 Thread Matt Mackall
On Mon, 2010-02-08 at 21:46 +0800, Wu Fengguang wrote: Chris, Firstly inform the linux-embedded maintainers :) I think it's a good suggestion to add a config option (CONFIG_READAHEAD_SIZE). Will update the patch.. I don't have a strong opinion here beyond the nagging feeling that we

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

2010-02-11 Thread Stanislav O. Bezzubtsev
11.02.2010, в 23:58, Pavel Machek написал(а): On Thu 2010-02-11 14:35:14, Bill Gatliff wrote: Pavel Machek wrote: +static void +gpio_pwm_work (struct work_struct *work) +{ + struct gpio_pwm *gp = container_of(work, struct gpio_pwm, work); + + if (gp-active) +