From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796154885; b=aVxxicnWuvl4VjVpZA+WCd3gW4n5If7A3ggwCOuMOSyOQvOONf92r3AaZmqbTaWgtDHJ 3GYwfW0o+LhgreoQwrB5XS6H4eij7oEWWsz5q+J9CnxEKzda9TMkVJlDgzkHBB5J26WdB i92fIBDr0EDYhG32FPqX0lB+GTLcQ6lWSU3q2zaYS8Gn/5gjFwTs18LY2F8/L3AFC7YtD Lnjv8A3Jj86A9xmhm4qopr7NCHtB7enWpJcxxOrQ0Jl/yVyzHp6qiTK8H9xo2EG9OY6W4 IGeS/xoUljIkicB83HEGB+x+XtrCiy4Tt1H6zrLjRaSLLUXpoeZkErVYybp0YkWbYgg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796154885; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding: Content-Disposition; bh=KurDznjFDKWobbjn5O8kzlLersfyILSvIbP9rEI0hvA=; b=lR5+92kTzTQech8MCV8XxEn/Lg+EWYrKmEVWOAZ49BdSCfELODVVFu0jEUGjzY6le3/P dLwlXYjygFq4JKJx/ATvwcs5Gqg+LG8YGWQbUW6JW8dG0OB0A8527XNQjiE7zVjbLhbhU ZNMC3pvWy36YmmhyrlKqk3mbUs9Aav27FyHhV5/kkZqobfBr4QB5Ba6oUb7mMpoXQll7J UhAODkGTcEXNO/W2N3Dog78VnKe30P3QhZer5uBT212WHrbm+qnfW/vo/ZwZlXuqxePWC LuoK/s7/u4kuF/2cULWJGf9W7lpQSzQ1ZpDDisxYL0nvUqSBwdKPAk2hUIa8Fr36MWA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dhRdj5PF; arc=none smtp.remote-ip=74.125.82.49 Received: from mail-dl1-f49.google.com (mail-dl1-f49.google.com [74.125.82.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6711C606A322 for ; Tue, 1 Dec 2026 19:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6711C606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dhRdj5PF Received: by mail-dl1-f49.google.com with SMTP id a92af1059eb24-1b59e19b33bso1306952c88.1 for ; Tue, 01 Dec 2026 11:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796154884; x=1796759684; darn=vger.kernel.org; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=KurDznjFDKWobbjn5O8kzlLersfyILSvIbP9rEI0hvA=; b=dhRdj5PFCWwhYXLuff3ufe9rnLdcFuJVBQ7bulC35rIJjxGzhVSatilohSHBhqy10U v5CW1970JzxlIGGsuhtVr7hbY5uX9IHmMwgLH47kknnZeMUqY9PFqGHA0TNn4CL6L5ov boNjp/WAgtwmKFgXUxRb6mDgp5a8KDXLl+wEXcKPf0PUWHvFbuqDL6sknkEwGn0LFXPB 1Kx3wNGx79Hdj8G88jCqlVQOjZzTw+5GpY8gatDinePROrubP57+oAPrY4Y2nUFvO56N 4NYKEkpGrcpefACmSD2945vQS/hxyOn1Z6Rh3PXvUcofNKBMS0qaD8CxE0EH6lTQM0Wt 47SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796154884; x=1796759684; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=KurDznjFDKWobbjn5O8kzlLersfyILSvIbP9rEI0hvA=; b=gFDG7MnrwuNAZ8xD2MIdNFfkiSf88kKIlVdvkGccs4clF+PsZzyWcpf0vMBqE2pabO PxJYb0LNElmqaA/GL/JjZJ+ammLoZoRfQHndGwdNo4TwFuU0eQWtLcxndOSgI0J0Ojim HTAB6Pp8/4t3FQaUeSapEHz/JOK/Nocp+YhFjRVO73eN60G5C2klG0d6DLcJ7cggIjbX w34cOTiGx34Y2QhwIMkINcM0mLKPLrlTz5KiHV+gosPt6QirmIszNFIP6Y4FR5us/nKw efNEWCNd6rj+4GR8GxuvNUuBl91mWAHtKIo34589yujMpVsnF3VXcoNGCAVYO3E/g/td DSkA== X-Forwarded-Encrypted: i=1; AL+hErF1Jp7jd1Qo+LYYgOQk72chNmuatgaq0TLrbK9xoDIW+QRay0tJz0pvobv51S3h8wi4o5pUgB2bJH1DKJg=@vger.kernel.org X-Gm-Message-State: APuU4Z8jeZhbqRCQL6PEwaxXCWVk5EXSZueZIhYSu2Vg0vmam9qKN5se ZlPXxo5BZF1lPNP/DWK4+dokHDaslUq1jxkDs7jLSCgxBNOLJAGwcV9n X-Gm-Gg: AZFdTZdU72a5o9dcQ40kYyCP+nSKoos/pt2ceZ1yYQKzjMFwtlIINO3Tv/f8ysg1FqU AJM1+JUwo5woxpg1x3uYaC4/XYFtHbn3ecOsza71EfBdVXDpPus+yvdPaS5QHR4tVynXplw/Gbv FtupXT8Yd4lVt218MzHwzlBhWzcUSDa6YG1mBuygDs9M+KYpH+sUr1FksJFM4eHNu0FSX2BQ7oN 2WsSUKEjHzuGa7Featn7Xhqw52eQ/cCVFMH1oHdQy6QHUqRn3yZi7Zo+Ibq8K6X2dQNOYr4rOzV UXiZJSGvEE7MzMGw4WZU4l7527ePSgB5vZ5vtyp61i8zYDUPWaP0J3ZmstEZe1IvlXnPDrecxGl zCFNnlmHRChXhl75mEXY5o3RM6cR/x+gXC2U3lEpL81fI4LuVKPgauC3HCCmF+NErVHgTec2FL2 e1kSIAiXl6RG7cNwOO6QG7oDd5Cttl8Od76GCnK448YAr2EfOrJ4gZR1TGnx1aLyTCtKjbO4Hq0 5FtODt8AFCGi1e6yQmBNVdSAJoLVZ9hq44ociMNowd32qNh4bfjer0LiRATQ59LlaTLSr2amGxR ie2nwHTr3vkXGHcj1x6HDD4d+OepzqinW54MeiKdHNvFJvYHZTrjT1vBpx6X4dSgN70a X-Received: by 2002:a05:7022:698b:b0:168:3243:c91a with SMTP id a92af1059eb24-1b556865248mr52554872c88.13.1796154884360; Tue, 01 Dec 2026 11:54:44 -0800 (PST) Received: from localhost ([2a00:79e0:2ebe:8:2b2:524a:9b40:57c6]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55684c85fsm137014709c88.14.2026.12.01.11.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 11:54:43 -0800 (PST) Date: Tue, 01 Dec 2026 11:54:42 -0800 Message-ID: From: Dmitry Torokhov To: David Heidelberg Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Subbaraman Narayanamurthy , Kamal Wadhwa , Fenglin Wu , Casey Connolly , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mfd@lists.linux.dev, phone-devel@vger.kernel.org Subject: Re: [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver In-Reply-To: References: <20261130-qcom-pmi8998-haptics-v8-0-a64ecd72d3bb@ixit.cz> <20261130-qcom-pmi8998-haptics-v8-3-a64ecd72d3bb@ixit.cz> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Dec 01, 2026 at 10:57:47AM +0100, David Heidelberg wrote: > On 01/12/2026 05:48, Dmitry Torokhov wrote: > > The biggest issue here is that the driver grew to over 2000 lines mostly > > because it uses input_ff_create() and implements its own asynchronous FF > > scheduler (effect array, request queue, spinlock, and multiple work > > items). Since this hardware has no autonomous effect memory or replay > > timer, please switch to input_ff_create_memless() like the other > > vibrator drivers in drivers/input/misc/. That gives proper handling of > > replay.delay, repeat counts, FF_GAIN, envelopes, and effect combining, > > avoids hand-rolling partial FF_SINE and FF_CONSTANT support, and drops > > the custom queue and work races (including the work()/erase() race > > Sashiko pointed out). > > Hi Dmitry. > > What about our waveform buffer the HW has, I wouldn't be able to utilize it with > ff-memless, if I'm correct. While I currently dislike the extra complexity, the > problem why I went with this approach was mostly because ff-memless couldn't do > much. Right, the question is if we actually need to support this unless we agree on and document what custom waveform means and whether there are real users of it. If not, then I do not think it makes sense to keep the custom effect scheduler that is also limited. Also, why do we need qcom,play-mode in DT at all if the hardware can switch modes per effect? Are there boards that can't use direct mode for normal effects? > > > > > As a heads up, I am looking into reworking the FF core and ff-memless to > > better handle suspend, resume, and "slow" (sleepable) memoryless > > devices. There is no need to wait on that work, though: a slim driver > > built on the existing input_ff_create_memless() with a single > > work_struct will be straightforward to adapt once those changes land. > > If I go for the memless, are there planned at least some changes to, f.e. use > the waveform buffers, e.g. opposite of memless? No, my changes are only about suspend/resume and sleepable playback for memoryless devices which should simplify this driver quite a bit. If we really need to support FF_CUSTOM then we'll have to stay with input_ff_create() (or move over to it at a later time). Thanks. -- Dmitry