Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3643508iog; Tue, 21 Jun 2022 03:02:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sNHNuzfjQs4WNi+7G+Fh2N13uesa2UA6bZ336vAlvVkM/v4PkBO30dE73v/3R6GXjMIc47 X-Received: by 2002:a17:906:7297:b0:712:56de:3c43 with SMTP id b23-20020a170906729700b0071256de3c43mr24411748ejl.549.1655805734597; Tue, 21 Jun 2022 03:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655805734; cv=none; d=google.com; s=arc-20160816; b=Zb7JMBkRR5YxuuPBgtPMRakrTznOcvbJFkNxT8Mh5HcJfIYp90xnqwD8r8TVY27SG/ /6UfLYf+1yhQ+Jmz+SOECjZNcB4LswqhwPKHykfz8ZL6JaW0YqT5PP5NQtzv2td1t4nA VZWdpJ3r/yDIZzmodUpbsdyNiA/9WmMgokoTju8FBUte6ZUz/HUWgILwd0KB/z/My+EN 48+1rK4ONhhzqgH+GmLXPoyeZlfOLJ7ao5k5GbPekPNMBe4ORD3BsC2NWStbB2DTtnjf CmdJIpIot+eaVP4OtIsLOykXbGhh+UaM7JVXz0cmX7bfL6MqhP3h7SilwqJoItvlyi1O FsuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CTHYGS8g7sCFv5p4IGpE8ByIK0vfNIUXHpKKS2cHepQ=; b=sWM7ErWY4DOu9ByNbS4wtM3VPW8a6B8kuFzzMhscoz84pTJIEQwnAjkjVb/XgBcWh2 Sj1n1l5oAWpNJX5dTIOIvF0YjtDVMaYqL6Zn6f9WIPGYvKVE2RJm+LY+fJaVQtUF1YZx 7qiCpYq16PbZAOVDjL+6s8OFVMC1nNMwVbQLyopOVAK/QQAkoXH3OIXDQ8hExbSU0Lw0 vJp7JAn+ufx1gD2q5SVPGlmEwepECvoA71hR/C5S1wAmGC2t5TRnPaR4Wf47UZq760tE a6ngqUj7vmunFfdAburVPFtQ51/I2qBM/9HlgNlrDBb6JmmlPtRShXMoDKG2iH/O2zsY 9q2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aZan9a+4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt11-20020a1709072d8b00b0070560397963si16834970ejc.233.2022.06.21.03.01.48; Tue, 21 Jun 2022 03:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aZan9a+4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348831AbiFUJp4 (ORCPT + 99 others); Tue, 21 Jun 2022 05:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230328AbiFUJpy (ORCPT ); Tue, 21 Jun 2022 05:45:54 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71FE327B3F; Tue, 21 Jun 2022 02:45:53 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id o10so18580215edi.1; 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=kZUo2jRznMp5XfjLcAuBeECKC8lzI+QsrE70OpVq5nC5q5O9ihG9d6rp2lAlPR/xAb zltZSQlGuK1WzBpBoy7IKOyrbkf6zOIfbjcPLkOA2QCkGP32i1GfwR0QJht0jYSPwjsb twQAxEj/AWrTp2BXgPRyqA1/I+OEaJ3y02Oi23YqiGdKeBGXGWlf6YEyNs3rnK3MnVIR s15QPax3CIrY+vZNto8dpEvi4UDkmrzaYNGQf+LSp9IZdLTpP8Au+zuHPeyf/6OsRqEQ A15twnYf2srpKYdMwShgUF+ktJEttgRJ29o1UuuaGpgcD1mr5w85tAsr80DjelB56rMI R5Ng== X-Gm-Message-State: AJIora+7j6MNdvZ9wR8Fo4UTzv+8y9g0YeDx7X0ovV2EIKlXUKYVuwa+ 36JCxSctVAQG9AxXjjbGJs/rArVYDqBN9cK/SkM= 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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