vibrator PWM support

Michael 'Mickey' Lauer mickey at openmoko.org
Sun Sep 9 12:39:08 CEST 2007


Javi Roman wrote:
> I've added PWM support for Neo1973 vibrator driver
> (http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=76).
> Nevertheless this code is not a very good solution, because it's a
> derivated code of gta01_bl.c and the final target is an abstraction of
> PWM timer code (i'm woking on that). Also the suspend code is not ended.

> On the other hand I request feedback because actually I don't know the
> good combination of prescaler+divider+counter value. The code shows
> empirical values, the vibrator works with:

echo 255 >> /sys/class/leds/gta01\:vibrator/brightness (99% duty cycle,
> full power)
echo 128 >> /sys/class/leds/gta01\:vibrator/brightness (50% duty cycle,
> medium power)
echo 0 >> /sys/class/leds/gta01\:vibrator/brightness (0% duty cycle, off power)

> Please let me know what's wrong, or some other kind of feedback.

> BTW, I wonder if it's better to create a new class driver for vibrator
> rather than led class.

Why? That would be a 100% duplicate, since the feature-set is entirely
the same. I'd rather rename the "LED class" "Indicator class" if
people have problems with the slightly misleading name.

Regards,

:M:
-- 
Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de





More information about the openmoko-kernel mailing list