Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5155617rwl; Mon, 3 Apr 2023 15:29:10 -0700 (PDT) X-Google-Smtp-Source: AKy350YLWWVRsepzjPxoZDLxGC7rzE/rkm9GsV1kwhyREfNzBmnHCz9AAyYdtmFlLROWAwMJyw32 X-Received: by 2002:a17:90b:4b87:b0:23d:1e5f:eea6 with SMTP id lr7-20020a17090b4b8700b0023d1e5feea6mr463901pjb.24.1680560950405; Mon, 03 Apr 2023 15:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680560950; cv=none; d=google.com; s=arc-20160816; b=an9JjBBedR2c9xDUSooBgrf/o2BieSUUvkajQcpXzfvGTwnSzxB5esCLPUC3ZxB9Pc eoJw7lcp3sC/BZJBGgY2kVTHfiViGPEAe3NnahVMDw2XNnbvVrcNWA+l3Bj99BqKlaVG M+9TyqQFgePrgjLbzWQRhXBZv+kF4dmX8dJDbLsc36Di46FoU5ToqyQiXwKysqX3G5Gs WJGczdqBeYL6cMlgpMNKH+GKs3P/zm/VP0xCsgj1l8fytbruufWEFa/sc980Ci06sYI9 mtWxu3pGj5HJWmN8uGEQIX0A/bz3d5o9Jq9YOv0ymW1gi3mvK9+wF+SKcunHYEUpPTBh G3og== 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=4tpYjQoj3oN1IoUY/Iv8IxUfroJ3Fr1IgWFkmKykvfw=; b=B5hirfcReCOTIM/UOulKqR28iUezypkgB5caC2/AnC4ie130NV3apaXptXzkf05GOx 3aDhJjqUAQQByuC58jl4z1x/7NET/0IxbPuZfsAoJrTqoezWxT8FUs4m1HI80wpMA1BA L7TOmjyoLVTsylyNthBlUba5VGEY3nKwdiKa5+8S03rFWXLx1oibBM+kbzloniecQAFn eH141quY4hYL5jll7RA6Agfmdo2ejTd80q08uwpc09NMDBjEnH2s4wtYl9IovQW9BqhB bJt+f3vu/Dz5vTZTNs/en996aGG19R2CXjxUeXPV3kzqpLPeNbYn8XX8zq5s3ZMQAz8F xLAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HUCtM1lJ; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a17090ade8400b0023a147a7892si8509033pjv.64.2023.04.03.15.28.59; Mon, 03 Apr 2023 15:29:10 -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=@linaro.org header.s=google header.b=HUCtM1lJ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233701AbjDCWVH (ORCPT + 99 others); Mon, 3 Apr 2023 18:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233653AbjDCWVE (ORCPT ); Mon, 3 Apr 2023 18:21:04 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115A44692 for ; Mon, 3 Apr 2023 15:21:00 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-54601d90118so424366067b3.12 for ; Mon, 03 Apr 2023 15:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680560459; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4tpYjQoj3oN1IoUY/Iv8IxUfroJ3Fr1IgWFkmKykvfw=; b=HUCtM1lJauriEzHWd+aWCI2BC8Jq48a1ShnRUosbft5UxPct5+OFyOeCZ8yiBaH+dM XvlbZklHGWDBjrSxJb3S7WHBaMeE7TNRCfDDKyxWoJqEGj6SJpfJc2I1Sujgg0xQGq5O TGNMqh7PO8PND6u+4tHPY0CygO35y1/lzCviyFk1f9M4cN8TZZ80Xe9D+gYHrnIlCgdP 5Upf6ZvrtLzwyU4djqswhaS5ekk+mzcLx88CsIpW9dsiUuFmiwFlf6Lpvy0kLNJRINcX foDoHo94QrviD0U9ABQnD3TktIYD3+Foq2Mkohi5+T1AQtQONhCyyois8ynFG+61p7Or 6zZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680560459; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4tpYjQoj3oN1IoUY/Iv8IxUfroJ3Fr1IgWFkmKykvfw=; b=WUBCH77d753JH82stEWWJtPdA0cKZlJhtenbP/TK4C9LlYYsTpTO+Mog5989qAa1s4 nDRFBOZy90iRKULwSfC+Hz/gLeCvMfpwY0Nl3+XSSy0MdgxTOaOumWNHkmzCFSfasTL7 RJVgV1T966PqtSm+KmqIvd7Y36XFrZdIX/Grx2ijT1k0dSYd8+C7Y5c50cmFSIzm6MXS 70O+Cp6I2TOKpQHk6kZ03Nvzuo04ds/b44K+yO5cRJLHxKRx1JpefTQQ2krkT16M/RJe gYdBXbgrLuiqHN9e3QcVBBg1XxbJC58Q75dlFasYfdUbd2n1w/q5FuVfgBWHR59A97iL 2WKw== X-Gm-Message-State: AAQBX9cR7XmKZYFzTGDritaq+ueGl8wTnxj+363cKRliueTFejYZITPP DZeXco84s1yra0lEm8bP04KffQ== X-Received: by 2002:a81:a00a:0:b0:541:75a3:9bc8 with SMTP id x10-20020a81a00a000000b0054175a39bc8mr434644ywg.44.1680560459064; Mon, 03 Apr 2023 15:20:59 -0700 (PDT) Received: from fedora (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id cg9-20020a05690c0a0900b00545a08184b8sm2794019ywb.72.2023.04.03.15.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 15:20:58 -0700 (PDT) Date: Mon, 3 Apr 2023 18:20:56 -0400 From: William Breathitt Gray To: Mark Brown 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="50JiiM9KWQUDRx4Z" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,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 --50JiiM9KWQUDRx4Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 03, 2023 at 10:12:44PM +0100, Mark Brown wrote: > 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 wrot= e: >=20 > > > > +static const struct regmap_config ws16c48_regmap_config =3D { > > > > + .reg_bits =3D 8, > > > > + .reg_stride =3D 1, > > > > + .val_bits =3D 8, > > > > + .io_port =3D true, > > > > + .max_register =3D 0xA, > > > > + .wr_table =3D &ws16c48_wr_table, > > > > + .rd_table =3D &ws16c48_rd_table, > > > > + .volatile_table =3D &ws16c48_volatile_table, > > > > + .cache_type =3D REGCACHE_FLAT, > > > > +}; >=20 > > > Do we need regmap lock? >=20 > > 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. >=20 > The above doesn't configure the regmap locking so you'll have a spinlock > by default (MMIO being a fast bus). You're right, it'll be a spinlock in this case and not mutex. Unfortunately, we'll still need to change that to avoid deadlocks on -rt kernels [0]. William Breathitt Gray [0] https://lore.kernel.org/all/1466065537-82027-1-git-send-email-mika.west= erberg@linux.intel.com/ --50JiiM9KWQUDRx4Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZCtRSAAKCRC1SFbKvhIj Ky0DAP9IpyENdB034mfM5YZYx5/meDB6ZINnU28U/PqlovWaAAD9Hf4p7mhg2j/v Wxu906U2SCA8gH1bxrcyur4P5T0EHgY= =fMtc -----END PGP SIGNATURE----- --50JiiM9KWQUDRx4Z--