From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.19 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796296454; b=vjEC8VzZ7prgW+TJXwd7hSbatmK4EuHeEAFmdQuf51loS+HDz+WUfekRoiW+pUdQS3k9 h7lEnfHTJf8Smh8uVk+huz+VOhalVc5Zds8CyP8xtA24/xtQO+tMfAOJ3FIks3tqG2Pqz wKAKn61LZ7yzPUGcDIejIN4XLllTXKpux/mSQklLoRT5tdbyJzt0zuo8idXfERDj6yLZw VvcfglrDmEtbMVbKUiBlnrOe2+pmSQDiUdJvliihT7vMXjY2e9h/9pUojMNaIh3/Bx04e 01JbV2vzU6KRG3vfyYeVdVfgysGf5QWLoeG3YITYD/traNqmxeixxOU6hdQg30SuOmA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796296454; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=g259e2OOWWTVSO9UcMbRiwWLodQCeF9dAwkLGHwlvnY=; b=PjDESuPuHgMN1Ek5MyTpQMLUxVPE4kcqOg0lbt6tHEF7qvFoXVcBz2bs96WlyJz+cKIf 7FPWFuTz7bye1r5OVnLV3zYvjh80CfwoO5+WI7IEwfdyeu3RYqOQGgNV29mdz/M+w07iI md3++11dIKpZoC8BE2K4Gknt1clhtuWB5BydBOWU9g2nyIV79k/a7DrDjPE4RVO/PITqI LKVuAGoEjqAI94nsfAJ3awXZvUcg7jMKMKRZSuJKPPq5MPTa2u6FO/+ip6Cpg8G5DIqWQ oNRGZFnAJpMkM+4yc5GUw7Hl/k8Ns95tDx9wBmj1h3LpG9bItiUxGAdw+NeAWbjX9vQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=k15WsbzE; arc=none smtp.remote-ip=192.198.163.19 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1943C606A330; Thu, 3 Dec 2026 11:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1943C606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=k15WsbzE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796296455; x=1827832455; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=g259e2OOWWTVSO9UcMbRiwWLodQCeF9dAwkLGHwlvnY=; b=k15WsbzEQFh8MgowY5wuevZknnuxR+z55EfQHTrbnv2cw7qPB197cF0I PV8H2JwGDwDU58mdLW3cmITM+KpAtoH9a7soBAedKTIgKkumm5g1WIPqz 4rBLcqV6VDgBwMemi/9GIBxIsO/Eg+cuCfjrg4veWYe9uN7ZVviRBAMt+ cCclMXwmYALhPSdSg/BSa/VHsQXBJUSjaEhtsdP7G7Xl5os+92bhPCfjT i22p4IZp3zEMmdhh0QAZqhg3E4F/XsX/3Z+HjXZLgn2jBS3HmVnf+vMYY E8P/xUjQzS/2hu2x+VmLPEy11CHItO/fLDq/rwvJWBBw+4vT0D1rgu5GB w==; X-CSE-ConnectionGUID: Z4kZdFBDSnmDUkdmKMJfmg== X-CSE-MsgGUID: jplvz4oiS3i8bMlmwQsMRA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5269405" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5269405" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 03:14:14 -0800 X-CSE-ConnectionGUID: siovGIBlTJm5O0a0bEgQtQ== X-CSE-MsgGUID: 1ZNMUgDuTsag7wIaI7HIEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="14025217" Received: from inaky-mobl1.amr.corp.intel.com (HELO localhost) ([10.245.244.115]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 03:14:10 -0800 Date: Thu, 3 Dec 2026 13:14:08 +0200 From: Andy Shevchenko To: KhaiWenTan Cc: Rodolfo Giometti , Greg Kroah-Hartman , Jonathan Corbet , Thomas Gleixner , 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 Message-ID: References: <20261202172254.1188109-1-khai.wen.tan@linux.intel.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202172254.1188109-1-khai.wen.tan@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo 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