From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: KhaiWenTan <khai.wen.tan@linux.intel.com>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@kernel.org>,
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: Re: [PATCH 0/4] pps: add Intel Timed I/O PPS input support
Date: Thu, 3 Dec 2026 13:14:08 +0200 [thread overview]
Message-ID: <axFPAHmejQCRPzcu@ashevche-desk.local> (raw)
In-Reply-To: <20261202172254.1188109-1-khai.wen.tan@linux.intel.com>
On Thu, Dec 03, 2026 at 01:21:54AM +0800, KhaiWenTan wrote:
> 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.
We need some synchronisation between teems internally, please hold on on
this series.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-12-03 11:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 17:21 KhaiWenTan
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
2026-12-03 11:14 ` Andy Shevchenko [this message]
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=axFPAHmejQCRPzcu@ashevche-desk.local \
--to=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=khai.wen.tan@linux.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®