From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1358C54731 for ; Tue, 27 Aug 2024 19:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:From: To:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wtZFtUpYfRJVM6uEwMbiUQOlfn1kJh47pty0BpMfqd0=; b=E3gIXoanElrohZT4RHF+MwwiY2 uaJweANo4LNeSpSNKvOKamVXEVsQsVPsYVbydbwtb/hGQaufdIW6CSc6wa9BehNZToZ1uTrjtIHOM /2zce9NkXRWmQupcJ79afuL3wzpQBnHMpyukf7SF9zdPyp0T1mv8zFhTBc81TNdfhLgUgd4IKGrB5 zml3nlDCg4UCyIpapB3Pi53Nnhu3kUDN8eHnY5ANOU2VjNFJXzivOyClXPz9upMk6UA0k5jDz+Bdz bTuYf5aLKsHaJPRDVqucE/N6C1NmSKznV6mfBX6C4iUErGW98iaYLrx9kgNzuDQVyYFHZxuFpNN4v UbGgVtHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sj1Zl-0000000Caxu-0otE; Tue, 27 Aug 2024 19:09:57 +0000 Received: from mail-4316.protonmail.ch ([185.70.43.16]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sj1Yq-0000000CaeE-0rJa for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 19:09:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724785736; x=1725044936; bh=wtZFtUpYfRJVM6uEwMbiUQOlfn1kJh47pty0BpMfqd0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=JNAVeq4xtOJHWgpQzQbeoRRhyDGCVarlj3hD3LDlJXruDSSrzXQSI2dTgcGBudDxc VzQZtpli5nEX0Gv+eFgGj214HDr7z0pcZ0kuCs1AqC8rhvxSvCtOgUjR2svtimzKP2 BGQgiCUgWAnzgz1t/O5+bs2lsPzhYk+HAh4n6cjuruafbRgQHt24/zqXB+6lDOSMJq //W+J/Hi7hZ7QLPzF/CDVOINhlcA5h4r1dslNTbq2ecyCzv4/EF06JOl/a/j2uJUXd 1BcwFWgzy0VW1Eua7/x9WE7TTbXqMqmsXXNIkeWknYEJR8u26hxapCa+xDFMSVeYFI TtuKTcX2rRPoA== Date: Tue, 27 Aug 2024 19:08:52 +0000 To: Greg Kroah-Hartman From: Harry Austen Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michal Simek , Shubhrajyoti Datta , Dave Ertman , Ira Weiny , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 7/9] uio: add Xilinx user clock monitor support Message-ID: In-Reply-To: <2024082655-cubicle-flashily-6ab3@gregkh> References: <20240826123602.1872-1-hpausten@protonmail.com> <20240826123602.1872-8-hpausten@protonmail.com> <2024082655-cubicle-flashily-6ab3@gregkh> Feedback-ID: 53116287:user:proton X-Pm-Message-ID: ec1732088562b68387aa388135c69c468b2c569f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_120900_698172_72421A24 X-CRM114-Status: GOOD ( 21.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon Aug 26, 2024 at 2:11 PM BST, Greg Kroah-Hartman wrote: > On Mon, Aug 26, 2024 at 12:38:36PM +0000, Harry Austen wrote: > > Xilinx clocking wizard IP core supports monitoring of up to four > > optional user clock inputs, with a corresponding interrupt for > > notification in change of clock state (stop, underrun, overrun or > > glitch). Give userspace access to this monitor logic through use of the > > UIO framework. > > > > Implemented as an auxiliary_driver to avoid introducing UIO dependency > > to the main clock driver. > > > > Signed-off-by: Harry Austen > > --- > > drivers/uio/Kconfig | 8 ++++ > > drivers/uio/Makefile | 1 + > > drivers/uio/uio_xlnx_clk_mon.c | 71 ++++++++++++++++++++++++++++++++++ > > 3 files changed, 80 insertions(+) > > create mode 100644 drivers/uio/uio_xlnx_clk_mon.c > > > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > > index b060dcd7c6350..ca8a53de26a67 100644 > > --- a/drivers/uio/Kconfig > > +++ b/drivers/uio/Kconfig > > @@ -164,4 +164,12 @@ config UIO_DFL > > =09 opae-sdk/tools/libopaeuio/ > > > > =09 If you compile this as a module, it will be called uio_dfl. > > + > > +config UIO_XLNX_CLK_MON > > +=09tristate "Xilinx user clock monitor support" > > +=09depends on COMMON_CLK_XLNX_CLKWZRD > > +=09help > > +=09 Userspace I/O interface to the user clock monitor logic within th= e > > +=09 Xilinx Clocking Wizard IP core. > > Why do you want a UIO api for a clock device? What userspace code is > going to access the hardware this way? Why not use the normal > kernel/user apis instead? I was just trying to provide userspace access to these _unexpected_ clock status event indications (clock stopped, underrun, overrun or glitched) and= UIO seemed like an easy way to do it and leave interrupt enablement and monitor= ing up to userspace. I'm not aware of any existing clock event notification framework. Are you suggesting that such a generic event notification mechan= ism should be added to the clk subsystem? e.g. additional clk_ops callbacks etc= .? > > thanks, > > greg k-h Thanks for the review, Harry