From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Lin Subject: Re: Vibrations in input vs. LED was Re: [PATCH v2 0/3] led: ledtrig-transient: add support for hrtimer Date: Thu, 28 Sep 2017 12:22:13 -0700 Message-ID: References: <20170913175400.42744-1-dtwlin@google.com> <20170913202032.GA30844@amd> <9c75c3a9-4123-c7f3-7725-45ba752d672a@gmail.com> <20170914205804.GA24339@amd> <7a611993-ebaa-08bb-b10c-ebe4fb9ca33a@gmail.com> <744568EA-8FEE-4A0E-B431-F054B0827261@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-wr0-f178.google.com ([209.85.128.178]:55385 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbdI1TWp (ORCPT ); Thu, 28 Sep 2017 15:22:45 -0400 Received: by mail-wr0-f178.google.com with SMTP id l39so4484814wrl.12 for ; Thu, 28 Sep 2017 12:22:45 -0700 (PDT) In-Reply-To: <744568EA-8FEE-4A0E-B431-F054B0827261@gmail.com> Sender: linux-leds-owner@vger.kernel.org List-Id: linux-leds@vger.kernel.org To: Dmitry Torokhov Cc: Jacek Anaszewski , Pavel Machek , "linux-input@vger.kernel.org" , Jonathan Corbet , Richard Purdie , Hans de Goede , Greg Kroah-Hartman , Rob Herring , Rom Lemarchand , "linux-doc@vger.kernel.org" , lkml , "linux-leds@vger.kernel.org" On Wed, Sep 27, 2017 at 10:43 PM, Dmitry Torokhov wrote: >>One thing I noticed is that input_ff_create_memless() also does not >>use high-resolution timer hence it also does not have the stop-time >>precision that I'm looking for. > > I'll take patches for high resolution timers in ff memless, they should also help with more accurate scheduling of ramping up and fading of events. Thanks. > >> >>Another thing is that ff_reply duration value is maxed-out at 32767 ms >>(u16) while the Android/userspace requires size long for performing >>long notification alert. >> > > You need unattended vibrations lasting longer than 30 seconds? Anyway, replay.length == 0 means endless IIRC, so you only need to schedule stopping. We still will clean up properly if your process crashes or exits or closes the fd. Yes, it's up to the application to vibrate for as long as it requires. Is there any concern making the duration variable a type long? [If this is getting off-topic, I'll follow up with another email]