Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3144364pxa; Tue, 18 Aug 2020 07:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsbvNW8HXUiZZSFv22rlFVyNsjK7ZA+8RkAyvQiq185CNsFWSHO1KD93L5H0uQnCLyXs8P X-Received: by 2002:a17:906:228a:: with SMTP id p10mr20240976eja.23.1597761834168; Tue, 18 Aug 2020 07:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597761834; cv=none; d=google.com; s=arc-20160816; b=y19mSGaycEHQ6rHFQEs1ZchW5339zzRrLr2JKRNSvUvQDmg/42e/xtJ7iebhqnSA4S PqBTBeOJDiL2U+ZNuD3d8xtQ+yDstJDIsuymVU8gCBFkffTZ0rgOm+LDouocdgFi4UqK 9uFjw3MvVl+vzYY/F4HmNAd2E3Lo3X4KZ8H90YKqcG5CSHY4tgXCJPywzFgU7zjjzc1J QBYJTvkluv6selSH6YQAv/yeuj85ahRlBj2EZAfLy4a+rYeqZQkwgKGTth42vP+Z8TlA TQGG6bmFVd1LSRhkn/qxDYI/JLaAcWctNr3PE40FzyQKwIsgfWCbH4a0v9omz8cXsi9o HyvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=0c8j2FthIkH4rrs8WcTM9vpYXGsDLHIU2UqecOW6mFE=; b=WniqFsyHj5sS25Gk67U6IpqIGgrYzzhmmrszkcIEqm/wkUsdRxcoC43SSk2XYdqFHw 6HrlfWuusIupOuriF0oEHoj5cwRUn3vLt0f7QkZzwYnnJyc/ORDlgW+yMIFdVcv7xlDh AddQaRTvjHFpIJtbVneHb9hlFi+SX1iziuD4VHjYpRYtBG8tC4H9dYmGWv51wr2Zox8A OEmqVkVJXJvdK7EEbs4aVzLzos/RtBmAem9rU12wrGmZrldkrenu+8ySO6hZJhe9J3Ql WfoEDSd1VF6941YHPvQ3T5ClO4wsOW9QJpT9Jf0Sv+QO8+t1Ikh1rJDPZB6n53OV+Ou6 mdZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=knmA7lev; dkim=neutral (no key) header.i=@linutronix.de header.b=hZC+iwiw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b35si14243282edf.41.2020.08.18.07.43.29; Tue, 18 Aug 2020 07:43:54 -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=@linutronix.de header.s=2020 header.b=knmA7lev; dkim=neutral (no key) header.i=@linutronix.de header.b=hZC+iwiw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbgHROkw (ORCPT + 99 others); Tue, 18 Aug 2020 10:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbgHROkv (ORCPT ); Tue, 18 Aug 2020 10:40:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACD6C061389; Tue, 18 Aug 2020 07:40:50 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1597761647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0c8j2FthIkH4rrs8WcTM9vpYXGsDLHIU2UqecOW6mFE=; b=knmA7lev6zSXT2tMoQLvwdMcQzHtr7/8Cbb+IpJ1jW9bmVEmKHD3zJOWrmyCLXxzhfG4Tf /bT/nJbCJ2g0vK2PCHxd9akVZRCf4/MZfrSLoFK451miG5SvH4BhJOuvCswIKul+tv+vKJ JlZRCs7h0QKSz4Yz/g6ERdmpO3wlyiOd5XgXq45OokjavULsLFusOATLqfELp4FDRV4EHd nyo78KeLSKq6TEfzDC0/PgLLxgTOqJ3CGKjYBKJk34xPFYtG1RU7DuLZdzBG3PP6cXSeAL Q/ii9hEtu+kb6MmPks3D+imw018GftXrPHHLtbot6l51faGyZG5wytXm1YBklQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1597761647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0c8j2FthIkH4rrs8WcTM9vpYXGsDLHIU2UqecOW6mFE=; b=hZC+iwiwb00r/MLzg2/nELa7fQVMZbtNy51g4o+TzG2x4Nx1/t4Fi4hJ04GfIMIUbdrup2 w1yTAUNrmLRDX+CA== To: Maulik Shah , Doug Anderson Cc: Bjorn Andersson , Marc Zyngier , LinusW , Stephen Boyd , Evan Green , Matthias Kaehlcke , LKML , linux-arm-msm , "open list\:GPIO SUBSYSTEM" , Andy Gross , Jason Cooper , Rajendra Nayak , Lina Iyer , Srinivas Rao L Subject: Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks In-Reply-To: <74998fe6-761e-7375-c9ab-5c76d3044adf@codeaurora.org> References: <1597058460-16211-1-git-send-email-mkshah@codeaurora.org> <1597058460-16211-4-git-send-email-mkshah@codeaurora.org> <87pn7ulwr5.fsf@nanos.tec.linutronix.de> <878sei42ql.fsf@nanos.tec.linutronix.de> <74998fe6-761e-7375-c9ab-5c76d3044adf@codeaurora.org> Date: Tue, 18 Aug 2020 16:40:46 +0200 Message-ID: <87r1s4hv9t.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maulik, On Tue, Aug 18 2020 at 10:05, Maulik Shah wrote: > On 8/14/2020 4:28 AM, Doug Anderson wrote: >> On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wro= te: > > + if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND) > + unmask_irq(desc); > > I tried this patch and it didnot work as is. > > Calling unmask_irq() only invoke's chip's .irq_unmask callback but the=20 > underlying irq_chip have .irq_enable also present. > > Replacing the call with irq_enable() internally takes care of either=20 > invoking chip's .irq_enable (if its present) else it invokes unmask_irq(). > > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 irq_enable(des= c); > > probably IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND should also be renamed to=20 > IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. Makes sense and also works when the interrupt is already enabled. Thanks, tglx