linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: abhilash jindal <jindal.abhilash@gmail.com>
To: linux-arm-msm <linux-arm-msm@vger.kernel.org>
Cc: davidb@codeaurora.org, dwalker@codeaurora.org, bryanh@codeaurora.org
Subject: [BUG] mach-msm/msm_vibrator.c - very long vibration if CPU suspends
Date: Wed, 4 Sep 2013 17:24:50 -0400	[thread overview]
Message-ID: <CADQFcNHf7UPpmPdgVYDNobCixHmZ6qN6G79B6ZQzDyC5fgq7MQ@mail.gmail.com> (raw)

msm_vibrator.c uses hrtimer to switch off the phone vibration as follows-

hrtimer_start(&vibe_timer, ktime_set(value / 1000, (value % 1000) *
1000000), HRTIMER_MODE_REL);

However, hrtimer does not get fired after the CPU suspends. Hence, if
the CPU suspends before the timer gets fired, the phone continues
vibrating until the next time when CPU wakes up causing unnecessary
battery drain (which can be as long as 15 minutes).

IMHO, one way to fix it would be to replace hrtimer by android alarm timer.

Thanks
Abhilash Jindal

             reply	other threads:[~2013-09-04 21:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 21:24 abhilash jindal [this message]
2013-09-11 19:47 ` [BUG] mach-msm/msm_vibrator.c - very long vibration if CPU suspends David Brown
2013-09-12 14:18   ` abhilash jindal

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=CADQFcNHf7UPpmPdgVYDNobCixHmZ6qN6G79B6ZQzDyC5fgq7MQ@mail.gmail.com \
    --to=jindal.abhilash@gmail.com \
    --cc=bryanh@codeaurora.org \
    --cc=davidb@codeaurora.org \
    --cc=dwalker@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).