Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2413557rwl; Fri, 6 Jan 2023 06:11:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXuCG/kh9V7uZ9KyTBsGf+UtKFLcEtjzE1YpEgG87C5rTyP5bG1IbJnn8iVDOxzKL3maL418 X-Received: by 2002:a17:902:c401:b0:189:ba1f:b168 with SMTP id k1-20020a170902c40100b00189ba1fb168mr86504263plk.1.1673014316062; Fri, 06 Jan 2023 06:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673014316; cv=none; d=google.com; s=arc-20160816; b=TNDh2YwUlaBelAGkfsU1qezxVBYtjjrd2wSUiGxNEgpq1pbaVqWkWLg1RItTdE8hYY COuSMQtARg9rqHcqxjwBlOyMtIL/7BJKP9tdrR1ULpZVr6g8dSZq5UkphkOq7BtqCjm4 9v7CoUdn4/UAD7cASL8pYOlVN1JFE0R9qPOzwNQwKfZd+BtVzVha1q6Mj5riqD6cp004 wbfE3rMPmiEmukCuGrKMBtFUS65/X4dcm+h3D3DEnwiaibFVW+c8XuSYe0Mwbmuq4HHi SmRFuBpeiumnvi5CSZFkfnoYblAl1Lgwcf6FPNH20SJ1s6pPLLeI/tn10HaMJpkGvkhr nbtQ== 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=kRSichjsSpl7nn5VML7hlKwtWCxMGkZW9sF0ceCpu7Y=; b=iToWXLf9JmRa3+EEClfVroMOB1XQOvYcA0FQHSp3XPpYwojYPqpFsJoizDZ5RECkak pkLjWMor9c9TCwEhtcm65d6qRp801VzU57EfHwYFyltoSfp2QTkWPLR6rHFMZNOPsQ0Y t8iOPEBbwMl2cHoLRnSTeKB6Q01NcTETiB9x9m8jYcTWIH7Y6APmVOPSq6Pg5VGDGgrY 1lObBif3Fnxgh/iNfVPU5QyF9Db7mYgwunG8WFc8pACdTY604bs+jec0rmHGXJOc381X modaDOZCfz/fhYEn8dsWSWRyamf7nwGMIdg7kJYp+05CSie/+h4sV6Ghs1vFxL2XJbpd HLOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="7nOV/pGU"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020a170902d2ce00b001895031955bsi1210877plc.576.2023.01.06.06.11.48; Fri, 06 Jan 2023 06:11:56 -0800 (PST) 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=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="7nOV/pGU"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbjAFNOl (ORCPT + 54 others); Fri, 6 Jan 2023 08:14:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbjAFNOj (ORCPT ); Fri, 6 Jan 2023 08:14:39 -0500 Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74E5045656 for ; Fri, 6 Jan 2023 05:14:38 -0800 (PST) Received: by mail-vs1-xe2f.google.com with SMTP id a64so1421193vsc.2 for ; Fri, 06 Jan 2023 05:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kRSichjsSpl7nn5VML7hlKwtWCxMGkZW9sF0ceCpu7Y=; b=7nOV/pGUMtVuAg1wKzMZoJfLp+ifawDysT1k1gSKBnWNmZxkNlDd+a9s4ja2CzEzdJ ewZnZ2O3WCbXCqHy6TZO/py3dGt2C+U7slBz7sP6qeoaOzc39Uuz5nGDLtwc3m099+Ba 8Z9AHA/Cb6lncQEDvS6LzH3vDS3i79asj/1VypjVxg7qQuTGxAaWiuKvNl+4D6R1wmoK OHQYm1kXGZLLPW4mskl74LpBC2/eb1aYTC7BRu+SGUu/B84EQC58uVxczdDUNbnVT+ic QyYkKm88vf1vmOk4xMsEfWHHXrDXOXxha6SDlhxu4IBkwSrD7qs2X0/OdJai0afC9zxV Zs1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kRSichjsSpl7nn5VML7hlKwtWCxMGkZW9sF0ceCpu7Y=; b=dZhMoaQT1mRcg2NqynxpBTcJaz7TGIBfkEWJgRPOXZzSL7vKdmT3XIvHopKL6ShE+i mQdx2cPW+ALD6HSwBt9v6qdCKUishi0wGhI/izVLpuQGC66SHd4EtzNKLgUnxsp7Dphz SIzpDWbdqjsyP1NlN0e6OLig9+BKWlXnkCAoA+8fmdMGAMpB4/x9jVYpwYj/SqFgWpc+ 1CWiO/XSgI55m4ikDLH4OsM2TXn47SfDPFdS47BYdGUNILT5A1mBwwR9gqnZ8tz8iaNl Vg+rvwa+vM92ZVORdms3DM0beVFkxiuH1+jSRI+lZsPER7Nu5f86oFJAAFV88awG73BI XV0g== X-Gm-Message-State: AFqh2krBiRSQ2IeExxWwpj6XynRlfslKV/BMBEdMMgeLeVT/r/I26LoE yudkSEjY2C/9IM4UqRICCG1ZeJ0zpvpJoi+4KXIrtg== X-Received: by 2002:a67:f642:0:b0:3c4:ec4b:b943 with SMTP id u2-20020a67f642000000b003c4ec4bb943mr6737873vso.17.1673010877549; Fri, 06 Jan 2023 05:14:37 -0800 (PST) MIME-Version: 1.0 References: <20230105150603.2810510-1-michael@walle.cc> In-Reply-To: <20230105150603.2810510-1-michael@walle.cc> From: Bartosz Golaszewski Date: Fri, 6 Jan 2023 14:14:26 +0100 Message-ID: Subject: Re: [PATCH RESEND] gpio: regmap: use new regmap_might_sleep() To: Michael Walle Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 Thu, Jan 5, 2023 at 4:06 PM Michael Walle wrote: > > Now that the regmap can be queried whether it might sleep, we can get > rid of the conservative setting "can_sleep = true". New drivers which > want to use gpio-regmap and can access the registers memory-mapped won't > have the restriction that their consumers have to use the > gpiod_*cansleep() variants anymore. > > Signed-off-by: Michael Walle > --- > drivers/gpio/gpio-regmap.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c > index f907c9c19fce..fca17d478984 100644 > --- a/drivers/gpio/gpio-regmap.c > +++ b/drivers/gpio/gpio-regmap.c > @@ -254,15 +254,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config > chip->ngpio = config->ngpio; > chip->names = config->names; > chip->label = config->label ?: dev_name(config->parent); > - > - /* > - * If our regmap is fast_io we should probably set can_sleep to false. > - * Right now, the regmap doesn't save this property, nor is there any > - * access function for it. > - * The only regmap type which uses fast_io is regmap-mmio. For now, > - * assume a safe default of true here. > - */ > - chip->can_sleep = true; > + chip->can_sleep = regmap_might_sleep(config->regmap); > > chip->get = gpio_regmap_get; > if (gpio->reg_set_base && gpio->reg_clr_base) > -- > 2.30.2 > Applied, thanks! Bart