Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5086907rwl; Mon, 3 Apr 2023 14:14:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNLg2bgZKnBDATs+GnInFvqjlf6wN7hawUkHTARSWzRHgadny8l3s2qTWB9OeJV+o03Ojz X-Received: by 2002:a17:903:ca:b0:19e:6e00:4676 with SMTP id x10-20020a17090300ca00b0019e6e004676mr284216plc.61.1680556486041; Mon, 03 Apr 2023 14:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680556486; cv=none; d=google.com; s=arc-20160816; b=xPx0IHPzpKYubJFJplNKMrxqQFA+deLDfD6jA0m7G91QjjeQtaaIpHPXron3S0ngK+ LxjWFahoQ/Ctm5Cgx+jdnslQmmgHdrHRuMYrfHFVIcj7jhNMR39G1ZjDWveTEegGsZdn /DiNrbBKHUlh0J27O2RGkCTGygJGxxWXSWto0Blm2apARmoIuzKXM5qFu7ehCqecjeIH KAC4vRjj0gfaIQnccKDo23rzNIdisqsHyD6XzsPaGCLTtXtsH7xYV1o0FMRREgH7AIWb KtvBUiz3caNxGD8bYD7h0G9uQOhPAAWvfPo3gqfjEpKBIQqvsTZ3+2JTunVj4Ihe2fpI XSKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l8qtZDrZr72qEk8LdmovuElbdEALBeEMGS6nGnji+CM=; b=RCtSB7oY1J0/X2TTffIkR95TMvK5qWqbLg5qecJJ9MAOX9pYOHZu5S3VICzPyNq8hi 482qETgQ6PUQfxE1o9dwqzhkyn2I/GkGOTPqtb2lY9liBvrkcrqtX2lrcqkshLRdr3nF np2sDwItXprK84acmElsTQhdu9Nlxm5A4lwkoCl8LVOz7I5sCagu87dPrxHwBlsoKmJd IoC3+5Zwg3RgfC8kHJBmd8lj22VglRoQE6X2P6VuMiPaZmRyeqwPCDa5Xd0SLqnLkji/ B7/ctAxa2cQUG3QsioBMKy9CfaffVAylobTG4wnUsSTTXjCjxv+0PcTttZMfHnHi4Whv F8WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ew6PlLhL; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6385c3000000b00513cddc06b8si5850380pgd.531.2023.04.03.14.14.33; Mon, 03 Apr 2023 14:14:46 -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=@kernel.org header.s=k20201202 header.b=ew6PlLhL; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233607AbjDCVMw (ORCPT + 99 others); Mon, 3 Apr 2023 17:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232805AbjDCVMv (ORCPT ); Mon, 3 Apr 2023 17:12:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC1910C4; Mon, 3 Apr 2023 14:12:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5110C62B49; Mon, 3 Apr 2023 21:12:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD9CFC433D2; Mon, 3 Apr 2023 21:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680556369; bh=iCh41tCJEiTL5kJB6L+K+Erci9/82HsLmf/I2b6bZlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ew6PlLhLzlc1ejJQKbYjjKCMriDMCCqkDzZ5sdfXfDTDnssV2w1v2RNR+CpVoHoh5 i9m1E9IwmX66TrwNye2oztPt1Hjdo1rC7++4wvuWqN2wLTcK4VkYmhskfv524fuTbx CGmnOzrTos/54LS39YgRwWfworr0nAMKpXq4H5xOlTMM7Wy1Mbr7GOuqb8qvS0k6Na L5zyE7nfe4NMm9VfQDhljVxdBr2raavkezZw6/stdg58VtcHTEr8Fiwc9UquVNKcZS rkGgkG2HWW7Od3+eAaK5cnxpFnOTSU+NinnkKKcfNXRaKyJoOeQTS43gOXmnmsbCKO ZRBebhUlGhA/Q== Date: Mon, 3 Apr 2023 22:12:44 +0100 From: Mark Brown To: William Breathitt Gray Cc: Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, techsupport@winsystems.com, Paul Demetrotion , Michael Walle Subject: Re: [PATCH v5 3/3] gpio: ws16c48: Migrate to the regmap API Message-ID: References: <58531b1b2428e4d5d2ea79e721f7ef6450665280.1679845842.git.william.gray@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bT3UYpp4c8gGNugV" Content-Disposition: inline In-Reply-To: X-Cookie: Membership dues are not refundable. X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 --bT3UYpp4c8gGNugV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 02, 2023 at 10:39:02AM -0400, William Breathitt Gray wrote: > On Mon, Mar 27, 2023 at 02:26:37PM +0300, Andy Shevchenko wrote: > > On Sun, Mar 26, 2023 at 12:25:59PM -0400, William Breathitt Gray wrote: > > > +static const struct regmap_config ws16c48_regmap_config = { > > > + .reg_bits = 8, > > > + .reg_stride = 1, > > > + .val_bits = 8, > > > + .io_port = true, > > > + .max_register = 0xA, > > > + .wr_table = &ws16c48_wr_table, > > > + .rd_table = &ws16c48_rd_table, > > > + .volatile_table = &ws16c48_volatile_table, > > > + .cache_type = REGCACHE_FLAT, > > > +}; > > Do we need regmap lock? > We make regmap calls within an interrupt context in this driver so I > think we need to disable the default regmap mutex locking behavior; I > believe the current raw_spin_lock locking in this driver is enough to > protect access. The above doesn't configure the regmap locking so you'll have a spinlock by default (MMIO being a fast bus). --bT3UYpp4c8gGNugV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQrQUsACgkQJNaLcl1U h9CqqAf9FQjwis8MhjhP8nggcH+Uy1nBfbCZAZoBxcGt2KoVGlL02rn1j2xZvRq+ cDL4HypzWQ0kPMWd7emRcoerwa6YkDrvj3B3bC9zY1Gg+wjYWqe+EcFlMRRxbp6o ZKa8ef0vj1Yk3aq54rHzXZf+2t5rxTe8bF84hDV2eq4lTbYQUGxCWh0Vf/yQkrBw LAYJ1MoboaBVmerUKDuBmpZZeK6EjOVKPj4NK7XUOnAXtTEKms9w6jdzzi+FPjmm ewdoceQ25lFQDwLJqMBvi2rFBlb5PChR1lxbL8JHp6M3TB4F5f8TQH/LY+hi50Ye LgmaVHQSyamtrvPgChs/q/n6wZsqvg== =zgHq -----END PGP SIGNATURE----- --bT3UYpp4c8gGNugV--