From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (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 6AD083559CA for ; Sat, 16 May 2026 23:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778974507; cv=none; b=UrLc/IErFSp2FyWK+xydBYpFo0W0WDEPPwI4LGsPyOEqSv96MHw+NR/5tub/vRYdzyPJVs6Q9jtGRda8ayYeqA7pkD+P3ttAPZFbuiVDOc8cdsUa9fwyjMpPEv8jCx+bcqCtnl9Eanttz+XOeropKBwT0991Qps1M1ki6HbMz8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778974507; c=relaxed/simple; bh=cZLAY9u9FlZnFtiU5MVbschagyVZHDauu8/rirWUUrQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cj/xXXeHekwQYZVAhltVQSXvGNaPhJG4znFNEWiDBu+NVexbsSj3vh91NSZjZdY+cdG9cgj3O+x/WSaawkOhqjb8Y4smsZBUtuojVLjId3uLSf6H3VAaxDtIKpfT7Wy2j2hB/HwdEDYVvd/nuzCSeuCD/G3kreL6OFLYh+U8X1I= 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=pZFHroBO; arc=none smtp.client-ip=209.85.160.43 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="pZFHroBO" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-434e69e943bso918897fac.3 for ; Sat, 16 May 2026 16:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1778974503; x=1779579303; 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=RR+I8tSn9ph6Vb00Qgk9jV6LJ7ZGJ5ksY4nEt34vP/4=; b=pZFHroBOs7oOJD1LbeQprCaQj3ipW1VR8ynVs6OuyYPiAeKE5udHF5qfA3SKKoLQH5 HvBOMpgeuYoyUz9C8rfPSwvYOcIqBC5JyzZ0htyI4Zbh36KMNJRRmC44TUCYfZ12KoV5 Jsdk35ANVwG6oYpdNhe2mjlCRSEdmWjdyTAoUp7UYzOGFiUlxzt9s1oSyg3o5FlxpDQF DIx59AEvXsA52WqwpkDUKU7Rll8XPuEUelRPRUG4Qa9ctogH94sNR73Ll7Ru4MbOkwjZ BT4T24+QAVFWVm9SSDNIrEh+oo7oINRUEZwemyvjY5knJOgNdHK2FrrPppfO6HG6vDJr P5Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778974503; x=1779579303; 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=RR+I8tSn9ph6Vb00Qgk9jV6LJ7ZGJ5ksY4nEt34vP/4=; b=d2gckiULuTzDr4VgckQJuAbFfweVeQ4+/97814G86K1b6pifJ15J21Bfj2c9oz5I+/ /W9B+F4ew+qt/yZ3eucfdYLhtZ33xe2SLttqXooum/wcc+3SLIr7HZeoKnV4lLOJdyUE racPWv3bD+QU1Qm7iXMuSf0KmW4whBcpT4mDOWGfpXcf5L42vcvqg68LIPuTnr16UD18 czacXB1fDe8JCKtHqMLozysLy2wiKS3mt6fCZarbYK5tR+1J1+Gj45hcFZei660Q2Oxh lHN7mezBj2ldY22NJAY2bNvySBIoLxRlPswTZL+pqcCPV5nA9hMq3VqKURei5chufiB/ gPpQ== X-Forwarded-Encrypted: i=1; AFNElJ9FqiAfMkwbZR1FYygBPJeruXyHxCGCiw62z/3OHFGxfQ7obvYyQeA9yPl+NXvUNkANtbf5L7+YtilUe8Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yy41rZ2MOwL6ElMazHVe8mJWBXYH1hLo1nlCRPEFQ+jdAK7yn+P xym0YmnqpdNKebpOTNlBoAsx59GZR22LCmjZyC+KhuaPwynqdr5PaPk3tlkpiFXShro= X-Gm-Gg: Acq92OE/ACEt1w7bhtO6rAp8S/qLVDDDzRE1BhDRKKzMt2M6bL4A2WRna0NwqTS2Let 2mEbr2i5JJLLdAqc7ix7S5MIMuZz2VLK7ZMp7X+phuLylqCJHZCmHFri7Y9IdluU50GdmsMJJpC g9x0lPzRhrjFZJjP8tNna1NP1RM+J1WsnYDszlnPajK8PQ/kDLQKbiUVLNnBwr+7XcnlC/82W+A 0ULAm7cc9XepyONG5YxflCmhnTnQjAUVA5zLlSMXFK9KXIUr0hF9Ugay2XP4o92NTKPA2nl4Oec 5jvkKKsFqOLI2lijcyACfRIIkaKvxgjUtSrq3IkKctMnOUGi4g3RbLctu3qY96UfLRLxhwMW/WI 5TK9KWde578EgVhwkx3Ewf4Xq3Au6kE0F+xD0oGuj7YdODmUt+JF6pccxPDR6YrIYBy3Gdd2Ucz k3VaRxjR8erNuXOIGC+JIxVB49zVlTHTTzNpMzxFoZx7xN3fQ4ZGWgiM96AEKNU/kHQwVXu2jam Q== X-Received: by 2002:a05:6870:6492:b0:435:bb5f:5e4c with SMTP id 586e51a60fabf-43a2def7be9mr6229898fac.21.1778974503349; Sat, 16 May 2026 16:35:03 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:b36d:bd18:7c02:29e2? ([2600:8803:e7e4:500:b36d:bd18:7c02:29e2]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-43a957639b2sm198583fac.14.2026.05.16.16.35.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 May 2026 16:35:01 -0700 (PDT) Message-ID: Date: Sat, 16 May 2026 18:35:01 -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 v2] iio: accel: adxl372: Add timestamp to FIFO data To: Md Shofiqul Islam , linux-iio@vger.kernel.org Cc: jic23@kernel.org, lars@metafoo.de, Michael.Hennerich@analog.com, nuno.sa@analog.com, andy@kernel.org, linux-kernel@vger.kernel.org References: <20260516211935.36773-1-shofiqtest@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260516211935.36773-1-shofiqtest@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/16/26 4:19 PM, Md Shofiqul Islam wrote: > The driver pushes FIFO samples using iio_push_to_buffers() which does > not attach a hardware timestamp to the data. Capture a single timestamp > per IRQ with iio_get_time_ns() and reuse it for both the event push and > the FIFO sample loop. > > Use IIO_DECLARE_BUFFER_WITH_TS() for fifo_buf to guarantee the required > s64 alignment, and switch the FIFO push loop to > iio_push_to_buffers_with_ts() which accepts an explicit data size and > timestamp without requiring a separate scan struct or memcpy. > > Add IIO_CHAN_SOFT_TIMESTAMP(3) to the channel spec so the IIO core > enables scan_timestamp and includes the timestamp slot in the buffer. > > Signed-off-by: Md Shofiqul Islam > --- > Changes in v2: > - Use IIO_DECLARE_BUFFER_WITH_TS() + iio_push_to_buffers_with_ts() instead > of a separate scan struct + memcpy, per review from David Lechner > - Add IIO_CHAN_SOFT_TIMESTAMP(3) to channel spec (missing in v1) There was other discussion on v1 that said adding a timestamp channel to FIFO data is not practical since we are receiving multiple data points all at one time. The timestamp will not be accurate other than the last data point in each burst. Did you respond to that? If there is a good reason for it, the commit message should explain that.