From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADDFF35CB7F for ; Thu, 7 May 2026 19:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182510; cv=none; b=up3vyXBH5071GX5WX+q5ZUluqi/SUffWxvkfel7hB/UhOCN1Ks1zVMidMuZxhoZAtSCkdNpji/6OC5ggW8tFmS7XXdl9eFmT2hEI+8ADN5iqFyJqhv/QhbLdp7Zbmjh+mwK5LfvJOXRJjrrc24FPtyOGOomAjj/jsTZ0gi6pDb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182510; c=relaxed/simple; bh=vBEzLM5XQIak6owDgRqPlizawuZUvMn3OMKkieaRg4M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WfwZcfh8InyKCLgSB27bCjbOuGNWcTFz16nuM6ecJMMXaKMXs3gbZedEczefRj2UTsJFu/hkIdmw5716G6rJnWPQinosZa/tUpTI1BygXjA8z7BjRyDU9vChDkVUbE/5cNDV3YnXzpMNh4lpYq5vygbxdjkQdSxppu7OTZuUfnQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IKHdNuls; arc=none smtp.client-ip=74.125.82.45 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.b="IKHdNuls" Received: by mail-dl1-f45.google.com with SMTP id a92af1059eb24-12ddbe104ccso1275314c88.0 for ; Thu, 07 May 2026 12:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778182508; x=1778787308; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2iA9OC58ducf2eco+haKVtyt3P1Gj+o2XHcKYZwZT0U=; b=IKHdNuls/zCu6kBV2zYW+IyFXnmMSGBXttU/XWcSlTQV/evvIMF1CP5VZXJRPp9+g8 B4gwSmHyItudgnfABrhvASdQRZWqIYFa/CGm2HZZs4Lre9tLyH36W968TdOdly+VOP3o WduChU6B4+Cq+oeLod5ECW9GAZZEC6+DeeNvajDI9NJJeqYfXRuGkirwAkUt6/qKNcU6 25dpK+PCE4aaCg74fymEyMjR+Umg2CktQm88I4klJ9Qd3xeQlMgjO5mD8XI6sKTxEhuZ J/26Xvt3fBvjvk6lz4dTQ0iJjkYyjXFeeoYzFm02oU2Ce/uXtlsrXucYRoV2DjsuK7SC uoWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778182508; x=1778787308; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2iA9OC58ducf2eco+haKVtyt3P1Gj+o2XHcKYZwZT0U=; b=Jk9Xckf7wEd5fUQuJbF3QX1oL2ES2ywfIN5UAQ+9RAAEzbdA0CYHnU+5hszgY/swGE 2uGigQFyG1QpemvfGUZ0EX/pIwp3S2XamdmdJBJcZdqSxdg+2Gcj3gWt5HVpMVPc8WRC zSoiX3YChec1Fi93lRGv/nTdqb7o/PeowtUO8VNXM4l7FhIprJt8/vH+NDGoygZdhsLO HVNMZzdSFPOH/DOqtsQ0u8Q/aU6ovus6KNnBEfk1DpRAouRHQeSccZ6dJR6XL4HCva9O XWxHaLV3AV22GvMcH99XYjQB+zxGkN35Z4OlSe94H2Wi1tcM0gwhLhedNzbyx55m2+xR 9uEw== X-Forwarded-Encrypted: i=1; AFNElJ/VSOC1bAxImU2nXxSaI8eE42h5h9UkRPRTSL0uIbEkCd77YetB3vnz5aL6Ll74PYUNtyivHb1UKgZVsXY=@vger.kernel.org X-Gm-Message-State: AOJu0YzjusSTEus09yt8E3AJHyGB9eLHJEz3AT83gc+np7ZTFWA6KmuF SjyRyXp755tUiEUaekO2htO2N8aOiOYGVxr8rzn8/98kqxgz1cUiA5IP X-Gm-Gg: AeBDieu6TfL2DExOmDTdzVaozousBfM5+CSLjT4Pru8IrUgu53cuQbwVb73e/kvNPjL tTq200o1ZOSbTLhiN7SpOyEjxD/DtTIOmckq/RhyJxGjuKT3WTsESoa4bPbzbgx7uFbG7TXbEh3 9cAOWVauSXV7vkSg6GItNbqUW5AqpI4zIZZ8HCI5BZPaj4K7Ngl9FDbfnktNGHBgaH/x4bFzOc3 3RRCdonyjwuCfL59oIhe/GFgdrlrFyZkEnqn8pLvKrls2BdKJwUJmFskAVcOKq+SdD7rAXdsdL5 kwSerKMAHZu4KMAX9sW0rYtMsMjLZtmdSs1cA+TUW9YatM8iQLCqsVSEypdm+nFlDCgntyNAscO n6PrwINhO4eGgokso1J80KHLPI0uEaQp4p7F45IyMWWO/Yqck3egr73VYpZuRB82f9p94t41Qip D7+6La8sW3GcePx+dfnzXaQkDP+Bnv0DYO5kRJSHKDCd8KlsjoGdzc0Se0NofUcHdD X-Received: by 2002:a05:7022:6184:b0:130:ac5d:8f69 with SMTP id a92af1059eb24-1318ea1fdd6mr3734735c88.30.1778182507645; Thu, 07 May 2026 12:35:07 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:6a50:9473:7750:56ef]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1326c620538sm400427c88.11.2026.05.07.12.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 12:35:07 -0700 (PDT) Date: Thu, 7 May 2026 12:35:04 -0700 From: Dmitry Torokhov To: Kris Bahnsen Cc: linux-input@vger.kernel.org, Aaro Koskinen , Mark Featherston , Marek Vasut , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: ads7846 - consolidate coordinate filtering logic Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Kris, On Thu, May 07, 2026 at 10:48:57AM -0700, Kris Bahnsen wrote: > On 5/4/26 9:54 PM, Dmitry Torokhov wrote: > > The ads7846 driver has two separate filtering functions, > > ads7846_filter() and ads7846_filter_one(), for the full-duplex and > > half-duplex SPI paths, respectively. > > > > They can be consolidated by extracting the core filtering logic for a > > single command into a helper function, ads7846_filter_cmd(), which > > iterates from l->skip to l->count. The half-duplex setup function is > > updated to set l->skip = l->count - 1 so that the helper only processes > > the last sample, preserving the original half-duplex behavior. > > > > Assisted-by: Gemini:gemini-3.1-pro > > Signed-off-by: Dmitry Torokhov > > --- > > > > Not tested so will appreciate if someone could give it a spin. > > Forgive my ignorance, but I am unsure of the base commit this applies > to and I'm unable to apply it to current HEAD of linux, linux-next, > or your input tree. > > I also am not easily able to test this if it doesn't cleanly apply > to the latest LTS, but will do what I can once I know what other > patches I would need to pull in to our tree. I think if you pull 'next' branch of my tree, then the following patches seem to apply cleanly on 7.0: c68bc840f06c ("Input: ads7846 - restore half-duplex support") 011bdf9f3a9d ("Input: ads7846 - consolidate coordinate filtering logic") I hope they also build ;) c68bc840f06c should appear in linux-next soon too. Thanks. -- Dmitry