From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 C21F636D513 for ; Sat, 27 Jun 2026 20:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782593673; cv=none; b=m3N2l+u25XwKJY/OjuD1Q5m3XCL2M9H8qKadj8YKbqPZNw9wH0qso8y1yf5DHidqPV8tBCRMtiHr+cl8tiaQ7VnH+HGZKkKhw10cYERBksMjdJW/h9SUS2UCVIWq1u2DqlBDwH2dJMucjS73p+HFVQ5Coi+LkvrbnWbf6w0yc7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782593673; c=relaxed/simple; bh=YtKvmEBf3XN9Xv6lLG7CeOeRpIi4HSNY4gNJ+1N1DJs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xgbcmn+Tuc75KwRwYy6WOkZ3HW+/+Y08zin+eDVT24Z3B/YfoqYjbVloDCG+AGbz174/O0LfZ426Uv1Roqt60kABugiHFQRTTO0Jaj44BzvuV0oJMt+YPYPngTjrC0scShqjWYwW1KjPCSvNBas6l9YkS3cKCPLz8hwmmWuP2/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DXZ37zbx; arc=none smtp.client-ip=74.125.82.182 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.b="DXZ37zbx" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-30b9e755555so2809277eec.1 for ; Sat, 27 Jun 2026 13:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782593672; x=1783198472; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LHQxPP8KFCYPsQlDA5Hc72cwDgEYiy/Na5LEzQWdZ0w=; b=DXZ37zbxTlgSFEahphnk5PcLPCfIePRiY/oDd7UEFrLdlKf6WNzqh9ivceC6L3q01J w2tM3ifSA3QAOa6myZ0sNrdvNdgXdWwfjtMCvaHrGwM+T7nMTqwoPrYPtcXsLLryjKK/ dyBjADAADTt2wtEn3Qz5BCtiZB6WEH3yBvhQqe72F8RuHap1RYfXqiaVlL6WefHjRwo+ KLMJZlgIUr8eIa4cDbGKfziXIy73t77UJCAfisWZMr0GjZDvU7q0E6TxtT7+bC7M/PRb qLkXSt+1GE7OAnHO3kL+wqkk85q3K1YKksTCJiMyltw2w+S56Y1NcaBl9ehtU+xs2fXs Pi1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782593672; x=1783198472; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LHQxPP8KFCYPsQlDA5Hc72cwDgEYiy/Na5LEzQWdZ0w=; b=L3z0cYwT1bebmN2DKei3d9ujrnVvn39LYvn5lOG3ER+Uugqjm4z8y3hgJYgs59fzZb MfBVAGk4bOeAzNjPJDrRy9IXI6Z0ete4iFwq5PBhW6iaIeiZDBUKkpUupH0MvaIo4DOw h3y6LYTHKzKg/B1fKn3uoM1SgY9BIdhF6XBj0YwsKeazHGj6YR+oRBghjrK3QyBN99fL MNvE69G62dR8JCbLW+ZsRpIGEYjvi2oHSrs9wr9dBQEa3VQ8IgMP5C+0OgHPECDGwS+Z ErEbj5NEUroG4j8ALmYVQnGNNm1IqS2Gz77Ed5gDoQ2twmpX0ucc2wzswIi9inSeftgD 5VZw== X-Forwarded-Encrypted: i=1; AHgh+RrxZhR9AqWTD7j5fH4u1uUOepF6TDgFnk+7ediJ6CkvtEQ9AKplzpw2llW0c89WM9BxFrpnvs9JkiBJ3+k=@vger.kernel.org X-Gm-Message-State: AOJu0YyO3mj0GITyi7MQjSOzgJLTGU4WpsLoJnZHiC8f7djBU2Te4Ose f/upRGtEvhukwnDAFYQsPB5U64Gxu902LsgarH50FvT2u+G8r7Ia2xft X-Gm-Gg: AfdE7cma3+vzycdnkI3HcmqUWY5lXpuAVuo3VZ9GTDiVEXBkIkWLolLHFBWgaZBkphD gWEDKxamUtEvzbklrlZlc0RUQAUKiTyVEB2KEeHFRB57/3VIiCQqj2wx5YLahGvkZkDDpU4OnnY KI4N7C1UZ7J9y2rhG/fTA9gcWH2gM2Dn6zCnbWHTbKkuhckJGPs21pHTuc2jKYfVfWJdOmw2ptR MPvrQRohG7h3R9joPhkHnaswK5vZyj66rbSBsVwrOefTgEr7uzo53MoDfDWrSa9RFOuPrBCNR/w cTGLSjDW3PyWs3uDZgQHIiDKcwb1/1F/ECqM9y1qzuG4HPe1I8f7DHPFNpUIMUOILQ7NlaU5hOR kzh+BIMs2n5NMaksj8oNNbdcaJysc7u+nVysd1ifgyZGrllmffJiiMl5v642bsfymmZiZCP7HZ0 0= X-Received: by 2002:a05:7301:6003:b0:30b:eb75:8a5a with SMTP id 5a478bee46e88-30c84e0bb96mr12154710eec.25.1782593671833; Sat, 27 Jun 2026 13:54:31 -0700 (PDT) Received: from gerik-arch.lan ([2603:8000:d300:219e::c6c]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30c7c52c591sm41400336eec.7.2026.06.27.13.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jun 2026 13:54:31 -0700 (PDT) From: Gerik Kubiak To: giometti@enneenne.com Cc: richardcochran@gmail.com, linux-kernel@vger.kernel.org, Gerik Kubiak Subject: [RFC PATCH 1/3] pps: Add PPS_SETCLOCK ioctl Date: Sat, 27 Jun 2026 13:50:26 -0700 Message-ID: <20260627205028.105252-2-gerikkub@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260627205028.105252-1-gerikkub@gmail.com> References: <20260627205028.105252-1-gerikkub@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the PPS_SETCLOCK ioctl to the pps driver and an associated pps_kclock_source structure used as an arugment in the ioctl. This ioctl allows userspace to specify the clock used in timestamping PPS events. Adds a pps_kclock_source structure for this ioctl. It contains one value, clock_id, which holds the requested clock source for subsequent PPS events. Signed-off-by: Gerik Kubiak --- include/uapi/linux/pps.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h index 009ebcd8ced5..db233511c6ef 100644 --- a/include/uapi/linux/pps.h +++ b/include/uapi/linux/pps.h @@ -87,6 +87,10 @@ struct pps_kparams { struct pps_ktime clear_off_tu; /* offset compensation for clear */ }; +struct pps_kclock_source { + __u32 clock_id; /* System clock id */ +}; + /* * 3.3 Mode bit definitions */ @@ -140,6 +144,7 @@ struct pps_bind_args { int consumer; /* selected kernel consumer */ }; + #include #define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *) @@ -147,5 +152,6 @@ struct pps_bind_args { #define PPS_GETCAP _IOR('p', 0xa3, int *) #define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *) #define PPS_KC_BIND _IOW('p', 0xa5, struct pps_bind_args *) +#define PPS_SETCLOCK _IOW('p', 0xa6, struct pps_clock_source *) #endif /* _PPS_H_ */ -- 2.54.0