Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp827473ybm; Wed, 27 May 2020 08:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWPzjuRTxc/DnlLho89KnXF3zNvQFLJHsTJ3p+rnE0Fq3K1sSD0bCuISplYX9Nb4EPAZMP X-Received: by 2002:a05:6402:128d:: with SMTP id w13mr25520527edv.0.1590595060186; Wed, 27 May 2020 08:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590595060; cv=none; d=google.com; s=arc-20160816; b=axmNXWWgMwi3KvXH7t6evXpKOWtkOD4RXyIhGPwzotPtjUlWUXSSrfYd00U7Z2cNet cyWXLOqcSn+v6YrmGE/4aBw5DJovwi0ni6h/10ic+FrMS5WskSNfGDQPAg04XtGo+AXK DJ83HL7bAoHbOPh/+bD8qiqpESd4UxWUzMSjaCvlNY/pEY71L42KkeGcuHdtZ4GTOGKm 1ULz+wf5ek3vXpRu84NG+D3qjWqZ21iF36PjRTueiRFZFHMmBTTXXF/cWBhdZLQ3/IiF ajwjdvsaiqkBl8Go4PU3XF09dxJgw8DOdH0vZlq1obY06vmYvC4dgV1aiPlBqysP5xlq gYnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=guH7o/1zYnrQw/f4NGxjhbP6GUVVrqoSi4RVWW1wiy4=; b=I1oVSws6sgG3/BQiCXomYHi9woRUOyU53HR69tj3o8hAPsolCFsFiDGqIXMiOnwbky GEdC9H2uh72ofpiU8/rah5N0VpKYGtaD1Stpm3ykPgmDyEBLXLMZgQvaTrBAPFI+66Mg gr7iORKe9cf+YLXA7X5okXZbhPORaRZhfTFEgvFLwlasnIkT752AFZXZtNG43dM2BsIR Qqg64KKHjGIfVjdZ4j79w46FSsRtB2/9T13wU1DttJGU5SxXXcW5EGbTa01VK5zDwYfa ZnDzAbrwemY6OZqKEoVso9MXsLTWmNCNMycL4jncJtimHU9EQjgep9aAHjzVs302BLPR tBTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h/rFP5jU"; 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 kq23si2129715ejb.104.2020.05.27.08.57.17; Wed, 27 May 2020 08:57:40 -0700 (PDT) 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="h/rFP5jU"; 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 S2388991AbgE0N4c (ORCPT + 99 others); Wed, 27 May 2020 09:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388686AbgE0N4b (ORCPT ); Wed, 27 May 2020 09:56:31 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63FF1C08C5C1 for ; Wed, 27 May 2020 06:56:30 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id x27so14496664lfg.9 for ; Wed, 27 May 2020 06:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=guH7o/1zYnrQw/f4NGxjhbP6GUVVrqoSi4RVWW1wiy4=; b=h/rFP5jU7cioPjV1DkfLT60l5HzFyDlE43d+yIyGjpfGLX2l3Efe85Ur+Ba64KLcoM zSYmCjOkxvc2ZeDK7/xCokEXGfmeESMxEhM1vFyZ4mm4OVpkfYIy0kTgHat70yi0Ebfh 68eNZx98yKTvnu/hHahi3tJ2DC11bSZCNOB2nh/hZy5a7Je7cZbRmg0Segd0Iab7I/tD 7ZYha8VDL6/NZ+JjecV+WhiRmjxXBoR/aC4fDyHB5sUCzU6KG+SAE2itO0Krph+MUMMM FGtepvb7QfEBglndReZsyTY+Q4Kt9DyQAdzaxgfPQa9ouzGJPES8JZJFix8W7ptVwJ21 LXRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=guH7o/1zYnrQw/f4NGxjhbP6GUVVrqoSi4RVWW1wiy4=; b=YXf0ns4KooHNjPQc+iAay9mzOy8e6gZDG/H4vlYC7tmWlj+YyeAl9U6hVARzG/qXV5 0cafJIJmaHQOWpy28u3aALl7f8aimHkTKNMPlzwaVWcIdmdRhcp07PYdHBCWxkHK7JVl +OgNudDDdOnerdkQyR3b43ziAnsPh1V4D65Wi3NjiInxNE/ER3LsUx3hdI9dQ8JGpXwp 5kWMVvDiHornXfneUz+YBD3SX2eWMIUtIYbimnXKmHMhZ4c0XaxqDZmanuJVOX8KuvWg pDBqEwES905QvwCBZeO0w/H6qtPwDW2ckWpZYkytwSjVew1cYFkA3N3sQU3aRHNdUzNm Ctaw== X-Gm-Message-State: AOAM530gdK9+l6o8zhUaA3n6rjrbKPhPlSln0/kN+yoQYavf9+0eHgMx NFxcjyiHHUxV6+y2Ol6e827oYM76Iwqq/OOgW0UQ7g== X-Received: by 2002:ac2:5a07:: with SMTP id q7mr3207793lfn.77.1590587788858; Wed, 27 May 2020 06:56:28 -0700 (PDT) MIME-Version: 1.0 References: <1590253873-11556-1-git-send-email-mkshah@codeaurora.org> <1590253873-11556-2-git-send-email-mkshah@codeaurora.org> <3efa1f69-1e1d-f919-d47e-b4c5c73532b7@xs4all.nl> In-Reply-To: <3efa1f69-1e1d-f919-d47e-b4c5c73532b7@xs4all.nl> From: Linus Walleij Date: Wed, 27 May 2020 15:56:16 +0200 Message-ID: Subject: Re: [PATCH v2 1/4] gpio: gpiolib: Allow GPIO IRQs to lazy disable To: Hans Verkuil , Russell King Cc: Maulik Shah , Bjorn Andersson , Marc Zyngier , Stephen Boyd , Evan Green , Matthias Kaehlcke , "linux-kernel@vger.kernel.org" , MSM , "open list:GPIO SUBSYSTEM" , Andy Gross , Thomas Gleixner , Jason Cooper , Doug Anderson , Rajendra Nayak , Lina Iyer , lsrao@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2020 at 12:38 PM Hans Verkuil wrote: > However, I discovered that patch 256efaea1fdc ("gpiolib: fix up emulated > open drain outputs") broke the cec-gpio driver on the Raspberry Pi starting > with kernel v5.5. > > The CEC pin is an open drain pin that is used in both input and output > directions and has an interrupt (which is of course disabled while in > output mode). > > With this patch the interrupt can no longer be requested: > > [ 4.157806] gpio gpiochip0: (pinctrl-bcm2835): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ > > [ 4.168086] gpio gpiochip0: (pinctrl-bcm2835): unable to lock HW IRQ 7 for IRQ > [ 4.175425] genirq: Failed to request resources for cec-gpio@7 (irq 79) on irqchip pinctrl-bcm2835 > [ 4.184597] cec-gpio: probe of cec-gpio@7 failed with error -5 There is nothing conceptually wrong with that patch so I think we need to have the irqchip code check if it is input *OR* open drain. I'll send a separate patch for this, it should be an easy fix. Yours, Linus Walleij