From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796048681; b=mG7yGoPjBVG+pAenALlJU/hoPECpUmPdKdI4jfzjbt2UWNM3yfdPRiEXZPr6jOagyaHM 65V1Diyhh+5VVUt78o1odPQzTG0PE6HkX6EgOovbfqFEiJW/L2o1n+uMAxDbMo2mgbSWl BMu18u80lxJtp4rc8kyD4QySOhB3fCZhcZgBXIx223sM64d+bHbv8UQ2wfePXR+WNl0zV Wqm3vv6L1FJeWgP+QhO2o0cfHY/nYh5CwvMRnK8JFf5jZfJJr9YMoiBCHX8JobqmXS2jC dGK5ao+fRW36dFWkXhbJSPkP5A/r2BHUqgts3uFyWZ/A+cpsTJNWqemEkGx4MNEZbZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796048681; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=eeYIlvPgUoWVhVgxd6L8TvmDphMOy7gJl1h0U1j4Bfs=; b=gsIxJ9NTU8zm1evpoIwfxtSSgXtXLphF7lAxJFCJNH4GiL2BR3CRJAIS7mdpk7bt7dI0 BPwHLwVkQrXZxKyMlVjNnXkamrxOLmONq8eeDY1fHXAum4F3TowrUf6uGlptNmIPHG0TI nsbwOV8K+dZ8TqTCVR3P2iVmrVPYDKfRYSfqSd+t9Ax9fOzOUCYiAvOTItV+6KOqhth40 5tZ8mWI2SYrxzL/wNLkrRQ3PMgqH+JmWG56TD2U/x/d4fw2kxP156xMLfEqlUqZFQi4TE Z+lQ8DEWEWSdw/XeXiP+mnz9tUgo0bnxegrIAz6NhVVMrN/Bk3+SrcXaen8sZ7xAPzQ== 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=C396Rhr2; arc=none smtp.remote-ip=209.85.221.53 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 1FDC0606A32D for ; Mon, 30 Nov 2026 14:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1FDC0606A32D 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=C396Rhr2 Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4a42b34e930so9344057f8f.2 for ; Mon, 30 Nov 2026 06:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796048679; x=1796653479; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=eeYIlvPgUoWVhVgxd6L8TvmDphMOy7gJl1h0U1j4Bfs=; b=C396Rhr2BkQe6RVrTkQSVPz0dT9o1YKJMDZctOJizvNwS/WoL/HYImnGzWiUfAzIxM SK6mn4hXJHtmgKJISzEHAy3zZrUi1kxRSM7TdCLLD52OVFs/syA+nMJtH1a3CkSAsbgw srkj9qut0JZ+XuMX+c1mWJciHnw+OdjUYp3jW94He1eDvXvHKPkubeneUqsGch+t8ZS/ 1Oj4lD4+fSyCgdw8AAW0dapAHhJXLgbszbG7alQKXR8D0ibpW2OASCb/j5d3i0AY2hF8 dwNKzOx7BTE/bAnpjoQwHaiVbF1f5yDCi8G9r1UDEx4qPHJ6NcLbft6b3ijWocB2NEhn w6Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796048679; x=1796653479; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eeYIlvPgUoWVhVgxd6L8TvmDphMOy7gJl1h0U1j4Bfs=; b=Wd2yZ9pd+7g1iHERxb1o3Jyw6LgzzbLhGARVeSZeV0YaYQeHOEGBtnAXvMKpUxZ2YK vpCmep5RvPfO5xObWYuGFz1RiE825Mxdn1HrMBosRJQX/1CCadLkYwGR1G+2WB9hDG9k 0sIFdWkmW0LuUZ46AgHqu9fYTQPA+tEFSefFLwLFacyq/c3tki1EH748sHI1tGGEZ110 /pRGvBp48pR2yinzVNpuaA03MR9SYWnmNvxi4TgX4ai1DRoTKOHaoLLt/4zYGp8A553P g/xMGwAShJ3surHaKXnkg/yZ9snRlO2E1/PsE7mjRRXkzGrVfNNDzSwOOBC29DHiQUPY jX1g== X-Forwarded-Encrypted: i=1; AL+hErGwPvI+vZdfSGxGvPQ2X8VHM+AbtjXu73tSGDZeZf83CPpS+zl4caiMylXPm4cAtLrQx2EMWFWT7ZU=@vger.kernel.org X-Gm-Message-State: APuU4Z+6PkY520ap7dn01nKxrUwpvgSGEHKXEITZ4Y+Ng9StKT23krA4 l+2tpRuOj/WlA4TG56lPg4pSF5Pf0rsS3OVWRKrfpcJn0JD9ZyJ6p0Hl X-Gm-Gg: AZFdTZeexiqS2LsSFjpL6QEHzoG/8VOiFZ/tdmPanuE4ezgdTBc0sHJAYFNeIKVuvYe xF/tdRm5GcZ9Ccuf8xsSkXaLaLMv6mgL9cS+h1g0HhhFOEyNqF7GnI/Ga25+GFT81InAnBMsN9H gJFlsXVtYd86U/fFGOM8UkcyGH15jVZKeP5nD3rD8mw2zG8uDeNsgVmCH9+JuX+JTEIWgitMykM /u5lEjFAq0+HdIuTRpV9q61vdEz8IVAjff1dQ6Jn3mdxoFWdBVZhkVo1v2N0XGqtSdNDuaQKAYa ZZ5WQaqtuTps2BPtl4W1S790pYW6Etz2H0OMuGNfFUQSQYpKyUv/cOkXLjzDes8QoT5CEcB0dIc lqbrvIVdSeE+fY62ZLgraF9koNS8kzCPUSeuDhB2oPHNCY7qxfb70c8V6nS0kZ4WH0aNa3LY3MX Nj4Zr072NKH/llSW+AlQ6ptHq2CYOaeWEkxm1eGUe36jvO8d9F5b3DZSgWoFnRtiNeKjJMD05DI REfPUbwk9WyInlWwy5BtFZGRN88Yqj+6uuKnBA2gn46MAq6E6DeBfmRciyuIVCiSsZKqY1j3U0p O004c5C58w69LcCT5NC+a28UN3fI4/RinOLcsYtGiA== X-Received: by 2002:a05:6000:4704:b0:491:6a7:b4ac with SMTP id ffacd0b85a97d-4abb5eabd6bmr66754209f8f.56.1796048679259; Mon, 30 Nov 2026 06:24:39 -0800 (PST) Received: from localhost.localdomain ([104.28.180.169]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6c4353d6sm62407055f8f.56.2026.11.30.06.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 06:24:38 -0800 (PST) From: Eli Gavril To: Dipen Patel , Linus Walleij , Bartosz Golaszewski Cc: Kent Gibson , Thierry Reding , Jonathan Hunter , Jonathan Corbet , Shuah Khan , Randy Dunlap , timestamp@lists.linux.dev, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra Date: Mon, 30 Nov 2026 16:24:32 +0200 Message-ID: <20261130142435.1292201-1-eli.gavril@gmail.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit HTE supports the NVIDIA Tegra Generic Timestamping Engine (GTE), but only in the GTE's own counter time, not in CLOCK_REALTIME, so it cannot be used as is to timestamp a GNSS PPS. NVIDIA instead uses its out-of-tree nvpps driver [1], which reads the GTE through HTE but reports through its own character device rather than the GPIO API. This series adds CLOCK_REALTIME timestamps to HTE and the GPIO API. Patch 1 adds a CLOCK_REALTIME-correlated time to struct hte_ts_data, patch 2 fills it in the Tegra194 GTE driver, and patch 3 returns it when user space requests HTE and REALTIME together, which is rejected today. If a separate flag is preferred over combining the two, I can change it. Tested on a Jetson Orin NX with a 1 Hz PPS for one hour, on 6.18 with this series and eba302268a01 ("timekeeping: Provide ktime_get_snapshot_id()"): no pulse was missed, and consecutive intervals differed by at most one 32 ns GTE tick in 91% of cases and by at most 96 ns overall. HTE alone, REALTIME alone and no clock flag behave as before, both there and with gpio-sim in QEMU. The series was developed with an LLM coding assistant (Claude Code, model Claude Opus 5.5), which drafted the code and messages; I reviewed and tested all of it. [1] https://gitlab.com/nvidia/nv-tegra/linux-nv-oot/-/tree/jetson_39.2.2_GA/drivers/nvpps Eli Gavril (3): hte: add CLOCK_REALTIME-correlated timestamp to hte_ts_data hte: tegra194: correlate captured timestamps to CLOCK_REALTIME gpiolib: cdev: report HTE timestamps in the CLOCK_REALTIME domain .../gpio/gpio-v2-get-line-ioctl.rst | 3 ++- drivers/gpio/gpiolib-cdev.c | 21 ++++++++----------- drivers/hte/hte-tegra194.c | 12 ++++++++++- include/linux/hte.h | 3 +++ include/uapi/linux/gpio.h | 4 +++- 5 files changed, 28 insertions(+), 15 deletions(-) base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244 -- 2.43.0