Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1022252ybs; Mon, 25 May 2020 05:24:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoDWQMSa3TY9Q3YQABKFV6HSg03dZSNveKm5l89hM/AUBlzTiSn4NldRS2bQHfw+XhjWkH X-Received: by 2002:a05:6402:2c4:: with SMTP id b4mr15288093edx.331.1590409499602; Mon, 25 May 2020 05:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590409499; cv=none; d=google.com; s=arc-20160816; b=zE/BUUfJyphsGvibSdnoxsy4CP2KQkiyJUlceFbvqyqBiBJ+9tGGXHeG4Z5GDevbHP cLwRri6G3BtenHbaLbxIAmgCORrOLQNqdf3nwWQ00uCRc782buUuyVCOkYqeFF5V2Lx9 n7b7HfiGWWJDH+xLsS4q6f8gJcXAeN5q/eD0BZ0q7aRE7wqMmKcolLHhy0ncc5qXuU3X R00q4UuQNCMo9H0ULRA2yxv5ms/BREQJWpRhyoIbYAYFXVk7X/q5i05/wh8LWjFHRLcX fn+OInNhiA7CoacgRnAVeWSesXlQ3ebgVvHO6V4acEEQwIvMoFj0oULLr9B+wJQ6p+M5 csXA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=B004EXCgq5FrmDeibsrHD2vF8zO47mml9XuJ8YnmPBQ=; b=q61ILNvIGsEK2AXXP5HlsK2zW3muzr7oDOzMLnDf0DW4XJDHSeuEO6ixpUmDuww5o8 GoPjEc2D2HPPSlUuMLHRESRNzDaHPGJttLH8vIK/HUngiovhLxbNG90wj1r4hflknvAW 5Vw33QJoNiNak1hYNWncVuA74LDKH91LQMsg1wawYzofy6LiYoAbfpg+wGWz/FW6wZR6 fY0DtLf2GU0XSux9ZySWVAUE3ODRsHsLFIiuQ+gcXwPQAhCqcr4RTAWr/rLZbVPAucrC VAtX6Ud/MN429PVImPCBDLZEhw7Oq1mEZDSYp97mTyHpBklasiWWMFJB/yFAD+ZzKm3i aJmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s1 header.b=iKYRZLN0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si9486993ejb.74.2020.05.25.05.24.36; Mon, 25 May 2020 05:24:59 -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=@xs4all.nl header.s=s1 header.b=iKYRZLN0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390521AbgEYMWf (ORCPT + 99 others); Mon, 25 May 2020 08:22:35 -0400 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:34673 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390488AbgEYMWe (ORCPT ); Mon, 25 May 2020 08:22:34 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id dC7fj8fagdPgTdC7ijaZQo; Mon, 25 May 2020 14:22:31 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1590409351; bh=B004EXCgq5FrmDeibsrHD2vF8zO47mml9XuJ8YnmPBQ=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=iKYRZLN0U0CQNPfS5AXa4jjimA9eaomJkUa2wkjeWE5ZnZkSI4PTbjCVhKKJCSddh rMwqG3oGB0g7RzXqBaxUrsvGJl+upwNmlzpHl05FZo96sREURbXOZboeJDjjQLgpYH mYEEKAffzQ3n9IisUK/1R49OMQvrnSTYkDSNdUu4qqVIbbQX+Tq4xBsxgfSVF4drcM 7VPhkkhNuJqsTTCdddpphL9rl23YZLjpwBn1gZDNTEK5Hl6m14RknIoF8hCgsMYCXu jn2ENJSmwtQdilS7ZiE6pDsNg0qIL2XCfimgSFm8FG32gchMQIckSd8u683IH/cNCU ylym6wnDvFgmA== Subject: Re: [PATCH v2 1/4] gpio: gpiolib: Allow GPIO IRQs to lazy disable To: Linus Walleij , Maulik Shah Cc: 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 References: <1590253873-11556-1-git-send-email-mkshah@codeaurora.org> <1590253873-11556-2-git-send-email-mkshah@codeaurora.org> From: Hans Verkuil Message-ID: Date: Mon, 25 May 2020 14:22:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfOGdb2RJOxdUV50pu4jnoPs5bZNeYuMlblQqlhIhssLZRmK5wQA0xb9Rm7/40hdvblQdz0Kb59N1KM362w7jtAh4KEHh2xtaGge1gIv38uJ9stTMJ+fB 2d9RBuCzmC/HvkVoNwEEa77G16IuQpXqcpdojxRMeFgz0I2MLZbUyKK99Fpbl/fQYNzrKG5DX1sQqJS5Isq1hH+NjuwTG9BOp2YM2NMzYglSYxylS0RVf17X VVq6+QAWQf55rXB1yf9ahsKGJjZZm0HchaQA794/RPJDZA9hxsTO427mQ2leGiGA8eGMDSpOqc8G5g8P9iJbhMi6zljI+4W+836MCc0Rp5Sp7U0frjwS3eDL z39sMoL3JFrSCbPHhIKpGwYWAV39eF8ftDzL1rEUyjkqRhIwxMMtA920vVuFIhXzBRsUuvBaR/8VHczH9QLuZujouYmyvj4KL9x9aEjSD4wmg4TVUMldOxAQ Yd9bbgJ5D4YIZ0bmGu/5fVWb60+++5VQvjQSeNJdMCTj4dl/xqOXoAMW1Dw7PYaS0RQ4Nw6exPIzzICGKbGaQmVEp9nxROHF6XufAKunk+Z98sVPccrN2a7M nZNSetq3KERNU5rc9Tyl7WWSgAVDsaeTJkqzhyyZ3Rvd2jM5meMyfytFPz3Uoy0kK8skMVIZdYeqk/dRLY1QuuXCZvIGydMUmO8IS+zlUJ9FxcnUtdGUwGkP ayqvEtVpjJA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/05/2020 13:55, Linus Walleij wrote: > On Sat, May 23, 2020 at 7:11 PM Maulik Shah wrote: > >> With 'commit 461c1a7d4733 ("gpiolib: override irq_enable/disable")' gpiolib >> overrides irqchip's irq_enable and irq_disable callbacks. If irq_disable >> callback is implemented then genirq takes unlazy path to disable irq. >> >> Underlying irqchip may not want to implement irq_disable callback to lazy >> disable irq when client drivers invokes disable_irq(). By overriding >> irq_disable callback, gpiolib ends up always unlazy disabling IRQ. >> >> Allow gpiolib to lazy disable IRQs by overriding irq_disable callback only >> if irqchip implemented irq_disable. In cases where irq_disable is not >> implemented irq_mask is overridden. Similarly override irq_enable callback >> only if irqchip implemented irq_enable otherwise irq_unmask is overridden. >> >> Fixes: 461c1a7d47 (gpiolib: override irq_enable/disable) >> Signed-off-by: Maulik Shah > > I definitely want Hans Verkuils test and review on this, since it > is a usecase that he is really dependent on. Maulik, since I am no longer subscribed to linux-gpio, can you mail the series to me? I have two use-cases, but I can only test one (I don't have access to the SBC I need to test the other use-case for the next few months). Once I have the whole series I'll try to test the first use-case and at least look into the code if this series could affect the second use-case. Regards, Hans > > Also the irqchip people preferredly. > > But it does seem to mop up my mistakes and fix this up properly! > > So with some testing I'll be happy to merge it, even this one > patch separately if Hans can verify that it works. > > Yours, > Linus Walleij >