[Ce-android-mainline] timed gpio and timed output drivers

NeilBrown neilb at suse.de
Mon Feb 27 23:43:15 UTC 2012


On Mon, 27 Feb 2012 13:51:07 -0800 Colin Cross <ccross at android.com> wrote:

> On Mon, Feb 27, 2012 at 7:26 AM, Shuah Khan <shuahkhan at gmail.com> wrote:
> > I saw a timed_gpio patch come through on lkml. Looks like this driver
> > is being used and patched.  Could somebody from Andorid team comment
> > on the need for a special driver instead of using leds.
> 
> It has been used in the past for vibrator control.  The main feature
> it provides vs. leds is one shot timed enables, which prevents a
> userspace crash from leaving the vibrator on, which would kill the
> battery very quickly.  Plus, putting the vibrator in /sys/class/leds
> is counterintuitive.

Adding a one-shot trigger to 'leds' would probably be welcome and would make
leds completely usable.

The 'counter-intuitive' aspect is unfortunate.  With hind-sight, 'leds'
probably wasn't the best name.  It might be possible to create a more generic
name while using the same code???

> 
> It hasn't been used as much recently as more vibrators end up
> connected to PWM pins, on the SoC or PMIC, with custom apis.

"custom apis" is unfortunate.  LEDs can be driver by PWM pins too, no matter
where they are.
It would be nice if we had a uniform interface for all vibrators....

(it also bothers me that that LED that back-lights my display is presented as
a 'backlight' driver and not a 'led' driver.. It probably makes some sense,
but it seems inelegant).

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/ce-android-mainline/attachments/20120228/5efc3a6c/attachment.sig>


More information about the Ce-android-mainline mailing list