Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1764792ybg; Thu, 30 Jul 2020 02:00:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf2DvN2oGuGM28ue7ycjCinvvqUXXmZ1PfWAWRLscpDlTk4Ikq80W/jNYOJ31n266xmjyT X-Received: by 2002:a17:907:2087:: with SMTP id pv7mr1591851ejb.452.1596099607224; Thu, 30 Jul 2020 02:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596099607; cv=none; d=google.com; s=arc-20160816; b=jIOvd+NGLez/ZM47biwjpbKwhidJernPqjTOTL64jFEJcVZCMx5HTm3E+4XAqBtS9m 6FiC1BBZ9ZjS24f4GvhYC4Ju61t/l8itOB1eL1bpPu+pe4I+FuTysB32esYQqp4tyE1c ylyPhiVv88nFgdyrvcB+sr4bsIFoeQaZ6xCIglYTx7Tj87gCEgNkuyKWttF80Fd5g84K oLqpexAuqSxU3r/s9IVEVsf7QE/FnzY9pCw4Rdgpy8jTE/+LU4gHwG/F2YP6XO2KhJT4 sfHhWqJpIcQ347jvNx9ws0tXq1PsQGmx+MsgEQn9R/xxp8MjZBov7TLxuPsUIquvAqnz d7SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=itjlHufqHOj8sBR3LwnNdVDkxZpZGiJV5Qv/xADKQXY=; b=FG1nY+4Q/RMcYVH+2oiiBKtmhoddvrEhzIuioI6Xo5S0rlbR7lL9LsViD64eb0JfA3 KENzUsXHvChsnrUvXl2MVnm9YczpMOp9uYgFE3OfuWcFGviDDPUFCXAamtTEBb7LyJEj pDy5ZQRleKE/MC9jcAuDbTGG2Z1+5ZN7noIz2cBM3XdE2DlS4r2TwtgmSutcEibvzVaq S+QswsMYuQnRbpmcDRIRF/8X37L+RAkLIgBN9ZS5nFGG9aIxkUfRsZjHbRIimvwQ5BIf FZU2m3aJ3rypPJNxXIq+HM93GltI9sr41KZ2uvDbv/j35IXmlQ6ADMsXgWoY77Cv6Fo/ +eLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o3si2685437ejm.346.2020.07.30.01.59.43; Thu, 30 Jul 2020 02:00:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729051AbgG3I7g (ORCPT + 99 others); Thu, 30 Jul 2020 04:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729032AbgG3I7g (ORCPT ); Thu, 30 Jul 2020 04:59:36 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A59C061794 for ; Thu, 30 Jul 2020 01:59:36 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k14PQ-0002tp-I6; Thu, 30 Jul 2020 10:59:28 +0200 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1k14PQ-0003bj-0G; Thu, 30 Jul 2020 10:59:28 +0200 Date: Thu, 30 Jul 2020 10:59:27 +0200 From: Marco Felsch To: Dmitry Torokhov Cc: Horia =?utf-8?Q?Geant=C4=83?= , Herbert Xu , "David S. Miller" , Rob Herring , Shawn Guo , =?iso-8859-1?Q?Andr=E9?= Draszik , Robin Gong , Anson Huang , Fabio Estevam , Aymen Sghaier , Adam Ford , linux-input@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, NXP Linux Team Subject: Re: [PATCH v3 3/3] Input: snvs_pwrkey - only IRQ_HANDLED for our own events Message-ID: <20200730085927.ro3c2ptiixi2ikyf@pengutronix.de> References: <20200723074314.3304-1-horia.geanta@nxp.com> <20200723074314.3304-4-horia.geanta@nxp.com> <20200729075513.ckjnhfv3dxuesvsi@pengutronix.de> <20200730060601.GE1665100@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200730060601.GE1665100@dtor-ws> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 10:56:41 up 258 days, 15 min, 251 users, load average: 0.05, 0.08, 0.08 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Dmitry, On 20-07-29 23:06, Dmitry Torokhov wrote: > Hi Marco, > > On Wed, Jul 29, 2020 at 09:55:13AM +0200, Marco Felsch wrote: > > Hi, > > > > On 20-07-23 10:43, Horia Geantă wrote: > > > From: André Draszik > > > > > > The snvs_pwrkey shares the SNVS LPSR status register with the snvs_rtc. > > > > > > This driver here should only return IRQ_HANDLED if the status register > > > indicates that the event we're handling in the irq handler was genuinely > > > intended for this driver. Otheriwse the interrupt subsystem will > > > assume the interrupt was handled successfully even though it wasn't > > > at all. > > > > After checking the RM and the imx6qdl.dtsi I'm not very sure that this > > is right since the snvs-powerkey has a seperate irq-line. So we can be > > sure that this irq is for us. If this is the case we don't need to check > > the SNVS_LPSR_REG instead we only need to clear it. > > Wouldn't we want to know if for some reason we get spurious interrupts? We could check the bit at the very begin of the IRQ and return early but according the RM this should never happen. Anyway you're right HW is never bug free. Regards, Marco > Thanks. > > -- > Dmitry