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 X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B138AC433B4 for ; Sun, 25 Apr 2021 16:05:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85A2960234 for ; Sun, 25 Apr 2021 16:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbhDYQFv (ORCPT ); Sun, 25 Apr 2021 12:05:51 -0400 Received: from www381.your-server.de ([78.46.137.84]:41226 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbhDYQFu (ORCPT ); Sun, 25 Apr 2021 12:05:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=1GQ5akc9O+xkZSrawfFCPTKMi5K02rD6O4QtWIcBTZY=; b=i6baA5TmzzWpRd6P1cCvgeKhfj 8maaQ/neWgIkQ6XcLUSEoKmqBbKEBDfW6+bHKc/mKT27HubRKSRJKXmaJT0SP0LaNqu0kA9xHFLV3 R+tdpZX8OpQl77z9MXmN+9vDUY0O8X0/XSZXYdjqiHbsGd/Qc6Oj0Rz1kCRRhUbry0QRB3mEGMi7E RTtfH37BbuSqE+caxdu+f0QhC/tgPHWrw2jt00tQX8CFR5Ael0TtQmUmiwvMs1TGmRokmUWmNhu0a hkm6Kc1jVMfa1gRIh2yPj1qjkgVWjj8ahKougtXZxVXPnpUhE+oz6zdX8OuN6FGck8wUWTn+vMWDr VRiHiZ1w==; Received: from sslproxy06.your-server.de ([78.46.172.3]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lahFs-000D3v-Gy; Sun, 25 Apr 2021 18:05:08 +0200 Received: from [2001:a61:2a42:9501:9e5c:8eff:fe01:8578] by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lahFs-000X7A-Cj; Sun, 25 Apr 2021 18:05:08 +0200 Subject: Re: [PATCH 2/2] iio: xilinx-xadc: Make IRQ optional To: Jonathan Cameron Cc: Anand Ashok Dumbre , Michal Simek , linux-iio@vger.kernel.org References: <20210425102638.9511-1-lars@metafoo.de> <20210425102638.9511-2-lars@metafoo.de> <20210425162559.11371323@jic23-huawei> From: Lars-Peter Clausen Message-ID: <2d5f7509-a08e-91ec-dff7-2c70eb57aaa6@metafoo.de> Date: Sun, 25 Apr 2021 18:05:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210425162559.11371323@jic23-huawei> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.2/26151/Sun Apr 25 13:05:06 2021) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On 4/25/21 5:25 PM, Jonathan Cameron wrote: > On Sun, 25 Apr 2021 12:26:38 +0200 > Lars-Peter Clausen wrote: > >> In some setups the IRQ signal of the XADC might not be wired to the host >> system. The driver currently requires that an interrupt is specified. Make >> the interrupt optional so the driver can be used in such setups where the >> interrupt is not connected. >> >> Since both buffered capture as well as events depend on the interrupt being >> connected both are not available when the interrupt is not connected. >> >> Signed-off-by: Lars-Peter Clausen > Code looks fine to me but raises a question. As there is no validate_trigger > callback in this driver, nothing stops it being associated with for example > an hrtimer trigger. I don't think that will work so perhaps we should add the > callback? If it does work, then the presence or not of an irq should not > change whether we register the buffer. This is a good point. But the driver can actually work with a hrtimer trigger. You'd get aliasing problems and all that stuff, but if you only care about the instantaneous values it will work. Without an IRQ we should only mask out the events and not register the triggers. Registering the buffer should be fine. - Lars