From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796154885; b=glWakpHNzGLrMVO6PuWb69W+6OxbCXSq5nD6qFUmWKW4pgYHqAgfTEvNOmwD6urSFAqC liEfbEizy7cC+sFfciqch0enCiqNRz+/YyjHZNSqsUXq4V5NX26AZCu+ZZWTkBlk+lOxh p2PbAwbYpBU2PpK+fAIyO+9lqKORy9Yzvj7/FlKBdkEyQ/nqD+JJHEP6Rg5RyWMfMYWQg Txnw4dtKnwdU0Zf5iqmOm4LcQRcbcYUSR5T7q+heSiZ9uDLcnV0t3rvE2u3fw76/1ijOB fMo5PySOj8L6D0j4OLS2EwlnfF/KEGvbCflNj0KuhoKpN95uhx2yS61bFDs0KjDxRJg== 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=jZuflSCDnfqo1vlLRslKpwnkQZ8vuRaY8Gj8EtihwzmkBRdoYYIpYKrjCO++C2I8j1e7 wA88xDZg1KPlOr7bIXZgiK4zqS374dZ1a0gIvDs9U9IxYoVb3ocecP0ZQYcZxgKZdLaMk QAiLkizvxlzjT01+xA9p9XVpM47V+et2qep8CKW/W1iPxq6m04wE89kPVYP3zorXuIxpc 1OHgoANfiMaIpIj023ixCsdUd5X29JelpnJH4Y3N0FPPycDdmbJr0KE0Fcpgqjmt4i61P SC6dSppabhxNYtlCifSpnXoFqpKb+o6aaYcQpbWxiCY9JRFSGOX0CsleClCp0ZOcZVA== 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.41 Received: from mail-dl1-f41.google.com (mail-dl1-f41.google.com [74.125.82.41]) (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 5E12A606A31A for ; Tue, 1 Dec 2026 19:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5E12A606A31A 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-f41.google.com with SMTP id a92af1059eb24-1b5b93bdc2dso3371635c88.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=PxUg4t841hY5EJY6Xm9QYmMNjVMfoeBSkFyYvM4VgOCEdKrgHBVhOxKPfktVLp6WSL oEXfqw481TAWWSGJMUdHQfV1QRa/ZLXPosRKfAcba6kSP+uJ9GrzcNBNMJcoUiDffxTr 5Welh0WK0iQ8bjzDgftKZCKv1eNYDBtHtW3OnV3AsR2I8wu16YtX50LDAeXu5ghWM2o2 0Vk5jkBtJXuz7k2L5JW3k1u1COOsGxcw54O8+R7UsnahHV1lDxVkRPgcUYeTnc4pMIxy GsaSfdf7kWtyrA87tarB1yw7D5wWX2OBbRAw8H5RuAFbn/lEETwTN+C2ZKy8+x/vQuQD MI6A== X-Forwarded-Encrypted: i=1; AL+hErGKv5q5Q83uhdzrAiqWPUF98LZdPYPwlMSFl3Q3k3hnUDCChxEDiQoVo1lliacDEOXufrPbjs6eQ8OwbE2T@vger.kernel.org X-Gm-Message-State: APuU4Z8DTUDXW9kwAufkKbk8S8Gg5SSejsauAJiKUECRLmGAr+MIEkpz SKxj2Uu7bogV7pcsbO7+wRRgFKbx5rfEH6kCsjsfhruIuuUgsLaGg9Hv X-Gm-Gg: AZFdTZeSjYsoLDDBrKRTtL5gEXs56O87EtAq6hlMxNNcAVn92xshb4bp3FwDcBXxo/+ l81fksa5bALw9v2BCPsBGbgVENHBOlhbCO6gm8wvEzLMSjLft/Gcq4aeSEIHBW/CoGr7YDPvUh4 OeFjBF1dk3cIwCYmHFi7r8YC+NYkPr2oE1m1iLW3MpLuG44tQyH+VVeJBfv7UtTIG3XG/h5LTeN KnhN2hHA2Er45ZPGqBbiFlXicQYSOfD03PaoXeMMuL/gfAfZVhIWuSeE/TbpxbtjP4YdJ0xauQu txkXuRjL1IEZal2c8GGgMnDj91zUA4twsq693H6g3rTIuYx75DlDw64ZcRp2xOlo8a5cIr4zA0Z d5iUB4wP5u6LHGL5bTqn4FvtPq8HSowWoEIdGps5iFv+nzXGrh/L+L42epvEJP52rv5hC0LfU2u K8dQWXzL5KhjUJyP8UeT12EsWxQTD5roYLsRdTZkT8tIPRMUq7Ll9sLDWvYzjo7PenQy8ziyU0q Xa+O93QvMbn75mJ2F5o7VcjRA0mPyogrN7VFThosHM6cMdutRTzYUkdfk38Xn8zoo+GiRdadcdc mrl2mL58iOzPWHU85JEJBjFM39qouDdmWQsRuWQQdQQgzF6FBy0pVTIErwMtL8Y35ckr 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-arm-msm@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