From: KhaiWenTan <khai.wen.tan@linux.intel.com>
To: Rodolfo Giometti <giometti@enneenne.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Thomas Gleixner <tglx@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
david.zage@intel.com, weifeng.voon@intel.com,
hong.aun.looi@intel.com, christopher.s.hall@intel.com,
khai.wen.tan@intel.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: [PATCH 0/4] pps: add Intel Timed I/O PPS input support
Date: Thu, 3 Dec 2026 01:21:54 +0800 [thread overview]
Message-ID: <20261202172254.1188109-1-khai.wen.tan@linux.intel.com> (raw)
Intel Timed I/O (TIO) pins can either generate output edges at a
programmed time or capture input edges, both timestamped in the ART
clock domain. The existing pps_gen_tio driver supports generation only.
This series adds capture support as a PPS client, so an external PPS
signal on a TIO pin can be used as a regular /dev/ppsN source.
Patches 1-2 prepare the existing generator code:
- Patch 1 serializes the PPS generator sysfs callbacks with source
removal using the existing info lock, rejects opens and reports a
hangup after removal, and cleans up when cdev_device_add() fails.
- Patch 2 moves hrtimer_cancel() in pps_gen_tio out of the spinlocked
section, since the timer callback takes the same lock, and serializes
enable, disable and removal with a mutex.
Patch 3 moves ACPI enumeration and register ownership into a new shared
pps_tio platform driver. It creates "generator" and "client" auxiliary
devices, and pps_gen_tio becomes an auxiliary driver. The platform driver
name and the generator's user-visible behavior are unchanged. A new
driver_manages_enabled flag in struct pps_gen_source_info lets the
driver own the enabled state so the generator core cannot overwrite an
asynchronous missed-pulse failure.
Patch 4 adds the pps_tio_client driver. It registers a PPS source per
TIO device, polls the latched timestamp and event counter, converts the
ART timestamp to system time with get_device_system_crosststamp() and
reports the edge as a PPS assert or clear event. Capture is disabled by
default and is controlled per device through two new sysfs attributes,
capture_enable and capture_edge, documented in
Documentation/ABI/testing/sysfs-platform-intel-tio and in
Documentation/driver-api/pps.rst.
Generation and capture are mutually exclusive on a pin. Enabling one
while the other is active fails with -EBUSY. The hardware retains only
the most recent captured edge, so edges arriving between polls are lost;
the driver warns when the event counter shows this has happened.
Voon Weifeng (4):
pps: generators: synchronize sysfs and registration failure
pps: generators: cancel TIO timer outside spinlock
pps: generators: move TIO ownership to auxiliary parent
pps: clients: add Intel TIO PPS capture
.../ABI/testing/sysfs-platform-intel-tio | 24 ++
Documentation/ABI/testing/sysfs-pps-gen-tio | 1 +
Documentation/driver-api/pps.rst | 29 ++
MAINTAINERS | 1 +
drivers/pps/Kconfig | 5 +
drivers/pps/Makefile | 1 +
drivers/pps/clients/Kconfig | 10 +
drivers/pps/clients/Makefile | 1 +
drivers/pps/clients/pps_tio_client.c | 298 ++++++++++++++++++
drivers/pps/generators/Kconfig | 1 +
drivers/pps/generators/pps_gen.c | 27 +-
drivers/pps/generators/pps_gen_tio.c | 283 +++++++----------
drivers/pps/generators/sysfs.c | 27 +-
drivers/pps/pps_tio.c | 167 ++++++++++
drivers/pps/pps_tio.h | 57 ++++
include/linux/pps_gen_kernel.h | 2 +
16 files changed, 757 insertions(+), 177 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-platform-intel-tio
create mode 100644 drivers/pps/clients/pps_tio_client.c
create mode 100644 drivers/pps/pps_tio.c
create mode 100644 drivers/pps/pps_tio.h
--
2.43.0
next reply other threads:[~2026-12-02 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 17:21 KhaiWenTan [this message]
2026-12-02 17:21 ` [PATCH 1/4] pps: generators: synchronize sysfs and registration failure KhaiWenTan
2026-12-02 17:21 ` [PATCH 2/4] pps: generators: cancel TIO timer outside spinlock KhaiWenTan
2026-12-02 17:21 ` [PATCH 3/4] pps: generators: move TIO ownership to auxiliary parent KhaiWenTan
2026-12-02 17:21 ` [PATCH 4/4] pps: clients: add Intel TIO PPS capture KhaiWenTan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202172254.1188109-1-khai.wen.tan@linux.intel.com \
--to=khai.wen.tan@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=christopher.s.hall@intel.com \
--cc=corbet@lwn.net \
--cc=david.zage@intel.com \
--cc=giometti@enneenne.com \
--cc=gregkh@linuxfoundation.org \
--cc=hong.aun.looi@intel.com \
--cc=khai.wen.tan@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=weifeng.voon@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®