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=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 9B419C55ABD for ; Tue, 10 Nov 2020 21:28:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49754206F1 for ; Tue, 10 Nov 2020 21:28:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cKDjQtDD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731759AbgKJV2T (ORCPT ); Tue, 10 Nov 2020 16:28:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730254AbgKJV2S (ORCPT ); Tue, 10 Nov 2020 16:28:18 -0500 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72021C0613D1 for ; Tue, 10 Nov 2020 13:28:16 -0800 (PST) Received: by mail-oi1-x241.google.com with SMTP id j7so16113648oie.12 for ; Tue, 10 Nov 2020 13:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WdCTcUp3dt98pd8N/bAI9BPR8MUfMdcKBreEIwkfCWE=; b=cKDjQtDDjB5Lky6jr2FC81N8duXbbH+cdB+mUYl9ikTUJ7j9GcojAmJEG5BVI3wyfT EYNwGSw2Q9kY2uRubIVw62LI2LDhWwN1uEmD4wY2AITz56OHuw3gL1tjz9HMqlKwx+nz pA8JHfW05ZyNKM6CDX9Td5f8KN6q7GdIBBbdz0gwo6rMGugKLA4yaEey8lf9HdGhKbpc Ln9/mz15nnvKxS1xeoR5Rn4tNV+0xPqNzUbEFFw+n7J9lchvyBjpYbPWC8U42W0da+/C Cc8wDMJtb+YwfnH1uoSNx2viMYTLeo09VUOauM7XIlRzZJRbn6Ccoqb8a4/CStzG6bcx XU7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WdCTcUp3dt98pd8N/bAI9BPR8MUfMdcKBreEIwkfCWE=; b=nlinEdt9UAWDXEzjvgLuoyjYAtj/NUjp3jb1xL6LdFizKlNMOAe9NjYS5sBAJpjfe2 V3I1b04xXOyWxJVKoF6CW32o8HJygRBXcUqUYr6sghx6K/FZxOEJFAMIyDXTkqxR2bDB qohRASQxAa5FCfgU1jG09iMO+9esM9nDASf+bZ7yzuc+90JiUA6dFjNPk8bw9t2wKIWV 49QzGdtw7LDdkEJyX9dYTwUOSvwvnFY3wXHBiap9XTW4AEX9AyX0Teuv1uJ59+jLUTDU /j8Ka+zg5aWu8vA9lptX9q5qyLe7faexqKUjAo1gojXYzf6yICqXmzSoLfKyYy6o1xLa ACXw== X-Gm-Message-State: AOAM533YOfNtNpnePjaFwO5flpPp9eh6GJ9d3OD3BXU3m13tFyiDLvIm RWeBgHSj1RUmLqJjHkH+6qUhaQ== X-Google-Smtp-Source: ABdhPJyGV9vepmOEKrlYJxQpWVjB8O0kCfQ9th8PqSMEhyIIM/MxzoaDwll65t2fKnc7Vlu3jyk7kw== X-Received: by 2002:aca:b588:: with SMTP id e130mr92461oif.56.1605043695752; Tue, 10 Nov 2020 13:28:15 -0800 (PST) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id g3sm3422228oif.26.2020.11.10.13.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 13:28:15 -0800 (PST) Date: Tue, 10 Nov 2020 15:28:13 -0600 From: Bjorn Andersson To: Linus Walleij Cc: Maulik Shah , Andy Gross , "linux-kernel@vger.kernel.org" , MSM , "open list:GPIO SUBSYSTEM" , "open list:GPIO SUBSYSTEM , Andy Gross , Thomas Gleixner , Jason Cooper , Doug Anderson , Rajendra Nayak , Lina Iyer ," , Stephen Boyd , Evan Green , Matthias Kaehlcke , Rajendra Nayak , Lina Iyer , "open list:GPIO SUBSYSTEM , Andy Gross , Thomas Gleixner , Jason Cooper , Doug Anderson , Rajendra Nayak , Lina Iyer ," Subject: Re: [PATCH] pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback Message-ID: <20201110212813.GF807@yoga> References: <1604561884-10166-1-git-send-email-mkshah@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 10 Nov 07:31 CST 2020, Linus Walleij wrote: > On Thu, Nov 5, 2020 at 8:38 AM Maulik Shah wrote: > > > When GPIOs that are routed to PDC are used as output they can still latch > > the IRQ pending at GIC. As a result the spurious IRQ was handled when the > > client driver change the direction to input to starts using it as IRQ. > > > > Currently such erroneous latched IRQ are cleared with .irq_enable callback > > however if the driver continue to use GPIO as interrupt and invokes > > disable_irq() followed by enable_irq() then everytime during enable_irq() > > previously latched interrupt gets cleared. > > > > This can make edge IRQs not seen after enable_irq() if they had arrived > > after the driver has invoked disable_irq() and were pending at GIC. > > > > Move clearing erroneous IRQ to .irq_request_resources callback as this is > > the place where GPIO direction is changed as input and its locked as IRQ. > > > > While at this add a missing check to invoke msm_gpio_irq_clear_unmask() > > from .irq_enable callback only when GPIO is not routed to PDC. > > > > Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") > > Signed-off-by: Maulik Shah > > This looks critical so I applied it for fixes so we get some > rotation in linux-next. > > If Bjorn has other opinions he will tell us :) > No objections, the patch looks reasonable to me. Acked-by: Bjorn Andersson Regards, Bjorn