Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp338389rwb; Thu, 6 Oct 2022 19:47:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59zydi2wRAxxGl4M2ri1YuIopez0woNt2preN7A78scDxIjtHohYTETtuDgXJasCwr5apF X-Received: by 2002:aa7:c78d:0:b0:454:fe1d:8eb1 with SMTP id n13-20020aa7c78d000000b00454fe1d8eb1mr2551653eds.59.1665110831399; Thu, 06 Oct 2022 19:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665110831; cv=none; d=google.com; s=arc-20160816; b=QE8jO8sh5fOcxS79vBl3ocgUxvv9vhyYZbRIzfeZJhwu9i/Q1BiJmWQPBjmWqBNreY GY3yQswe6UM1/WRtUeQCWMEC4d08TmnTLSRN3Ahrv5KMteajmqJT5tpSEQrRgGSd9Nkb rSbLwFmTdN1eiiUbyMHUF2Uf1k0fQQzMKfdUkXY0onTb89Xe8JZf/da+ZRPosUv+K1OZ Sf3z3WjUHq2rKti4lirJ+ZWYybv/GI8n/GsH5HHEnuFSfq72bFNZeK16zXX6hcJ2lP04 y5PQWQgKgvchdaavigtU9NhcoN0Rfd7/J61tfGWkxsorAW5oTHwGsf7Xta9bkJQndCBk N0vg== 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=gzJu3dC/onpgd+XLMoov7q+7N1/RWu9migJt+cNyCZU=; b=vaQTMUmHKmF0GWhNKPCaQhY6vsXojrS4jNkarPBaJeFZG+9vYKmz3lsQq13uzmGbFs 3mYtE/DckHr/SkTLFBx+ryGD34gRTCMn6NXzSHOPvuivWf0n3RPUlXZgjHXjPWZuhvhE VWDYvnSJtgmVZ3cWMRDkau15zmJNzZHQJhvVzoc/eJsfTq4/fQSuohvS0jQituCuQ9Oo jxqzkaraea+YA9HoWodBg8eNDFsuuT/6Nvx3BYr8swYcEu0pHqBeBZ/oL/zbqBh6rh61 hnF5uiyBcXABCUPVJfqhJWV9IsUCPaaKnocaMGCyATrupQ/Nk2/9EyZgm6IOwZIW0AWM m6sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BLRIPRQy; 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 dz20-20020a0564021d5400b00459d4df7a4esi1119724edb.265.2022.10.06.19.46.45; Thu, 06 Oct 2022 19:47:11 -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=BLRIPRQy; 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 S232056AbiJGCYO (ORCPT + 99 others); Thu, 6 Oct 2022 22:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbiJGCYM (ORCPT ); Thu, 6 Oct 2022 22:24:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3D7AA4871; Thu, 6 Oct 2022 19:24:11 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5AF97B821DC; Fri, 7 Oct 2022 02:24:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25A12C433C1; Fri, 7 Oct 2022 02:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665109449; bh=8N7UMpEz3/SSvxJT6QHcIUGcHLWegYsdTBx/dctVBCU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BLRIPRQyIIRZokJhkBezersg9mJWrP6qXiuq0iR6ocZ4c1DloE4jlhS6Pp5d0/2Ik cSmK+E2weqLP8oqLcA0IVEzIb3/tu4p0caZ8oLWzQWugN080k+/Vk6QtLLpokGZXel q7aNRUqsr/WArdGVEltEgVf/qFwVvcpqJIoMw6bGTPRmkYYPS8TYO1xcRncT/YCykA rTvunmwJAvpipkwpkhCnPXCnb3e99pWaEoO5zaxmRk5ophcTzjSV7g2qL8/pOuLQvW sCILBIMxAzb3Xp+SVHGP2gXg3NVNTBK7V95PnMCOFYtmQ26iO6H8sw6QZoUV/eTDH1 AylRf95LYkwJg== Date: Thu, 6 Oct 2022 21:24:06 -0500 From: Bjorn Andersson To: Richard Acayan Cc: linux-arm-msm@vger.kernel.org, Andy Gross , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Lee Jones , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v8 2/3] pinctrl: qcom: do not reinitialize gpio valid mask Message-ID: <20221007022406.kggtrbh52iamn2dv@builder.lan> References: <20221006232219.37505-1-mailingradian@gmail.com> <20221006232219.37505-3-mailingradian@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221006232219.37505-3-mailingradian@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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, Oct 06, 2022 at 07:22:18PM -0400, Richard Acayan wrote: > It may be necessary for some devices to specify reserved gpios in the > device-specific DTS, in addition to the reserved gpios common to all > devices with a given SoC. Remove this bitmap_fill() call so that the > settings applied to the gpio valid mask by DTS are not overridden by > the driver's reserved gpios. > > Signed-off-by: Richard Acayan > --- > drivers/pinctrl/qcom/pinctrl-msm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c > index a2abfe987ab1..f697e9f64360 100644 > --- a/drivers/pinctrl/qcom/pinctrl-msm.c > +++ b/drivers/pinctrl/qcom/pinctrl-msm.c > @@ -687,9 +687,8 @@ static int msm_gpio_init_valid_mask(struct gpio_chip *gc, > const int *reserved = pctrl->soc->reserved_gpios; > u16 *tmp; > > - /* Driver provided reserved list overrides DT and ACPI */ > + /* Driver provided reserved list overrides other settings here */ IMHO this no longer overrides things, how about changing it to: /* Remove driver-provided reserved GPIOs from valid_mask */ The rest of the change looks good and the commit message looks good. So please consider updating the comment and feel free to add my Reviewed-by: Bjorn Andersson Regards, Bjorn > if (reserved) { > - bitmap_fill(valid_mask, ngpios); > for (i = 0; reserved[i] >= 0; i++) { > if (i >= ngpios || reserved[i] >= ngpios) { > dev_err(pctrl->dev, "invalid list of reserved GPIOs\n"); > -- > 2.38.0 >