From: Shuah Khan <shuahkhan@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: shuahkhan@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
neilb@suse.de, rpurdie@linux.intel.com,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] LEDS-One-Shot-Timer-Trigger-implementation
Date: Mon, 09 Apr 2012 14:20:47 -0600 [thread overview]
Message-ID: <1334002847.2871.26.camel@lorien2> (raw)
In-Reply-To: <20120409184558.GB18542@core.coreip.homeip.net>
On Mon, 2012-04-09 at 11:45 -0700, Dmitry Torokhov wrote:
> On Mon, Apr 09, 2012 at 12:16:05PM -0600, Shuah Khan wrote:
> > On Mon, 2012-04-09 at 10:37 -0700, Dmitry Torokhov wrote:
> > > On Mon, Apr 09, 2012 at 10:55:49AM -0600, Shuah Khan wrote:
> > > > On Sat, 2012-04-07 at 14:56 -0700, Dmitry Torokhov wrote:
> > > > > Hi Shuah,
> > > > >
> > > > > On Sat, Apr 07, 2012 at 08:13:44AM -0600, Shuah Khan wrote:
> > > > > >
> > > > > > > > +This feature will help implement vibrate functionality which requires one
> > > > > > > > +time activation of vibrate mode without a continuous vibrate on/off cycles.
> > > > > > >
> > > > > > > They make vibrating LED? ;)
> > > > > > >
> > > > > > > What's going on here? You're proposing to repurpose the LEDs code to
> > > > > > > drive vibration devices? Or some devices couple a LED with a vibration
> > > > > > > device?
> > > > > >
> > > > > > I owe you filling in the blanks type explanation. Let me describe the
> > > > > > use-case I am trying to address first. Vibrater function on phones is
> > > > > > implemented using PWM pins on SoC or PMIC. When there is no such
> > > > > > hardware present, a software solution is needed. Currently two drivers
> > > > > > timed-gpio and timed-output (under staging/android in Linux 3.3)
> > > > > > together implement the software vibrate feature. The main functionality
> > > > > > it implements is the one time enables of timer to prevent user space
> > > > > > crashes leaving the phone in vibrate mode causing the battery to drain.
> > > > > > leds as it is implemented currently, is not suitable to address this
> > > > > > use-case as it doesn't support one time enables.
> > > > >
> > > > > So why do not you use memoryless force feedback framework that other
> > > > > devices use (see drivers/input/misc/*vibra.c drivers).
> > > > >
> > > >
> > > > Dimitry,
> > > >
> > > > I took a look at these vibra* drivers. The three vibrate drivers are
> > > > chip-set specific. The use-case I have is a non-chip set approach to
> > > > address the use-case when vibrate hardware is not present. Are you
> > > > envisioning a generic approach using ff-memoryless infrastructure?
> > >
> > > Shuah,
> > >
> > > I guess I am confused now. You need some form of hardware to make your
> > > device to vibrate.
> > >
> > > What exactly are you trying to do? Are you trying to:
> > >
> > > 1. activate vibration on devices that can actually do it using LED
> > > interface, or
> > >
> > > 2. use LEDs as an alternative to vibrate on devices that can't
> > > physically vibrate?
> > >
> > > Thanks.
> >
> > What I meant by generic approach is a higher level interface that is not
> > tied too closely to the underlying hardware. Similar to the leds-pwm.c
> > and leds-gpio.c handle gpio and pwm based leds. The vibrate hardware in
> > my sue-case is a gpio based and could pwm based on some phones.
>
> Ok, so you need to add drivers/input/misc/gpio-vibrate.c and pwm-vibrate.c
> and then use FF to activate them. This way we have all vibrate
> implementation use one subsystem instead of splitting between
> input/led/whatever else people could come up with.
>
> Thanks.
>
Dmitry,
It is unfortunate that we have these two infrastructures evolve that has
a lot of overlap. Let me summarize the two alternatives first so we get
a feel for the work involved to address this use-case using ff and leds
frameworks:
Alternative 1: using leds infrastructure
Add new kernel interface to support one time enables. This will enable
existing gpio and pwm drivers to be used to implement vibrate.
Alternative 2: using ff infrastructure
Add new drivers gpio and pwm that use existing one time enable to
implement vibrate in a generic way.
Does this sound right? From a quick glance it sounds like we can get to
the end goal quicker and in a simpler way with Alternative 1. However, I
might be missing longterm view. Any other alternatives we could explore?
-- Shuah
next prev parent reply other threads:[~2012-04-09 20:20 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 19:53 [PATCH RESEND] LEDS-One-Shot-Timer-Trigger-implementation Shuah Khan
2012-04-03 15:06 ` Shuah Khan
2012-04-06 23:53 ` Andrew Morton
2012-04-07 14:13 ` Shuah Khan
2012-04-07 21:56 ` Dmitry Torokhov
2012-04-08 23:42 ` NeilBrown
2012-04-09 0:06 ` Dmitry Torokhov
2012-04-09 22:25 ` NeilBrown
2012-04-10 8:21 ` Dmitry Torokhov
2012-04-09 16:55 ` Shuah Khan
2012-04-09 17:37 ` Dmitry Torokhov
2012-04-09 18:16 ` Shuah Khan
2012-04-09 18:45 ` Dmitry Torokhov
2012-04-09 20:20 ` Shuah Khan [this message]
2012-04-09 20:42 ` Dmitry Torokhov
2012-04-09 22:40 ` Shuah Khan
2012-04-10 7:17 ` Dmitry Torokhov
2012-04-10 18:34 ` Shuah Khan
2012-04-08 23:58 ` NeilBrown
2012-04-10 13:24 ` Richard Purdie
2012-04-10 15:31 ` Shuah Khan
2012-04-11 10:05 ` Richard Purdie
2012-04-11 15:33 ` Shuah Khan
2012-04-15 16:35 ` Shuah Khan
2012-04-15 22:34 ` [PATCH 1/1] leds: add "kickable" LED trigger Jonas Bonn
2012-04-15 22:37 ` Jonas Bonn
2012-04-16 15:28 ` Shuah Khan
2012-04-16 22:33 ` Jonas Bonn
2012-04-16 23:05 ` Shuah Khan
2012-04-20 4:04 ` [PATCH ] leds: add new transient trigger for one shot timer support Shuah Khan
2012-04-20 21:19 ` Andrew Morton
2012-04-20 22:48 ` Shuah Khan
2012-04-21 4:41 ` Jonas Bonn
2012-04-22 23:51 ` Shuah Khan
2012-04-23 1:56 ` NeilBrown
2012-04-23 5:29 ` Jonas Bonn
2012-04-23 5:45 ` NeilBrown
2012-04-23 22:22 ` Shuah Khan
2012-04-25 17:42 ` [PATCH v2] leds: add new transient trigger for one shot timer activation Shuah Khan
2012-04-26 6:02 ` NeilBrown
2012-04-26 14:48 ` Shuah Khan
2012-04-26 23:00 ` Andrew Morton
2012-04-30 20:33 ` [PATCH v3] " Shuah Khan
2012-04-23 5:07 ` [PATCH ] leds: add new transient trigger for one shot timer support Jonas Bonn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334002847.2871.26.camel@lorien2 \
--to=shuahkhan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=rpurdie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.