From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796154885; b=g50rHArrhUQAerWkwFdDQxvo/KmtVcHuz7syrD1XHwmvCNIJP7GgHiF4duOZSYEHALLb xiF6PPTqpYir2XtkwYHBRloRjVH3lUJhcjrmx79mbe8KHjApBDDk1JEe9Pt64DSR/7REg rBN6uGY9kp/lJtU9oEiodeXDfKI2f/wl2nvUb8Qh3KKs4SMAspURA51FZkCwfwC8ONJSV HQoJV2minUxEGN1GOYm+glHyHP7IHEsuTpWwwAzvl8kTyIy7b7tzVhGcuWyUCiJxgBEqX S+FbW6ziKFHyAlmnVYoRI/c6XXmDWI0e6lLDE/0xSrzPjftDAbspUpSrRzF/353VsqQ== 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=hSkksdXFrFAWnbRp9EvuX0zPFxQRoeBMspgJXNnh5mKKNp9U0v06IslguWb1a3viB4BR NEcK6VG9JOcZHHpLVjiX14mX1RpLcd+5ciLzJrmjz0+W+ha2NES86HqNL7yi3YyPe4nBN NpVOxR+jU0UxhMYZJHHxE4tdRhpDm1eO+ejH/FaADfihokw7luSI2P/xEhDgZ4ZL+VsEI 1yUGgm8Kr3+mAK5VFrKHGdQZL3igdL2PPkCT/xebTAtDvo5BIYm0ePPUUIlO3NmH+daSw KGSiXrPcqGXYRH3bxkEvF3lujdUUPXdRIQK8LzkXnGZDr0Do8zm7YqrY2vSug1fW7iA== 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.44 Received: from mail-dl1-f44.google.com (mail-dl1-f44.google.com [74.125.82.44]) (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 6812C606A325 for ; Tue, 1 Dec 2026 19:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6812C606A325 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-f44.google.com with SMTP id a92af1059eb24-1b5b93bdc2dso3371632c88.0 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=Vgb3Arl4nlbPYk8s7iUMq6B8TZSgAv3MdEUamXvZwxmzwQxeI2IuCwY/cEzIDP6RxB 8HBLaFeQs5cs2SrB/IlsMMjzNN5/o2B1QF/73OV457ASDJd9MgzVY3bZmbAGQJwe7YxK RKpvUOHkykLQM5wXtFI+1gQ1CyICEO7Ox6D5gdCKk8NCg3EAM/1ZXw2cRSNx0Z0TsJ9u m5fEkR8PNYW1qO7FowKxBinCN4/mddTUW1w9fwPrmYOl/0ORvSK06pzfOnJHD8b5QbQt oYXbAVJ63hojU1iyhA0OWsxJsc1ggBE4Be5TibFUvoOpQltEFF3Gu1dAtujcRKcZ/ihD 0ySw== X-Forwarded-Encrypted: i=1; AL+hErEh7MmF4vbqhVSqNdIbymV0gg362+Uk5tI0BS/FRyif01fQGBwXYbt69QOUFYjuY03LyHuYETOgMehO@vger.kernel.org X-Gm-Message-State: APuU4Z8TjVESqYVTpmv4xWawVlHz6h6legLwbXUr7pSBnAQgQWIR9tOR tqqWsuRtsgiggN7uGOvanP9L/0FlV/UznIr1ydxCY/uoUzY6utbo1uub X-Gm-Gg: AZFdTZfgvPYNKtBnSj8YIOtLs7ppY9mM3Cta4drNl1a34NeeP2keZqhdUwZxi7n1Lgm It2bEkd8R4meVl3RenMDAV+m5Y27LHv0sf/8lsKAEbLrJ8EcFBMIVtz5DRc4bIPqjHyyAZptFC4 8SRwAJVkEMeESIzUNMaYoAPe6AvjygE+gHqN5W4CvQlw7vRm8RBw22viHigsUGc9c18tIWudQYV xj0sqA+4KKxbBozzrF0KeFITxaNkyhStuitjG8oA9pMglC0CochYlfK8buN0m60IUXObnuBEITn qJA/iYqgNd0J/I1Y5QbPeAsdSpkAEaNFMq40zGlaHP8GxjcWikrjkBWDisivdcLCShRXmXpQLDN VWqxqq3fqzEgdjpvilEI+wgn3wW1gYYH+Hwud+ix/3Cm95bvgj28bu3D1ISvPYE4HkpIMDgaykX ggSEkIlaKxnWs15dXRvl8ZGB1DWFRdyYsWsxP4wushaPghVxyG4Tc8NkH0Vl04imgjj3NaL/K+9 BgVwgq7XxuBnny/zSgDmqEpukrsiiIruf4OS/oqedWIT09DkiSfY8JZ6ZOshBg90wH73fzPSavZ M8KiyI7Fq1ZN9a4mx3ECBqivF3hoHhzcOjK+cCMR73Ha3NSWRBBQktruLbxRNZDy98ho 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: devicetree@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