On Friday, February 12, 2010 9:27 AM, Bill Gatliff wrote:
H Hartley Sweeten wrote:
FWIW, the gpiolib API will accept any non-zero value to set a gpio pin
and a zero value to clear the pin.
It makes me sort of cringe to say this, but I'm going to assume that the
API is intended to work
2010/2/12 Stanislav O. Bezzubtsev s...@lvk.cs.msu.su:
The second strange thing is unsigned long name:1. I'm not sure but as far
as I can remember the right way to define several-bits field is int
name:1. But I might be mistaken.
A bitfield of size 1 should not be signed, as there's no space
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)
+
Thursday, February 11, 2010 1:35 PM, 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)
+ gpio_direction_output(gp-gpio, gp-polarity ? 1 : 0);
+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 ?
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)
+
Signed-off-by: Bill Gatliff b...@billgatliff.com
---
drivers/pwm/gpio.c | 307
1 files changed, 307 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