From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH-next 14/20] gpio: gpio-omap: simplify omap_set_gpio_irqenable() Date: Wed, 12 Jun 2019 10:54:57 +0200 Message-ID: References: <20190610171103.30903-1-grygorii.strashko@ti.com> <20190610171103.30903-15-grygorii.strashko@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20190610171103.30903-15-grygorii.strashko@ti.com> Sender: linux-kernel-owner@vger.kernel.org To: Grygorii Strashko Cc: Russell King , Tony Lindgren , Bartosz Golaszewski , Linux-OMAP , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Santosh Shilimkar , Russell King List-Id: linux-gpio@vger.kernel.org On Mon, Jun 10, 2019 at 7:12 PM Grygorii Strashko wrote: > From: Russell King > > omap_set_gpio_irqenable() calls two helpers that are almost the same > apart from whether they set or clear bits. We can consolidate these: > > - in the set/clear bit register case, we can perform the operation on > our saved context copy and write the appropriate set/clear register. > - otherwise, we can use our read-modify-write helper and invert enable > if irqenable_inv is set. > > Signed-off-by: Russell King > Signed-off-by: Grygorii Strashko Patch applied. Yours, Linus Walleij