From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (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 521D3311C2D for ; Tue, 14 Apr 2026 17:52:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776189173; cv=none; b=l2yewnrdqzKmwWOYE9vCusDb0XtQ/EgAamgDUALp4s+DmiyQbASQOEI5BSa9sfVwXv3DBgJv85YxJQku5Wd8XcIvZqaHlKOvXKMxJpr1grkijAShNBZDQQdcTsgO7DXUmtTw7iBV7KxQN4KeiTTS3+QoTB7NeTmRdilJ18kk/i4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776189173; c=relaxed/simple; bh=REjQkR+edEnkg4p0CQ7AKc+sFxZJARFL3lANqLYf4PU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hnFnZEvAwUvRF9qQ11anIzGOUSkCq2x7rmMCsWWXgQ5bVL0L4G8N+aEsUylah2bqyfl2VtFH+0rGWDhZp2Pf15dSuWqeuR4xtx/EFg9WEbZu7SSGo1xDY/Z/uUtb/JfejO/13JS3hiWEaBymk0V5YFcscxL6tzaRJa/g8MID1lk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=HUxkp/i7; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="HUxkp/i7" Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-7dbca22dbfeso3198477a34.1 for ; Tue, 14 Apr 2026 10:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1776189171; x=1776793971; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9vrhfGgTmoKRpC1hiMmRSSKFyU1STXFQ673v9mh9T58=; b=HUxkp/i7uQ9Xqg15KLYL85NRSc8kANCMC2Ua1ty3pfM8ab46zInb6cxYTbYQ61lOK/ 9C61N3pkWk5laCA4edVRk2W0t3Rs2nLqleJ1EGX7+fdySymSQbC5vdUXBtndu+a3EJoz Ke4Ejp32vGeIViKgHOmaXI7MOFY5JTEYVDtHZWVBTtyc4kPIEO+vv9/TXxDGNIcTnBNA YZow681mNQutjJ6dNwiDK+Jv2cCN5In6xzmPsMW5NZzo7gY30BxhD3jIowwAlg2Xe/OD VYiTRsEg9KQIy5D6beNbl1EL57VXmLmxETzq9FlbYZSLeeA2lZtY93tLQbuYVBTAQexf gX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776189171; x=1776793971; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9vrhfGgTmoKRpC1hiMmRSSKFyU1STXFQ673v9mh9T58=; b=Is6P/QclvbgWHJyczjw4ZtBAkT05uByAj8/4ou5IhBmoi0mI+zbwfy4b9JkCoJcXE2 0uSBBp6pbaQ/cB4+sISlSjH0O/VY9Og9L2pMgFX03ekEWrai+4d0tvLRePhS8jtI/gBh UP9wO7G/5FM4XkyjzJ+Ar3SzkvNCT7xT1RVlo5nD/NLrjz+j+UDNSpE2D9yNcZuNf+k6 pLQavMu076bI/GT5p9ONBodeONCoAHb73J+abubZITIClxlmb8Zv/WJrpTLrfNM3d5TO KMlUMfxtdoOT4ypWqypAQlSOOiQsxoUMLeczv4nEt/DvUWlSeMgHpS92wgkUREMyGRgT 3+4A== X-Forwarded-Encrypted: i=1; AFNElJ/4wwU/+ySg9CJXptE5Mk73Vx4y11E2PrsDrR6ToEjORjmx4phtpbmxsjKy98bzUOqKOdEvlyOZ7qorJrA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+dOFfoqLdpaCdgof1a+qkcIzLfKOZiYTAPijMgsv43gjnA6rP SQjMmWAEA29aM99SNnLEvl50BQynMBbruxnofKzeA/KZJbUdoFCnCvKcz3Zkl6m+MEI= X-Gm-Gg: AeBDiet1QsT7XTRN6/73SlR627o/Zbxj8PICEKrchFzP8nSpfX5LTsJK3QebRT4QPXS TTarGxBSkPPuatyR4rz6RoYrzMjXQ9Ak1PXSos3iTJlX55G2bI/2P9PQjgq8fh1Pefow7cUwFCE mKFRt5XsR9mZHNsMl0K6jREAlSOANYTvkcoGM38zdiKtoblvu1Oa7PGqcGg/SSz/Qj6SoPQm1cj FqUmF4OcyIx6AuewFzE7XQCXpyu27TejRnWGRIH+XZE/OgpoTnv9jxnvixmATRIZYc8NEMInEBu 3sFhnHlB7gnenrVu/3hPqnKGa6Bd1tXRf5JSEevk8WqMjgGKp/g9fqvZQSBzYatbLIer0NjNyO8 i+xMYbtQUPLY/87T4NPgkhmtFE/qODfT/PDQ0Zj94lKIEawdeI0hV3yKUAcI9k5Gn0bHOKqvUbY 8Ru9kq8oa09tYCuJ0yoVMNHsXXWO45iVlIcWO7YNeXGH2hPOIIDE5/BvbwsLr3p2cQE5+A10a30 w== X-Received: by 2002:a05:6830:82e1:b0:7da:557:b9aa with SMTP id 46e09a7af769-7dc27c63d59mr11159411a34.6.1776189171298; Tue, 14 Apr 2026 10:52:51 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:5bfd:a817:5527:c417? ([2600:8803:e7e4:500:5bfd:a817:5527:c417]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7dc265c2c66sm12262179a34.8.2026.04.14.10.52.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Apr 2026 10:52:50 -0700 (PDT) Message-ID: <03ea65e3-4c34-4a20-b638-966abad78d7d@baylibre.com> Date: Tue, 14 Apr 2026 12:52:49 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iio: adc: ti-ads7950: use spi_optimize_message() To: Andy Shevchenko Cc: Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260411-iio-adc-ti-ads7950-spi-optimize-msg-v1-1-617766ef2e38@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/14/26 11:31 AM, Andy Shevchenko wrote: > On Tue, Apr 14, 2026 at 08:29:29AM -0500, David Lechner wrote: >> On 4/14/26 4:54 AM, Andy Shevchenko wrote: >>> On Sat, Apr 11, 2026 at 05:13:33PM -0500, David Lechner wrote: >>>> Use spi_optimize_message() to reduce CPU usage during buffered reads. >>>> >>>> On hardware with support for SPI_CS_WORD, this reduced the CPU usage >>>> of the threaded interrupt by about 5%. On hardware without support, this >>>> should reduce CPU usage even more since it won't have to split the SPI >>>> transfers each time the interrupt handler is called. >>>> >>>> The update_scan_mode callback hand to be moved to the buffer preenable >> >> s/hand/had/ >> >>>> callback since the SPI transfer mode can't be changed after >>>> spi_optimize_message() has been called. (The buffer postenable callback >>>> can't be used because it happens after the trigger is enabled, so the >>>> SPI message needs to be optimized before that.) >>>> >>>> The indent of ti_ads7950_read_raw is changed since there is no longer >>>> anything else in the struct to align with since we removed >>>> ti_ads7950_update_scan_mode. >>> >>> Some of the func() are mentioned w/o parentheses and I got lost which one is >>> which. Also callbacks usually mentioned as .callback() (with a leading dot). >> >> I didn't put () in the last paragraph because I was talking about the function >> pointer, not the function. I guess I missed update_scan_mode() though. > > Then probably spell it as "pointer to func()" ? > >>> The second paragraph doesn't tell me clearly if there is a behaviour change >>> from user perspective. >> >> It is not clear that the difference the user can notice is that there are >> some CPU cycles freed up for other tasks? > > He-he :-) > > I asked more about possible behaviour changes in ABI (note, that [significant] > delays moved around might affect ABI if some user's program times out due to > that). But I think it's not the case here. > No, I don't expect any other changes either.