Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp716084pxa; Tue, 11 Aug 2020 13:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/vBERxq1ZmyZBYmjUDLq69h3pEgX4miA7t8+Ih4u5Q/DWGl5e+cxOF8n2KX7qPlZqM/2g X-Received: by 2002:a05:6402:1bc5:: with SMTP id ch5mr26763971edb.364.1597176727929; Tue, 11 Aug 2020 13:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597176727; cv=none; d=google.com; s=arc-20160816; b=vfk1poax6LWowUKTjw0wTFooaJWYUTeosgQJ1/ig5Vln5ZZ1Kh8XWRly0BakkgQ7TE jfZ8WvXFlirf58RaN5Cj3Uufqvzite3ftw22NmMu2C8LBm0C35pQ2qFpv9BhAIQdC6vk 6MRJhCmBpuDnehBst5+HuslmO3Yoew4fFAc/aCW4A54/VL7Gj92gKtLaGkjVHLEWhsnc EuVbnGp6I+yDggjAFlBK/yy5BERJFJ8eOgWySuFqqwRBel0BPkqckwwJWYVCezndJUbr xmY22Kc3viTrY95gT3VjDfv2oBjEDzhx7e0FMOhdh/eEamnT9If/ToqD/eP2R7EV1Kxq ERww== 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=6qJqVdc/uC0k/47tmN/6OGWwLLeKwWyMRmMGNyMuMes=; b=wI1vbhI/EAEaFGCX09vk8ivfD1bH6SqYOOF18A3nwtPT9BoJ56rCEUWf5G+7ps55g5 Z3UZ3DyFPAA9lCwF+84kjDwGRsn7hmlBAjSHr+d/vsCEgNabOjc5GaAX4xBF4CQGDY7a Kx2icrNi46Ktuuhns/qjqK4uBjQ07CVHJTDrxSS6ONmfTOL/rwdEnUCsM5o29pwLJIp2 lO/HW3BLNP9UBYIEeGn8OiWSal0g2ejlK3k+IWSitF2RKDF9sYTp3QBXKHK677XyWuxA uR35qgiI61bpVb+CZs06hLXxT2mje+OhM9vn6uNwR3TJoF2FJVmNYBkjkS7tGSqqnF+T k4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H3ZdlnlZ; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 89si13903928edq.575.2020.08.11.13.11.44; Tue, 11 Aug 2020 13:12:07 -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=@chromium.org header.s=google header.b=H3ZdlnlZ; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726468AbgHKUJR (ORCPT + 99 others); Tue, 11 Aug 2020 16:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgHKUJQ (ORCPT ); Tue, 11 Aug 2020 16:09:16 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CF57C06174A for ; Tue, 11 Aug 2020 13:09:16 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id z12so966409uam.12 for ; Tue, 11 Aug 2020 13:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6qJqVdc/uC0k/47tmN/6OGWwLLeKwWyMRmMGNyMuMes=; b=H3ZdlnlZZbMSAPEofrl6nm6YexFFLFIlxi1eqa1GptjaFwv/xFa49I/fUr0oFBROIv 9aU6FfSZBMqZYb8nS74vVLPJYMrj7tE81Xq79ZWbCcCyu4RRn0sOk9D/yKEs59P3iJcR 14Kbt+2OH5xfn8oZtuAkZoCLV21W+/GQ320Ms= 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=6qJqVdc/uC0k/47tmN/6OGWwLLeKwWyMRmMGNyMuMes=; b=NPpcRhLe0jdY9Dvt+jDrrMWQll9NS2LWnC4iLrcfDVmLBB6JI9lBTPMwycfe2j86Bq BiHzNPyy8UUmXUjmP1tTuRH2Jl/mzzE/GFvVrZzXIsnLDSRXaNAIvWkmWl1/d9ElTPOG iJ2O/jDlJz5jB7w9RHcss/Yj5LilLF+56ibXXyrsZasyq9itcwx5G9KJCX3y/58LoqDr IpmrSKDqvIvUcewEGnDlfmWV7NQsNF0IntgDHBc3n1Mc6yvn+AznA3MjHdXidvFpbp2c DWR75wlhmHGWAvgX0dg+5sw98haCEJoMfBGS4ZCK0XlLHqIyTitL43p3a2FuqbGD5KAj FS/g== X-Gm-Message-State: AOAM5332rEyhpzrekR/N6gNlVyYWMj560ZT+6iTO3hhWStOEQNYMsp8s D3D5CZpGQznxiqpUAwLE6ZxFAR69eTg= X-Received: by 2002:a9f:29a5:: with SMTP id s34mr25782840uas.111.1597176554088; Tue, 11 Aug 2020 13:09:14 -0700 (PDT) Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com. [209.85.217.42]) by smtp.gmail.com with ESMTPSA id s5sm7280431vsk.10.2020.08.11.13.09.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 13:09:13 -0700 (PDT) Received: by mail-vs1-f42.google.com with SMTP id n25so6643497vsq.6 for ; Tue, 11 Aug 2020 13:09:12 -0700 (PDT) X-Received: by 2002:a05:6102:213a:: with SMTP id f26mr25614974vsg.6.1597176552506; Tue, 11 Aug 2020 13:09:12 -0700 (PDT) MIME-Version: 1.0 References: <1597058460-16211-1-git-send-email-mkshah@codeaurora.org> <1597058460-16211-4-git-send-email-mkshah@codeaurora.org> In-Reply-To: <1597058460-16211-4-git-send-email-mkshah@codeaurora.org> From: Doug Anderson Date: Tue, 11 Aug 2020 13:09:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks To: Maulik Shah Cc: Bjorn Andersson , Marc Zyngier , LinusW , Stephen Boyd , Evan Green , Matthias Kaehlcke , LKML , linux-arm-msm , "open list:GPIO SUBSYSTEM" , Andy Gross , Thomas Gleixner , Jason Cooper , Rajendra Nayak , Lina Iyer , Srinivas Rao L 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 Hi, On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah wrote: > > From: Douglas Anderson > > The "struct irq_chip" has two callbacks in it: irq_suspend() and > irq_resume(). These two callbacks are interesting because sometimes > an irq chip needs to know about suspend/resume, but they are a bit > awkward because: > 1. They are called once for the whole irq_chip, not once per IRQ. > It's passed data for one of the IRQs enabled on that chip. That > means it's up to the irq_chip driver to aggregate. > 2. They are only called if you're using "generic-chip", which not > everyone is. > 3. The implementation uses syscore ops, which apparently have problems > with s2idle. > > Probably the old irq_suspend() and irq_resume() callbacks should be > deprecated. > > Let's introcuce a nicer API that works for all irq_chip devices. This You grabbed my patch (which is great, thanks!) but forgot to address Stephen's early feedback from . Specifically: s/introcuce/introduce > --- a/include/linux/irq.h > +++ b/include/linux/irq.h > @@ -468,10 +468,16 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) > * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips > * @irq_cpu_online: configure an interrupt source for a secondary CPU > * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU > + * @irq_suspend_one: called on an every irq to suspend it; called even if > + * this IRQ is configured for wakeup s/called on an/called on > + * @irq_resume_one: called on an every irq to resume it; called even if > + * this IRQ is configured for wakeup s/called on an/called on -Doug