Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp430728pxy; Fri, 30 Apr 2021 08:21:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrS+vMGBHcGBd9vq9s0GPWyW9ya81S3N8/98yEZJBNQ1c4tEvAveXggzfSXVZsvZ7qG5Rf X-Received: by 2002:a17:907:2d86:: with SMTP id gt6mr4903311ejc.368.1619796090984; Fri, 30 Apr 2021 08:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619796090; cv=none; d=google.com; s=arc-20160816; b=OIP25sN+57G4hLxbLo6lVeps8ZdFkRXzkAJspE2taCvP1YlojueIV/qWqFctcIElJl qkMkfzssFsEER3xKQqXBNEW4TlFNlEx+1MbtQ3JOJRE64AnZCdoyb5gJOs5teUefKa9D F0tIIjMT6OGPSgnJSl9ydmimzh8g4nPWWqGN+HanFBWl7m9I2GvnSiH5Q6+hflw3N7MG yAEqe52BCyJhKB8bn4pc6tEZqL1KfZJj6X+bfK4q2BIKXQ5QyUGbZxXhf0IwCLqhttNC XhV7Sl13nElErDeQKxJAYw9wRJ6XTYKOALXYxS/vsIDQPRPSXAaSxChDjVKyFVtyas2a 5PQw== 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=ENA3ABoJbCZuijsVd4K0y84DVv2hOGedvQdYNfFhILE=; b=yuCOwivYIcIm9jGQXEWB48EGbBvE3U+irzHML1I7UjJw6pLbgrCAUFf+wv8gN8GtKO BOH6E58qms6j1a9Jm/NqwwLtk8SvzSKVWLBOeBQf7sOF5dS6VxgbeiZAjj9Qc5gvqVF+ LA6EbMQDxi373Lbgrqw5xZI5krZL5OBe6Qy+Vbf+spCP9SST+mENbDcxuaGDWGsY7icw 3npbPz/RFEt/oSCwMAoid5Buj+3gz3Jpd2Isi3CA+kfRcksmQ0Apfu8pBR0MZRG/3gqX o8P48lRklY+YNFb7QatikQXpQIlCSm1chzrmRoPTOU2kwcf+JXFbT/Mpy5JM4SfAbst+ F6bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j5p6Zd7c; 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 c16si2395271edw.499.2021.04.30.08.21.06; Fri, 30 Apr 2021 08:21:30 -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=j5p6Zd7c; 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 S230366AbhD3PUb (ORCPT + 99 others); Fri, 30 Apr 2021 11:20:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:32968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbhD3PUa (ORCPT ); Fri, 30 Apr 2021 11:20:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A772161407; Fri, 30 Apr 2021 15:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619795982; bh=ENA3ABoJbCZuijsVd4K0y84DVv2hOGedvQdYNfFhILE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j5p6Zd7cX8GW9SXLUoZBJ5o8HJfiKh14Hoi8wieFH33H1S0f27HIYZ5bfTh0TSkwC 1wMJCtDUgI1dvRQBsUquWVzL8WdnotvMAFpFfkH6vx0xP6K6wJvkEipQd73LC9K+0n DkrKZATabQRihQlPmkdFKAReuNREFT954iq2X3TSqhQgL8aVigJVwXn4Uooap/fjvU 7pCVTFtLoCfph7WNlRDRmad99V9Fu9uSiwJypKshZ8woaZYKKWwNJj5ZGvrvFfcjbe SVJXzxjjqSVqrF8ROINLpEzzCMG/AADm+Apka85SnamquX0qjlt/nKtZ8DcpT1uZtg uCOs5ajtCkBJw== Date: Fri, 30 Apr 2021 16:19:09 +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: <20210430151908.GC5981@sirena.org.uk> References: <20210430130645.31562-1-michael@walle.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HG+GLK89HZ1zG0kk" Content-Disposition: inline In-Reply-To: <20210430130645.31562-1-michael@walle.cc> X-Cookie: QOTD: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HG+GLK89HZ1zG0kk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 30, 2021 at 03:06:44PM +0200, Michael Walle wrote: > Sometimes a driver needs to know if the underlying regmap could sleep. > For example, consider the gpio-regmap driver which needs to fill the > gpiochip->can_sleep property. Whatever is creating the regmap really ought to know what device it's dealing with... > It might be possible to pass this information via the > gpio_regmap_config, but this has the following drawbacks. First, that > property is redundant and both places might contratict each other. And > secondly, the driver might not even know the type of the regmap because > it just gets an opaque pointer by querying the device tree. If it's a generic GPIO driver from a code correctness point of view it's always got a risk of sleeping... --HG+GLK89HZ1zG0kk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmCMH+wACgkQJNaLcl1U h9AwsQf+OapHHPJboJLbJVrs6ODnuJ1aJa4YJWqxhqh+/mJXRRYsV4O9PDFacYDT aFqHwzvB364wtityGw0MeeOOVEfvjkrMeVaPfUf6vegIcpMzKAqv5KOxo7fXLHGV Zz6QoVuhqq4fKRV+LOEQ6whDaKqm+YhleQN5e5rQgPiI6ipwVk7DtBqLnibZqj5I zWWp66hKrqGeiimSdc3tUyNBv5gQjdXzRg4r9WKBHByPyzQH5PN/j0xiRK2x+nzW Gkj89BSRB/huHGHErNvdYTyjcFbsrWbWFwDeEcbvtfUhVEyGrojWR5tlZhRnvMtw R1U3GEY84VSjdbkSjenuatTpfBk+1g== =DSyN -----END PGP SIGNATURE----- --HG+GLK89HZ1zG0kk--