From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7DBFEA4 for ; Tue, 21 Jun 2022 09:45:53 +0000 (UTC) Received: by mail-ed1-f51.google.com with SMTP id es26so16870435edb.4 for ; Tue, 21 Jun 2022 02:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=aZan9a+4JhusAULYzHK4QFgDvTJUfc7zekQyAVoRGCyOHUagzlr3IY3SntNiCuk2D1 NQjyRuwmILTBnDHyj8RbP6weJG7bsYc7fpeAX5WMX7NI80xLjR2pEQelEAuHWyLISW03 dZaw/laN5sK9zCYrzCpBc92fUeGmzlgcNNnV+C/p3f0do3S2Xro53gDdPjHT4fWtJj81 rYkou1ikTNpl6+XOXXlO5K890puNv8x9VBAb1IKHcoUKaWjKVctK6anPKEkAjSj3/2W5 5VnldB0KCYV6EffLfKh44jApav4JdfNauC+sb7GhpOh85EPNh735t0b35swaLkY44kt/ +liQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=oxBkDI0p2z6r0usuxrSZ4ezbTVAwjZyMCjWgpXZmZIHZroi6x5jF3PgU9QHZ1OWvCT IA3Ajk0YtTLp7m2J5j2ee/6cloZUqGTQbG62CuM2KP/jiCf87b9+NovXAGoYYPgvNknE dWJCOkvCdj+PcpRekBIk/nu/R2d2QDoOZrP7XOhpPXk68R5X6/W6c0cBjt/ahuOVrzhX 5tmCC1BN2vtA+nqAcRCR9BzIXSdbni4wOlgLoLYFZebKzBySBsQ8Q0AtE0NQ92CPsT+M pl3+g+6+Dry79eiTvYtTZ7pJ5pndyZs/bS5uJUrypIITQUvrtMbiE1lgITy90ngjuUfm SOAQ== X-Gm-Message-State: AJIora9JIjpk2+C+Rlc+VBwfeRiyykavgMTRjPChL+TGQekK7rsVosbn FxwIKfofSDXyN9+6ZsoXj4A9mC48tP5Psq/7lbU= X-Google-Smtp-Source: AGRyM1u+LlqfMEeQQX/kZr8ewmIWAzmzCCS9cETMG4/8g63994DOIJmrlDmEJXOU2GEP6EkqBPGnv4N6VF0F7gWLvvI= X-Received: by 2002:a05:6402:f8d:b0:435:6df2:68a with SMTP id eh13-20020a0564020f8d00b004356df2068amr20143116edb.209.1655804752004; Tue, 21 Jun 2022 02:45:52 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20220620200644.1961936-1-aidanmacdonald.0x0@gmail.com> <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> From: Andy Shevchenko Date: Tue, 21 Jun 2022 11:45:15 +0200 Message-ID: Subject: Re: [PATCH 46/49] regmap-irq: Refactor checks for status bulk read support To: Aidan MacDonald Cc: Mark Brown , Andy Gross , Bjorn Andersson , Srinivas Kandagatla , Banajit Goswami , Greg Kroah-Hartman , "Rafael J. Wysocki" , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , Michael Walle , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Lee Jones , Manivannan Sadhasivam , Cristian Ciocaltea , Chen-Yu Tsai , tharvey@gateworks.com, rjones@gateworks.com, Matti Vaittinen , orsonzhai@gmail.com, baolin.wang7@gmail.com, zhang.lyra@gmail.com, Jernej Skrabec , Samuel Holland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , linux-actions@lists.infradead.org, linux-arm-msm , linux-arm Mailing List , linux-sunxi@lists.linux.dev, ALSA Development Mailing List Content-Type: text/plain; charset="UTF-8" On Mon, Jun 20, 2022 at 10:11 PM Aidan MacDonald wrote: > > There are several conditions that must be satisfied to support > bulk read of status registers. Move the check into a function > to avoid duplicating it in two places. ... > - } else if (!map->use_single_read && map->reg_stride == 1 && > - data->irq_reg_stride == 1) { > + } else if (regmap_irq_can_bulk_read_status(data)) { > While at it, you may drop this unneeded blank line. > u8 *buf8 = data->status_reg_buf; > u16 *buf16 = data->status_reg_buf; -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0EAEC43334 for ; Tue, 21 Jun 2022 09:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JS1ENlaAb+ygqfgWmLYrywa5degi7uE4bC7tle/lcR0=; b=219o4bGJk7JcKu 4NarOXG97pYmbAe24dLQGixzXGyArywLQwQUq72BEbbSyY4MqUB8n9S8Tx8W/HrM4VdD3Y2wQ+uze nLr4KLEikdqvYnhVrheTo28JjTMfMXtFsCWj8R2m02qseUvGKGDCFtmbmAbJmD8HNwHHb3+0O03o4 JuzmImMAGgqmAzku7c+GABctLSfLWu2KbX1c0YDThOUVMedHaLwddtzCLS+18vXNT6ekofk2yK1XW A04ZC1OBWjIrhIJTB7aucsJalUtAg01q4EpJH4aCAqZKuq1XLCVXy1e+vhBklE8mGp6vXMDvhDouD XYXuDtqnvBezT5w7FHDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3aSM-004jCi-VR; Tue, 21 Jun 2022 09:45:59 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3aSJ-004jBL-Jk; Tue, 21 Jun 2022 09:45:56 +0000 Received: by mail-ed1-x52e.google.com with SMTP id eq6so11240138edb.6; Tue, 21 Jun 2022 02:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=aZan9a+4JhusAULYzHK4QFgDvTJUfc7zekQyAVoRGCyOHUagzlr3IY3SntNiCuk2D1 NQjyRuwmILTBnDHyj8RbP6weJG7bsYc7fpeAX5WMX7NI80xLjR2pEQelEAuHWyLISW03 dZaw/laN5sK9zCYrzCpBc92fUeGmzlgcNNnV+C/p3f0do3S2Xro53gDdPjHT4fWtJj81 rYkou1ikTNpl6+XOXXlO5K890puNv8x9VBAb1IKHcoUKaWjKVctK6anPKEkAjSj3/2W5 5VnldB0KCYV6EffLfKh44jApav4JdfNauC+sb7GhpOh85EPNh735t0b35swaLkY44kt/ +liQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=gMM1jUt9AC4M8byAO2zZMM/xh2gSn0q11H2ax1i70j6tTmgoKjvYjh8OTkAnYfaL+R zqdUqpMC/xQMXBtw7YZ35RQJWVa5j6+oKWR2HCDSfLDaXFK3bJtoi5O1KceIZEOUqKzw +de95hcCjnfMAfle6tc4LGYvnxC6s6TCVSU0hy9cW6mygHpJR0ynHGIDfUIbSBCpbLjC aNu2P1k27KNjUDw4yvk3t4furhKU1WtemGKE+LyRMhTq/EDaqJIwMXHdIE7jvh5LzF6Q +T9RBpdmaOhLGpVa62DhfVVw/7541CDRmCtpXUSgwUq96CpCCA+VSjFILNYo5JX6LgIh gK/A== X-Gm-Message-State: AJIora+GGwq/8bnE+wKkZ9mAAAQZpkJZTs2OddQ7OT5Ca0r3WTQOEraK 5dj3ys8e8c5QyGwH86Fu8tZ5yn0u9CYG4iy+lLU= X-Google-Smtp-Source: AGRyM1u+LlqfMEeQQX/kZr8ewmIWAzmzCCS9cETMG4/8g63994DOIJmrlDmEJXOU2GEP6EkqBPGnv4N6VF0F7gWLvvI= X-Received: by 2002:a05:6402:f8d:b0:435:6df2:68a with SMTP id eh13-20020a0564020f8d00b004356df2068amr20143116edb.209.1655804752004; Tue, 21 Jun 2022 02:45:52 -0700 (PDT) MIME-Version: 1.0 References: <20220620200644.1961936-1-aidanmacdonald.0x0@gmail.com> <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> From: Andy Shevchenko Date: Tue, 21 Jun 2022 11:45:15 +0200 Message-ID: Subject: Re: [PATCH 46/49] regmap-irq: Refactor checks for status bulk read support To: Aidan MacDonald Cc: Mark Brown , Andy Gross , Bjorn Andersson , Srinivas Kandagatla , Banajit Goswami , Greg Kroah-Hartman , "Rafael J. Wysocki" , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , Michael Walle , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Lee Jones , Manivannan Sadhasivam , Cristian Ciocaltea , Chen-Yu Tsai , tharvey@gateworks.com, rjones@gateworks.com, Matti Vaittinen , orsonzhai@gmail.com, baolin.wang7@gmail.com, zhang.lyra@gmail.com, Jernej Skrabec , Samuel Holland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , linux-actions@lists.infradead.org, linux-arm-msm , linux-arm Mailing List , linux-sunxi@lists.linux.dev, ALSA Development Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_024555_706923_75A584EF X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 20, 2022 at 10:11 PM Aidan MacDonald wrote: > > There are several conditions that must be satisfied to support > bulk read of status registers. Move the check into a function > to avoid duplicating it in two places. ... > - } else if (!map->use_single_read && map->reg_stride == 1 && > - data->irq_reg_stride == 1) { > + } else if (regmap_irq_can_bulk_read_status(data)) { > While at it, you may drop this unneeded blank line. > u8 *buf8 = data->status_reg_buf; > u16 *buf16 = data->status_reg_buf; -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09155C433EF for ; Wed, 22 Jun 2022 15:41:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 49FA0280D; Wed, 22 Jun 2022 17:40:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 49FA0280D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655912460; bh=UfTwuxijVWdhV7QEtSaVKdi1g5VARHr70jUKi8xmdsM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YHIG86+HTp5um9M7CNrNZ+y3Z+ydKbwy6mSxAuwQeQDW6GOgIati0jstGXkE/RcuK KI8BgeC0uoQ7fHWPFfI6nPMtasyVilzduMr5RyAmQ2b/TIwyGMLzfo8J5mgI+ZIZv3 fe0C7lj80L+FIhPyyX6EkT/jpe0fuD9uBAYnb1fU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C8935F80735; Wed, 22 Jun 2022 17:24:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42D92F80155; Tue, 21 Jun 2022 11:45:58 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B4E46F800E3 for ; Tue, 21 Jun 2022 11:45:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4E46F800E3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aZan9a+4" Received: by mail-ed1-x52d.google.com with SMTP id cf14so8805681edb.8 for ; Tue, 21 Jun 2022 02:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=aZan9a+4JhusAULYzHK4QFgDvTJUfc7zekQyAVoRGCyOHUagzlr3IY3SntNiCuk2D1 NQjyRuwmILTBnDHyj8RbP6weJG7bsYc7fpeAX5WMX7NI80xLjR2pEQelEAuHWyLISW03 dZaw/laN5sK9zCYrzCpBc92fUeGmzlgcNNnV+C/p3f0do3S2Xro53gDdPjHT4fWtJj81 rYkou1ikTNpl6+XOXXlO5K890puNv8x9VBAb1IKHcoUKaWjKVctK6anPKEkAjSj3/2W5 5VnldB0KCYV6EffLfKh44jApav4JdfNauC+sb7GhpOh85EPNh735t0b35swaLkY44kt/ +liQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=aU+x20ImFj7BDwFPpktIL0OVNrIlxvBriW9KqKPZMPHHoZ9peI3IBa03i/7Zz/AlWR 7UZxAqwl/h/JLdiNZLOEhAttPaQwtLcG4AXqUZ0SDqnQI48pPK68TlScp9pyJA3gH8Wf LU3nEWGx/IhyXacF83jjnow847M3aFeJUWvaZFOIdDfnO67zwjyB3b4G81O20WYLGGvI df74Lb+u61cg9fvDjUdG2S/0WjDmvquXzfICIdM3Lm4yX2UrD/318Cd92Kb6DY4fwqHd oL+Del4O9dnSuj25bf9pWZ0bCC9B0yHxnXInONVb0eyGgagefP8fcUyGHAPADlx+LHeI qQ+Q== X-Gm-Message-State: AJIora+tpMJIdYIt69xZmrFXOXpDpN0qOrAnXMm2B7P82oSfypK/dwCg dTzKESnncgQjAgfncFXuknViMP26qDWte0++Mwc= X-Google-Smtp-Source: AGRyM1u+LlqfMEeQQX/kZr8ewmIWAzmzCCS9cETMG4/8g63994DOIJmrlDmEJXOU2GEP6EkqBPGnv4N6VF0F7gWLvvI= X-Received: by 2002:a05:6402:f8d:b0:435:6df2:68a with SMTP id eh13-20020a0564020f8d00b004356df2068amr20143116edb.209.1655804752004; Tue, 21 Jun 2022 02:45:52 -0700 (PDT) MIME-Version: 1.0 References: <20220620200644.1961936-1-aidanmacdonald.0x0@gmail.com> <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220620200644.1961936-47-aidanmacdonald.0x0@gmail.com> From: Andy Shevchenko Date: Tue, 21 Jun 2022 11:45:15 +0200 Message-ID: Subject: Re: [PATCH 46/49] regmap-irq: Refactor checks for status bulk read support To: Aidan MacDonald Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Wed, 22 Jun 2022 17:23:18 +0200 Cc: ALSA Development Mailing List , Banajit Goswami , "Rafael J. Wysocki" , Linus Walleij , Bjorn Andersson , Srinivas Kandagatla , MyungJoo Ham , Lee Jones , Samuel Holland , Marc Zyngier , Bartosz Golaszewski , Manivannan Sadhasivam , Krzysztof Kozlowski , Jernej Skrabec , Chanwoo Choi , Chen-Yu Tsai , Andy Gross , orsonzhai@gmail.com, linux-sunxi@lists.linux.dev, Bartlomiej Zolnierkiewicz , linux-arm-msm , tharvey@gateworks.com, linux-actions@lists.infradead.org, "open list:GPIO SUBSYSTEM" , Mark Brown , Takashi Iwai , Thomas Gleixner , Cristian Ciocaltea , linux-arm Mailing List , rjones@gateworks.com, Greg Kroah-Hartman , Liam Girdwood , Linux Kernel Mailing List , Michael Walle , zhang.lyra@gmail.com, baolin.wang7@gmail.com, Matti Vaittinen X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, Jun 20, 2022 at 10:11 PM Aidan MacDonald wrote: > > There are several conditions that must be satisfied to support > bulk read of status registers. Move the check into a function > to avoid duplicating it in two places. ... > - } else if (!map->use_single_read && map->reg_stride == 1 && > - data->irq_reg_stride == 1) { > + } else if (regmap_irq_can_bulk_read_status(data)) { > While at it, you may drop this unneeded blank line. > u8 *buf8 = data->status_reg_buf; > u16 *buf16 = data->status_reg_buf; -- With Best Regards, Andy Shevchenko