From nobody Thu Oct 2 13:03:53 2025 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (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 9D96B2C11F4 for ; Tue, 16 Sep 2025 21:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758056638; cv=none; b=CMY+dZfe2RWBqf7sE6Qlkn6BbzuUo4Nxe91xMLmxrRMmulKPvhorZKd7cAW5N9ek5aNbjMZqflzRWLNjkIoaT1rnkExToeGnAtl8Zcm+rn0s/bCSAJZP5NTivah9WqKR0xxj+xctOA2+cti6fXxE7BeGLwezy7GYCPWa5D1mUOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758056638; c=relaxed/simple; bh=wrVNbJ1w5ADuZq05WHhPjVQWTKjZ/mM3Cw1wzSvBZ8s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NgBpGR97/I1+yq+4+RRbacUmFMePCcTZEtuZfVqz6keIcwvfORdNylbJ2uh10REFYkXRQBhnm0YHTrnbWortGuSpCuwHL+BIaqGZpw3pkPX5m08K0X2NlNy5fsPiv353XVAA9vxIHs3/eZLM0I672CksMKZfT/SLLsKEfMYrFNk= 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.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=ntkCo8w4; arc=none smtp.client-ip=209.85.167.169 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.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="ntkCo8w4" Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-43d2da52291so132413b6e.1 for ; Tue, 16 Sep 2025 14:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1758056636; x=1758661436; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oSp5lWtmE8MtdrqYa3CeAStdB6Jrz9HF786RtIfTBDo=; b=ntkCo8w4ow3qldtZu3Anh11Na7QOkWgg7WJme4ydukLf9LpsJpGLzC5NoCP3Z3f80H aW+HhFYZGr6UL3H20cKLra0vLgwg958eTyBYhflAuFTd3MJEqcMhmJf+GtT82x/+ZP76 Dwru3+7n4ry7e12Ph/SOfej77cc/hDaaSUINDfaN4DBht+US0jOqWvG1zNRAEy74f6qg 9QWsRJkG9iY4D1EJG0YXt8HJ5pNK+/FkRttyXG7FgEART5RhkWG65FZibwqwEz+OPugX tItTNHmdf5WEWJMbbPU2CeNWKYEOcoHQbG7C+EInQsImTEsV1xEus7oMOZxRKNXzgQE7 mtSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758056636; x=1758661436; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oSp5lWtmE8MtdrqYa3CeAStdB6Jrz9HF786RtIfTBDo=; b=aQhR4M3U3WjJZEfqw8LoXK0SpKsKppaDLLKc5v0SQlCI0E45oTm5SQm+PrBrp6peA7 lrERvq89y5zs+/poksuQKWS1MRDJoXg/F2w41FfvrXNo5hUoKT/PMnY9chHnP8e8wtd3 vgocJ8NgSYLBrpRldvR56Oeuki7mv6g9ZNmkEei7BqMJYcsQqv0xEZ0Ye9DxD4gElK56 VRwbqh9Yiff5Nk9P0wigt/9Z/+AWeUfqaOXdynLhukklCMsXXdb4oT7W35LcuznamQDb AaEmMEgX8QVbkjBBDw5nSBnVaYDIqc7Dx9Qstcrj5v7Otp1lRK0NP1NQL/raHqr1X5Y8 mn/Q== X-Forwarded-Encrypted: i=1; AJvYcCXUYdXB/O2yjPkeJoOjE/4ovaCc8N6IgwhiMucl8vTz7JoTFom6Tkig7hKgOMC/X0T8/W2VuedYLQl2cz4=@vger.kernel.org X-Gm-Message-State: AOJu0YxKrtA2Fqogx+n07f7AqO1WtJKsQInVHmFrVToF0D9d/fUY+XmS wdx5c+dS+tJCPOYE+RQ+VtddmLCyIRFR9mXnaOZ2PEzHkwHtOLUXosL/nlTACedfod4= X-Gm-Gg: ASbGnctjTWXrPHfDArxuggmyHZz5/ltqYj9dpfAFjEmrS2XYOchifnmIV4W+Kxs3Tuo CJ84nhxXfR1v5efEbhoi48EWmE61uBh5cFOCrEb1t3k67QnH3GvvmKIQqjSNn1sw43MvwdNseZE 2b6G+/Gvk5YR4Uq7qI+7vHaTigM6k6HzFk6gT5s/7VvO+djvy2xyQA7Mk7H+a93YaUNvsdqtmTg AA1ieBLD2s563PXjlMDek7+tTO5Bkb/nhqhY5npbK2OKJ890Xw4CR4SfmdH/MVJn569HLwz2RmF gIHVNvKJVFgiaK6UNAZ6djqbIY0DSKLX4wDn6U4+jqQatugFtvmGghNb6jR99qSfQhPUQSjbFum IBRfFOrQ+I4fN3fwzos0sRrsUrYtz X-Google-Smtp-Source: AGHT+IF+JaCGWDofOoORJQjBx+F4h83HBSDGXEndRlsTtYfZYNGTuP3yXZDOBRZvpzOA+qmrL8vr3g== X-Received: by 2002:a05:6808:640e:b0:438:2278:937 with SMTP id 5614622812f47-43d3f31ca51mr1798292b6e.2.1758056635484; Tue, 16 Sep 2025 14:03:55 -0700 (PDT) Received: from [127.0.1.1] ([2600:8803:e7e4:1d00:70a1:e065:6248:ef8b]) by smtp.gmail.com with ESMTPSA id 5614622812f47-43b8294ac06sm3540044b6e.14.2025.09.16.14.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Sep 2025 14:03:55 -0700 (PDT) From: David Lechner Date: Tue, 16 Sep 2025 16:02:53 -0500 Subject: [PATCH v2 3/7] iio: buffer: document iio_push_to_buffers_with_ts() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250916-iio-doc-push-to-buffers-context-v2-3-8b17937a6cc7@baylibre.com> References: <20250916-iio-doc-push-to-buffers-context-v2-0-8b17937a6cc7@baylibre.com> In-Reply-To: <20250916-iio-doc-push-to-buffers-context-v2-0-8b17937a6cc7@baylibre.com> To: Jonathan Cameron , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Lezcano , David Lechner X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1610; i=dlechner@baylibre.com; h=from:subject:message-id; bh=wrVNbJ1w5ADuZq05WHhPjVQWTKjZ/mM3Cw1wzSvBZ8s=; b=owEBbQGS/pANAwAKAcLMIAH/AY/AAcsmYgBoydCTrhrgdvN6kn/QASoGZoLJLV5GCgWirprX9 mLvT+KLZtiJATMEAAEKAB0WIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCaMnQkwAKCRDCzCAB/wGP wB4gB/47StMliExN+2QUM+2gkzFSU+K6kLkNBV2sHi4PhyvML+kO/dwLtQmgt5ZraVKK8SunDW4 wyX1Xgc9bWFbLyGtzoMvXCNysyIZRLWQQ2HFy6qBV4js/CA8KJN4aicjIxtN3osg0UvIpsZ9ec8 sJuOo64VSs/O/PxQTt5puTpgaMnPL475s/0BCpQdGLTITqSPaLQkgrIcFBMv8XghlSN184jOKM+ AjcB1NwUtCLJhfdcKdp5B8HoCc7h9rOfQiyF1Q7xg4uZqxUelTGgX+LJxcG/lc2zJ2HjSlKd4M3 9kgwMHnGs/wcqUonN2bsqVPBLazZA0gHudKHVIB3VbC8FBEF X-Developer-Key: i=dlechner@baylibre.com; a=openpgp; fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03 Document the iio_push_to_buffers_with_ts() function. This is copied and slightly cleaned up from iio_push_to_buffers_with_timestamp(). Signed-off-by: David Lechner --- include/linux/iio/buffer.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h index 5c84ec4a981001dfba3b369f811368bab70a3117..e46b818981aaf473539de5adf4a= afa7e7d675de6 100644 --- a/include/linux/iio/buffer.h +++ b/include/linux/iio/buffer.h @@ -45,6 +45,22 @@ static inline int iio_push_to_buffers_with_timestamp(str= uct iio_dev *indio_dev, return iio_push_to_buffers(indio_dev, data); } =20 +/** + * iio_push_to_buffers_with_ts() - push data and timestamp to buffers + * @indio_dev: iio_dev structure for device. + * @data: Pointer to sample data buffer. + * @data_total_len: The size of @data in bytes. + * @timestamp: Timestamp for the sample data. + * + * Pushes data to the IIO device's buffers. If timestamps are enabled for = the + * device the function will store the supplied timestamp as the last eleme= nt in + * the sample data buffer before pushing it to the device buffers. The sam= ple + * data buffer needs to be large enough to hold the additional timestamp + * (usually the buffer should be at least indio->scan_bytes bytes large). + * + * Context: Any context. + * Return: 0 on success, a negative error code otherwise. + */ static inline int iio_push_to_buffers_with_ts(struct iio_dev *indio_dev, void *data, size_t data_total_len, s64 timestamp) --=20 2.43.0