Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4322782pxb; Tue, 10 Nov 2020 13:31:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJybEZnm9d1qZI+F4LiRvSdYwQlPSuma2E2aizKorxOhznv11AaQJ4TreEw507tS/+u/uL1E X-Received: by 2002:a50:8a9c:: with SMTP id j28mr1455159edj.254.1605043891120; Tue, 10 Nov 2020 13:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605043891; cv=none; d=google.com; s=arc-20160816; b=IDcwDt5DgYUp9Y4JbLW2E3cOfkF2uC92RNmjH7M2sYoX5vw/piK6qM1kh96PZdSgIs +5ivyBljE7kdDsawlYQVScuNTgqBIS+ZooY1PcJ0xJisjICDSp9YWz3EhnV9NN9POyYX WZqPjMEPKUfruwiBP8n1uW2K7lxVyovPqPl3MG6HlKLed6Io3SWFFbhSABbJgUPEjrfU 9xOlXIMus7fhKndq8jaXtD43trtEECGjYDbUNTTYIwWDnwetTf+bI8QsYLG9w/4Tpcyk kUbhujos9XkLe3/CFssmzzUKvZlxK4GuiyEe1H1rUUXg/Xh/DUul6zKtW78J7yG8csxt k6oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WdCTcUp3dt98pd8N/bAI9BPR8MUfMdcKBreEIwkfCWE=; b=cBzMELXJ7oPD6wtHBnioTh6u+PIPnvo3DMvEXevER5+sMy4PA71qMCdhBms6H03qR2 QxaF2twYwu1qJeijozB2rph2NHhrWVWnh46xMsHIIty8NQXo8NZpWMS5hqEB8YZlaSns 3AQviDpLTjqrLoydsI/Mi6POhs6MORKR1s0IISkz2msXf6ANCEFm7WDk9ShCs9xqY8gh PBfWjG0xn3LFM9FkEeluYAADbXkWz6iYdxc5KGfRf++X8j0DXwSA84RwZNgZcx2H/K7d NkTmirkB3lfr11tIEB6BoqtLz66ZORd3wYDLTE5ZDwdP324Ou4r5hyhmQUhA69hqnsv3 UD5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKDjQtDD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id on23si7444123ejb.169.2020.11.10.13.31.07; Tue, 10 Nov 2020 13:31:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKDjQtDD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731735AbgKJV2S (ORCPT + 99 others); Tue, 10 Nov 2020 16:28:18 -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-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