From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796154885; b=HjQWoYsFMnBHp8Psy+3BftQN7W4ZhSDj2hd86fenJSbAVnCoNDLevlZmVpTtAEmTdyR/ +7oSbRb1AR7eyTTeM/t3cJ2JfcMfUI81bSaYj0IU8QGutc6Qtzgjy56RaHGb22AQh4zwL pA4y+4fqsC7j0jNMcr/eZq0dnZL1wyrTZQw9Ni2Kf1r78c7PjfMJPVpNRXYeshXNI11Xp 6LJ8Gvz3SOErkuutQPrhZKsk3vzHClQsCxK4rNRrh1lXpanI4xaaKDVZdl7xNqz8NcMNV LwJR799Cc/7cMfqF1PwXoM7JooK9ZgBm/AOXi2MR4ji6h5FPpAK6Jg0lhvlNR7vgREw== 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=2aNYPA6UBXvSlzjk5Hl+KLv5e0ehWJLARpOkFnELurKTee9Fuc44IweoojPIoghzjqbc opEJTHdB5A9EnqGNFNJniFx6WdN6kZDySleS5TlM5ROnEDX5DhN5rhfY5By3YcpW+MD46 v8H/ZO5aYB+nkStUN8f24Znspx6SQ1uOITIaTFJ0FZL+Y529KHY4PpMv4eTQvOLaAa+2D kfy/UG4+3W4KT1+Rj3AMjWrhdF6TfQWIl+HUM9HmvehtudFo83ZrQbE1YqXZ2Z3qgpu9Z RSs6ZjWcnx+Ru9bNwxYxIW8Q1mlQqgZBN6jKTvQhIbVzf5nfXDhAWEs2QNfFLTsJKzg== 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.42 Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42]) (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 6AC91606A329 for ; Tue, 1 Dec 2026 19:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6AC91606A329 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-f42.google.com with SMTP id a92af1059eb24-1b5b93bdc2dso3371631c88.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=wXSf8giXJbDBJrVfRxfj3rgGHPciN6wye8MJ/fEEmrGCHydf5jK9KljAY/XiNbGEkf sqE1X3AwMHFlY9ZFh4f1qkNuR2ghvfsNZCFie6zJws1HVgHKNT6Q8Blyn1AAi347uIhD q7yd//uj6LtnQzh8Izdv0bV09TFyOUfwslyMNaely6ZEfhyD+9Zq+O+48QQkeRrsSmG0 4kAJ5Aph8vs/KuQ4SlJkE5Vw703CZ1NqPCXWiNoqq3AI/t4Z2Wr8N/JHqgnVCMEmLIzr 6atVwGcgigpKG+8lk55vmUYbQRByvKDICayxYBRFaRPA3WXi1h6BrKP0vUHaUCjYkDMP ILsg== X-Forwarded-Encrypted: i=1; AL+hErHd01bF8g1BDJumFtzdVm+zvqMt44rVODXc/IBpXCL9n6ZSnjVAlKW5m+AXJvhxkZA8yfBdJUZICs2T2g==@vger.kernel.org X-Gm-Message-State: APuU4Z+aErBhS3pfAmQa6tUkM/I8WgsQjPg4xfJPzCnaWgaEgQtwlMRt +sh7F7RDMGicjcpCsZaPFEzZfpZWYV02RuGitgj4iuQ+Qve3Hwocex/I X-Gm-Gg: AZFdTZee/Ljh5EdngZxERbfezZYzrnNyv+8q0ynWM2iDLLgiy5ucNdz6NvuItM3Xt37 +xQGckVfuSVavvbXP0YIHnFpSfCbyvJEA8d2yaxn7C9m5PcZzFXInf9g31xh4N6It4y8pXZ4oUo GGrcnylTkJYQId/9wz/tBGnH+0n8VjOmEN1XAr62bFf8SUQFLAUvTcBLZPDoYeXSMMFrWzlUIEm DD+vI2fH7eFMkeM3Yn36WjaaFJM4Ya1MloH9c6YZbtbfqONxxpWk/uiBQHGrUG5hwjC1bzzkQdd pAtcVb2uEhYDishs0iscF0fdir66qKlOjjTyaucYneWWu3TDkzzCVNxliFkTT7n4j6xOThXWRqm Ar86w8z7/MMnPEkBxNa4HSKAFaS7SdP9WcC9K0Im4u6XRi4Q5KJMHDFZguP0ceRvICNz054/CLL oZyCLWHGJqnvDhg/HRADkwcOct/o6wUlaEW57tsUZJfDola/Qd+hqQtYhPlUOaSHyg/5GidSuib mhvGSbtQzngROBH/VZIVou/d+b+I70G/5k3+EiwBh3LUrJSlQOdpcqDjgBV6BE18MsbdnVT//TA qgWwDQqDHbqhaxxy7jz1d5fN8St+yqd/CelHNGWZ1voMzhsIL1oIZAWWEuzBkGEdEbAW 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-input@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