Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751554AbdI1TWr (ORCPT ); Thu, 28 Sep 2017 15:22:47 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:52540 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751376AbdI1TWp (ORCPT ); Thu, 28 Sep 2017 15:22:45 -0400 X-Google-Smtp-Source: AOwi7QAp9dOEbDp5q7ZdUeY+CqdjpOSZJy+FLH1prm0sGK9Lv4SH3ZsgU3Lfb+behaLBFgavcWiBzYIn9u2yl1c00pM= MIME-Version: 1.0 In-Reply-To: <744568EA-8FEE-4A0E-B431-F054B0827261@gmail.com> 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> From: David Lin Date: Thu, 28 Sep 2017 12:22:13 -0700 Message-ID: Subject: Re: Vibrations in input vs. LED was Re: [PATCH v2 0/3] led: ledtrig-transient: add support for hrtimer 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 22 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]