Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1322338pxy; Thu, 6 May 2021 05:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdBEQkBpRzep9WEeHrk2qI2EKwq8NGDfY40M3bvfW3kOfYY0xjdHq8O7YG8EXP9BYawMLg X-Received: by 2002:a17:903:3046:b029:ee:f24a:7517 with SMTP id u6-20020a1709033046b02900eef24a7517mr4275659pla.17.1620305142522; Thu, 06 May 2021 05:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620305142; cv=none; d=google.com; s=arc-20160816; b=LY3lsoHuKaUKooIW7yUNltgMrf/d+df99UVZbQE6dbR+lAlkiKL6Z/1+oGq5mQLTiw MliovQR6swD5a4SJFwX3b4OlPKZyHatZ0uvqFpPd4wdza2wtJAQZYvGnsaT84LUWQmqC /hWOtDOXco334NRiJ0RzelBw9XIbX6NNEvgcnhd9UwCcY6w08fdhjtCzDt1le/+vQB5y GRTgSFrfwOPYGqdjjvvWyu5zxR+aa5bdpM/T28isO6IRKweYHLjTneanCU6zUry2HEUp OT1+vMLfzvYsi3V9oxL6a4Ol7ppQ8umnD9PZW0lNGlhhT8KTZjYf+5+V6A8d7LoX1bz2 EjRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=WGijDw8g4qTjginfox/1uU3LUtPEhOxci0bz58yzVP0=; b=Rg1ZjNahxejgKqbVB9FkhKcyehbSjOACEH/SirRWo/1n8BiFNUOZPKHkoJS5viSIpf P0y/5JlUR202KaROr4aWd8bpv1mvUSMm7Nfn6PqZ7NEFux5E2aAge9cxFSVDnTlF/B8W TGPeJIDfDm7uISYniM0no+lQv8ZyZ7oGIaOfG0YYz0tAN4D+bJ1+8dty3A+BZtLRtKxZ YWHJFGGMRiIyzeYINgK1EZQcbIsF3FSoML+gNabkRQIsV91lBQmdSBKHCvMxV4IXC8g3 kr7p7PGiXJXWjjYErYBusfyekq0qbyX7+cvC+Ru4fmdT8EmD8lHrrNYqp2NP4+01+5pO 8w0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NStFqnvN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si2814759pgb.465.2021.05.06.05.45.30; Thu, 06 May 2021 05:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NStFqnvN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232084AbhEFMpU (ORCPT + 99 others); Thu, 6 May 2021 08:45:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:38976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbhEFMpT (ORCPT ); Thu, 6 May 2021 08:45:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BF4B613C2; Thu, 6 May 2021 12:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620305058; bh=ZYYq1/bAyD5Y4EByZaOxo773L78ziclPTpbCUsIZSSI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NStFqnvNeAnQkiwPNoohMf/Ty3XfhD8Mgij9OP2lBTP5mbS+Bg5375VtBN2UO0Mzs Sa6wqW5hMm9WIwGKEHCwYJbIvnc9Fz4Dy0jRl9myii3jPs8FoM3NgEiPwOKVtvQxUf mLlrPrXFvxWZ/LN2dVj/oJLjyX79+Yy4yPvyVbd5kk9euc2W4+6KFhpKMSYr3/nNyJ UwQr52DkhzlzTRLVWlEmLNt/GfWRO5sUEgDlQz5oOJsbYH1oSNsgyqg0MeLq7Dj0PH mLzir5HqyuhGiPO8MbO89sTHxI/26n9MjWag26Cv3TO/Vpse/1FfkblHQdtZDtWg7X 76QRgtmD6zyNg== Date: Thu, 6 May 2021 13:43:42 +0100 From: Mark Brown To: Michael Walle Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Subject: Re: [PATCH 1/2] regmap: add regmap_might_sleep() Message-ID: <20210506124342.GC4642@sirena.org.uk> References: <20210430130645.31562-1-michael@walle.cc> <20210430151908.GC5981@sirena.org.uk> <20210430172603.GE5981@sirena.org.uk> <128a6d51af1b7c9ed24a5848347c66b9@walle.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline In-Reply-To: <128a6d51af1b7c9ed24a5848347c66b9@walle.cc> X-Cookie: If it ain't baroque, don't phiques it. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uXxzq0nDebZQVNAZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, May 01, 2021 at 12:10:16AM +0200, Michael Walle wrote: > Am 2021-04-30 19:26, schrieb Mark Brown: > > But that's a driver for a specific device AFAICT which looks like it's > > only got an I2C binding on the MFD so the driver knows that it's for a > > device that's on a bus that's going to sleep and doesn't need to infer > > anything? This looks like the common case I'd expect where there's no > > variation. > You are right, at the moment this driver only has an I2C binding. But > the idea was that this IP block and driver can be reused behind any > kind of bridge; I2C, SPI or MMIO. Actually, I had the impression Is this actually a way people are building hardware though? > that all you need to do to convert it to MMIO is to replace the > "kontron,sl28cpld" compatible with a "syscon" compatible. But it isn't > that easy. Anyway, the idea is that you don't need to change anything > in the gpio-sl28cpld driver, just change the parent. But if we can't > ask the regmap what type it is, then we'll have to modify the > gpio-sl28cpld driver and we will have to figure it out by some other > means. Well, you don't need to change anything at all - the driver will work perfectly fine if it's flagging up the GPIOs as potentially sleeping even if they end up not actually sleeping. > > If users happen to end up with a map flagged as fast they can work on > > the whatever driver uses this stuff and not realise they're breaking > > other users of the same driver that end up with slow I/O. The whole > > point of the flag in GPIO is AIUI warnings to help with that case. > Hm, but as of now, the only thing which makes the gpio-regmap driver > slow i/o is the regmap itself. Surely it's just a case of the device that's creating the gpio regmap setting a flag when it instantiates it? It's just one more thing that the parent knows about the device. This doesn't seem insurmountable. --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmCT5H0ACgkQJNaLcl1U h9C1jgf/fMsa7iuDhVuCYqM7GgShZSTiST2PU/FnbNwb2PTBPf7hOg631X0qGP4m eDKkTfJo7fiISjBASO6TWtVUeRu5jEGImhVG6Spr4SdYv5PCry7IcoStNVRO8l2t BDT4WzkGdCOL8eb2/UGkaeKV97jQygY91QBdduDKgJ/x5E8+9rMbTfnFBf4Rk1Ye 39zJiOtabMrmwvFX5riGzjJ0+NNgjeIT32j1yFl76gvnvKNrk0W858TF9KfgTce3 T3GD1bEpWhpbYIjybPwWxn2fex5Fx0mvYPcMeKSXTwF2RZ1vpnXyEznmla7N4IaO oBOxXEeXqMr0DTFUe6km+Dth65wY0Q== =mkkW -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ--